From 83506031404ac9800c7e539fd43824d267dfa6e5 Mon Sep 17 00:00:00 2001 From: Shin Fan Date: Wed, 8 Jun 2016 10:53:52 -0700 Subject: [PATCH 1/5] Update logging with latest generator. --- .../logging/spi/v2/ConfigServiceV2Api.java | 151 ++++++++++---- .../spi/v2/ConfigServiceV2Settings.java | 185 ++++++++++++++---- .../logging/spi/v2/LoggingServiceV2Api.java | 159 ++++++++++----- .../spi/v2/LoggingServiceV2Settings.java | 163 ++++++++++++--- .../logging/spi/v2/MetricsServiceV2Api.java | 156 +++++++++++---- .../spi/v2/MetricsServiceV2Settings.java | 173 +++++++++++++--- gcloud-java-logging/pom.xml | 64 ++++-- .../logging/spi/v2/ConfigServiceV2Api.java | 151 ++++++++++---- .../spi/v2/ConfigServiceV2Settings.java | 185 ++++++++++++++---- .../logging/spi/v2/LoggingServiceV2Api.java | 159 ++++++++++----- .../spi/v2/LoggingServiceV2Settings.java | 163 ++++++++++++--- .../logging/spi/v2/MetricsServiceV2Api.java | 156 +++++++++++---- .../spi/v2/MetricsServiceV2Settings.java | 173 +++++++++++++--- .../spi/v2/LoggingServiceV2ApiTest.java | 11 +- 14 files changed, 1580 insertions(+), 469 deletions(-) diff --git a/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Api.java b/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Api.java index 350b8de61b1e..7c87dda578fe 100644 --- a/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Api.java +++ b/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Api.java @@ -33,6 +33,7 @@ package com.google.cloud.logging.spi.v2; +import com.google.api.gax.core.PageAccessor; import com.google.api.gax.grpc.ApiCallable; import com.google.api.gax.protobuf.PathTemplate; import com.google.logging.v2.CreateSinkRequest; @@ -48,6 +49,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; +import java.util.concurrent.ScheduledExecutorService; // Manually-added imports: add custom (non-generated) imports after this point. @@ -55,26 +57,80 @@ /** * Service Description: * + *

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

+ * 
+ * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+ *   String projectName = "";
+ *   ListSinksResponse response = configServiceV2Api.listSinks(projectName);
+ * }
+ * 
+ * 
+ * + *

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

The surface of this class includes several types of Java methods for each of the API's methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available + * as parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request + * object, which must be constructed before the call. Not every API method will have a request + * object method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable + * ApiCallable object, which can be used to initiate calls to the service. + *
+ * + *

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

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

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

+ * 
+ * ConfigServiceV2Settings configServiceV2Settings = ConfigServiceV2Settings.defaultBuilder()
+ *     .provideChannelWith(myCredentials)
+ *     .build();
+ * ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.create(configServiceV2Settings);
+ * 
+ * 
+ * * * */ @javax.annotation.Generated("by GAPIC") public class ConfigServiceV2Api implements AutoCloseable { + private final ConfigServiceV2Settings settings; private final ManagedChannel channel; + private final ScheduledExecutorService executor; private final List closeables = new ArrayList<>(); private final ApiCallable listSinksCallable; - private final ApiCallable> listSinksIterableCallable; + private final ApiCallable> listSinksPagedCallable; private final ApiCallable getSinkCallable; private final ApiCallable createSinkCallable; private final ApiCallable updateSinkCallable; private final ApiCallable deleteSinkCallable; + public final ConfigServiceV2Settings getSettings() { + return settings; + } + private static final PathTemplate PROJECT_PATH_TEMPLATE = - PathTemplate.create("projects/{project}"); + PathTemplate.createWithoutUrlEncoding("projects/{project}"); private static final PathTemplate SINK_PATH_TEMPLATE = - PathTemplate.create("projects/{project}/sinks/{sink}"); + PathTemplate.createWithoutUrlEncoding("projects/{project}/sinks/{sink}"); /** * Formats a string containing the fully-qualified path to represent @@ -137,8 +193,8 @@ public static final String parseSinkFromSinkName(String sinkName) { * * */ - public static final ConfigServiceV2Api defaultInstance() throws IOException { - return create(ConfigServiceV2Settings.defaultInstance()); + public static final ConfigServiceV2Api createWithDefaults() throws IOException { + return create(ConfigServiceV2Settings.defaultBuilder().build()); } /** @@ -163,17 +219,24 @@ public static final ConfigServiceV2Api create(ConfigServiceV2Settings settings) * */ protected ConfigServiceV2Api(ConfigServiceV2Settings settings) throws IOException { - this.channel = settings.getChannel(); - - this.listSinksCallable = ApiCallable.create(settings.listSinksSettings(), settings); - this.listSinksIterableCallable = - ApiCallable.createIterable(settings.listSinksSettings(), settings); - this.getSinkCallable = ApiCallable.create(settings.getSinkSettings(), settings); - this.createSinkCallable = ApiCallable.create(settings.createSinkSettings(), settings); - this.updateSinkCallable = ApiCallable.create(settings.updateSinkSettings(), settings); - this.deleteSinkCallable = ApiCallable.create(settings.deleteSinkSettings(), settings); - - if (settings.shouldAutoCloseChannel()) { + this.settings = settings; + this.executor = settings.getExecutorProvider().getOrBuildExecutor(); + this.channel = settings.getChannelProvider().getOrBuildChannel(this.executor); + + this.listSinksCallable = + ApiCallable.create(settings.listSinksSettings(), this.channel, this.executor); + this.listSinksPagedCallable = + ApiCallable.createPagedVariant(settings.listSinksSettings(), this.channel, this.executor); + this.getSinkCallable = + ApiCallable.create(settings.getSinkSettings(), this.channel, this.executor); + this.createSinkCallable = + ApiCallable.create(settings.createSinkSettings(), this.channel, this.executor); + this.updateSinkCallable = + ApiCallable.create(settings.updateSinkSettings(), this.channel, this.executor); + this.deleteSinkCallable = + ApiCallable.create(settings.deleteSinkSettings(), this.channel, this.executor); + + if (settings.getChannelProvider().shouldAutoClose()) { closeables.add( new Closeable() { @Override @@ -182,6 +245,15 @@ public void close() throws IOException { } }); } + if (settings.getExecutorProvider().shouldAutoClose()) { + closeables.add( + new Closeable() { + @Override + public void close() throws IOException { + executor.shutdown(); + } + }); + } } // ----- listSinks ----- @@ -195,9 +267,10 @@ public void close() throws IOException { * * @param projectName Required. The resource name of the project containing the sinks. * Example: `"projects/my-logging-project"`, `"projects/01234567890"`. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ - public final Iterable listSinks(String projectName) { + public final PageAccessor listSinks(String projectName) { + PROJECT_PATH_TEMPLATE.validate(projectName); ListSinksRequest request = ListSinksRequest.newBuilder().setProjectName(projectName).build(); return listSinks(request); } @@ -210,10 +283,10 @@ public final Iterable listSinks(String projectName) { * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ - public final Iterable listSinks(ListSinksRequest request) { - return listSinksIterableCallable().call(request); + public final PageAccessor listSinks(ListSinksRequest request) { + return listSinksPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. @@ -222,10 +295,9 @@ public final Iterable listSinks(ListSinksRequest request) { * * * - * @throws ApiException if the remote call fails */ - public final ApiCallable> listSinksIterableCallable() { - return listSinksIterableCallable; + public final ApiCallable> listSinksPagedCallable() { + return listSinksPagedCallable; } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. @@ -234,7 +306,6 @@ public final ApiCallable> listSinksIterableC * * * - * @throws ApiException if the remote call fails */ public final ApiCallable listSinksCallable() { return listSinksCallable; @@ -251,11 +322,11 @@ public final ApiCallable listSinksCallable( * * @param sinkName The resource name of the sink to return. * Example: `"projects/my-project-id/sinks/my-sink-id"`. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public final LogSink getSink(String sinkName) { + SINK_PATH_TEMPLATE.validate(sinkName); GetSinkRequest request = GetSinkRequest.newBuilder().setSinkName(sinkName).build(); - return getSink(request); } @@ -267,7 +338,7 @@ public final LogSink getSink(String sinkName) { * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ private LogSink getSink(GetSinkRequest request) { return getSinkCallable().call(request); @@ -279,7 +350,6 @@ private LogSink getSink(GetSinkRequest request) { * * * - * @throws ApiException if the remote call fails */ public final ApiCallable getSinkCallable() { return getSinkCallable; @@ -300,12 +370,13 @@ public final ApiCallable getSinkCallable() { * The new sink must be provided in the request. * @param sink The new sink, which must not have an identifier that already * exists. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public final LogSink createSink(String projectName, LogSink sink) { + PROJECT_PATH_TEMPLATE.validate(projectName); + CreateSinkRequest request = CreateSinkRequest.newBuilder().setProjectName(projectName).setSink(sink).build(); - return createSink(request); } @@ -317,7 +388,7 @@ public final LogSink createSink(String projectName, LogSink sink) { * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public LogSink createSink(CreateSinkRequest request) { return createSinkCallable().call(request); @@ -329,7 +400,6 @@ public LogSink createSink(CreateSinkRequest request) { * * * - * @throws ApiException if the remote call fails */ public final ApiCallable createSinkCallable() { return createSinkCallable; @@ -353,12 +423,13 @@ public final ApiCallable createSinkCallable() { * @param sink The updated sink, whose name must be the same as the sink * identifier in `sinkName`. If `sinkName` does not exist, then * this method creates a new sink. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public final LogSink updateSink(String sinkName, LogSink sink) { + SINK_PATH_TEMPLATE.validate(sinkName); + UpdateSinkRequest request = UpdateSinkRequest.newBuilder().setSinkName(sinkName).setSink(sink).build(); - return updateSink(request); } @@ -370,7 +441,7 @@ public final LogSink updateSink(String sinkName, LogSink sink) { * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public LogSink updateSink(UpdateSinkRequest request) { return updateSinkCallable().call(request); @@ -382,7 +453,6 @@ public LogSink updateSink(UpdateSinkRequest request) { * * * - * @throws ApiException if the remote call fails */ public final ApiCallable updateSinkCallable() { return updateSinkCallable; @@ -399,11 +469,11 @@ public final ApiCallable updateSinkCallable() { * * @param sinkName The resource name of the sink to delete. * Example: `"projects/my-project-id/sinks/my-sink-id"`. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public final void deleteSink(String sinkName) { + SINK_PATH_TEMPLATE.validate(sinkName); DeleteSinkRequest request = DeleteSinkRequest.newBuilder().setSinkName(sinkName).build(); - deleteSink(request); } @@ -415,7 +485,7 @@ public final void deleteSink(String sinkName) { * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ private void deleteSink(DeleteSinkRequest request) { deleteSinkCallable().call(request); @@ -427,7 +497,6 @@ private void deleteSink(DeleteSinkRequest request) { * * * - * @throws ApiException if the remote call fails */ public final ApiCallable deleteSinkCallable() { return deleteSinkCallable; diff --git a/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Settings.java b/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Settings.java index 157f4b5d2427..9c1558fec565 100644 --- a/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Settings.java +++ b/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Settings.java @@ -40,6 +40,7 @@ import com.google.api.gax.grpc.PageStreamingDescriptor; import com.google.api.gax.grpc.ServiceApiSettings; import com.google.api.gax.grpc.SimpleCallSettings; +import com.google.auth.Credentials; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -57,12 +58,39 @@ import io.grpc.ManagedChannel; import io.grpc.Status; import java.io.IOException; +import java.util.List; import java.util.concurrent.ScheduledExecutorService; import org.joda.time.Duration; // Manually-added imports: add custom (non-generated) imports after this point. // AUTO-GENERATED DOCUMENTATION AND CLASS - see instructions at the top of the file for editing. +/** + * Settings class to configure an instance of {@link ConfigServiceV2Api}. + * + *

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

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

The builder of this class is recursive, so contained classes are themselves builders. + * When build() is called, the tree of builders is called to create the complete settings + * object. For example, to set the total timeout of ListSinks to 30 seconds: + * + *

+ * 
+ * ConfigServiceV2Settings.Builder configServiceV2SettingsBuilder =
+ *     ConfigServiceV2Settings.defaultBuilder();
+ * configServiceV2SettingsBuilder.ListSinksSettings().getRetrySettingsBuilder()
+ *     .setTotalTimeout(Duration.standardSeconds(30));
+ * ConfigServiceV2Settings configServiceV2Settings = configServiceV2SettingsBuilder.build();
+ * 
+ * 
+ */ @javax.annotation.Generated("by GAPIC") public class ConfigServiceV2Settings extends ServiceApiSettings { @@ -94,6 +122,16 @@ public class ConfigServiceV2Settings extends ServiceApiSettings { .add("https://www.googleapis.com/auth/cloud-platform") .build(); + /** + * The default connection settings of the service. + */ + public static final ConnectionSettings DEFAULT_CONNECTION_SETTINGS = + ConnectionSettings.newBuilder() + .setServiceAddress(DEFAULT_SERVICE_ADDRESS) + .setPort(DEFAULT_SERVICE_PORT) + .provideCredentialsWith(DEFAULT_SERVICE_SCOPES) + .build(); + private final PageStreamingCallSettings listSinksSettings; @@ -102,45 +140,67 @@ public class ConfigServiceV2Settings extends ServiceApiSettings { private final SimpleCallSettings updateSinkSettings; private final SimpleCallSettings deleteSinkSettings; + /** + * Returns the object with the settings used for calls to listSinks. + */ public PageStreamingCallSettings listSinksSettings() { return listSinksSettings; } + /** + * Returns the object with the settings used for calls to getSink. + */ public SimpleCallSettings getSinkSettings() { return getSinkSettings; } + /** + * Returns the object with the settings used for calls to createSink. + */ public SimpleCallSettings createSinkSettings() { return createSinkSettings; } + /** + * Returns the object with the settings used for calls to updateSink. + */ public SimpleCallSettings updateSinkSettings() { return updateSinkSettings; } + /** + * Returns the object with the settings used for calls to deleteSink. + */ public SimpleCallSettings deleteSinkSettings() { return deleteSinkSettings; } - public static ConfigServiceV2Settings defaultInstance() throws IOException { - return newBuilder().build(); + /** + * Returns a builder for this class with recommended defaults. + */ + public static Builder defaultBuilder() { + return Builder.createDefault(); } + /** + * Returns a new builder for this class. + */ public static Builder newBuilder() { return new Builder(); } + /** + * Returns a builder containing all the values of this settings class. + */ public Builder toBuilder() { return new Builder(this); } private ConfigServiceV2Settings(Builder settingsBuilder) throws IOException { super( - settingsBuilder.getOrBuildChannel(), - settingsBuilder.shouldAutoCloseChannel(), - settingsBuilder.getOrBuildExecutor(), - settingsBuilder.getConnectionSettings(), + settingsBuilder.getChannelProvider(), + settingsBuilder.getExecutorProvider(), settingsBuilder.getGeneratorName(), settingsBuilder.getGeneratorVersion(), settingsBuilder.getClientLibName(), @@ -177,6 +237,9 @@ public Iterable extractResources(ListSinksResponse payload) { } }; + /** + * Builder for ConfigServiceV2Settings. + */ public static class Builder extends ServiceApiSettings.Builder { private final ImmutableList methodSettingsBuilders; @@ -219,38 +282,19 @@ public static class Builder extends ServiceApiSettings.Builder { } private Builder() { - super( - ConnectionSettings.builder() - .setServiceAddress(DEFAULT_SERVICE_ADDRESS) - .setPort(DEFAULT_SERVICE_PORT) - .provideCredentialsWith(DEFAULT_SERVICE_SCOPES) - .build()); + super(DEFAULT_CONNECTION_SETTINGS); listSinksSettings = PageStreamingCallSettings.newBuilder( - ConfigServiceV2Grpc.METHOD_LIST_SINKS, LIST_SINKS_PAGE_STR_DESC) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); - - getSinkSettings = - SimpleCallSettings.newBuilder(ConfigServiceV2Grpc.METHOD_GET_SINK) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); - - createSinkSettings = - SimpleCallSettings.newBuilder(ConfigServiceV2Grpc.METHOD_CREATE_SINK) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); - - updateSinkSettings = - SimpleCallSettings.newBuilder(ConfigServiceV2Grpc.METHOD_UPDATE_SINK) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); - - deleteSinkSettings = - SimpleCallSettings.newBuilder(ConfigServiceV2Grpc.METHOD_DELETE_SINK) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + ConfigServiceV2Grpc.METHOD_LIST_SINKS, LIST_SINKS_PAGE_STR_DESC); + + getSinkSettings = SimpleCallSettings.newBuilder(ConfigServiceV2Grpc.METHOD_GET_SINK); + + createSinkSettings = SimpleCallSettings.newBuilder(ConfigServiceV2Grpc.METHOD_CREATE_SINK); + + updateSinkSettings = SimpleCallSettings.newBuilder(ConfigServiceV2Grpc.METHOD_UPDATE_SINK); + + deleteSinkSettings = SimpleCallSettings.newBuilder(ConfigServiceV2Grpc.METHOD_DELETE_SINK); methodSettingsBuilders = ImmutableList.of( @@ -261,6 +305,36 @@ private Builder() { deleteSinkSettings); } + private static Builder createDefault() { + Builder builder = new Builder(); + builder + .listSinksSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getSinkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .createSinkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .updateSinkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .deleteSinkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + return builder; + } + private Builder(ConfigServiceV2Settings settings) { super(settings); @@ -279,6 +353,17 @@ private Builder(ConfigServiceV2Settings settings) { deleteSinkSettings); } + @Override + protected ConnectionSettings getDefaultConnectionSettings() { + return DEFAULT_CONNECTION_SETTINGS; + } + + @Override + public Builder provideExecutorWith(ScheduledExecutorService executor, boolean shouldAutoClose) { + super.provideExecutorWith(executor, shouldAutoClose); + return this; + } + @Override public Builder provideChannelWith(ManagedChannel channel, boolean shouldAutoClose) { super.provideChannelWith(channel, shouldAutoClose); @@ -292,8 +377,14 @@ public Builder provideChannelWith(ConnectionSettings settings) { } @Override - public Builder setExecutor(ScheduledExecutorService executor) { - super.setExecutor(executor); + public Builder provideChannelWith(Credentials credentials) { + super.provideChannelWith(credentials); + return this; + } + + @Override + public Builder provideChannelWith(List scopes) { + super.provideChannelWith(scopes); return this; } @@ -309,28 +400,48 @@ public Builder setClientLibHeader(String name, String version) { return this; } + /** + * Applies the given settings to all of the API methods in this service. Only + * values that are non-null will be applied, so this method is not capable + * of un-setting any values. + */ public Builder applyToAllApiMethods(ApiCallSettings.Builder apiCallSettings) throws Exception { super.applyToAllApiMethods(methodSettingsBuilders, apiCallSettings); return this; } + /** + * Returns the builder for the settings used for calls to listSinks. + */ public PageStreamingCallSettings.Builder listSinksSettings() { return listSinksSettings; } + /** + * Returns the builder for the settings used for calls to getSink. + */ public SimpleCallSettings.Builder getSinkSettings() { return getSinkSettings; } + /** + * Returns the builder for the settings used for calls to createSink. + */ public SimpleCallSettings.Builder createSinkSettings() { return createSinkSettings; } + /** + * Returns the builder for the settings used for calls to updateSink. + */ public SimpleCallSettings.Builder updateSinkSettings() { return updateSinkSettings; } + /** + * Returns the builder for the settings used for calls to deleteSink. + */ public SimpleCallSettings.Builder deleteSinkSettings() { return deleteSinkSettings; } diff --git a/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Api.java b/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Api.java index ead7c1b886aa..abe8820eb463 100644 --- a/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Api.java +++ b/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Api.java @@ -35,6 +35,7 @@ import com.google.api.MonitoredResource; import com.google.api.MonitoredResourceDescriptor; +import com.google.api.gax.core.PageAccessor; import com.google.api.gax.grpc.ApiCallable; import com.google.api.gax.protobuf.PathTemplate; import com.google.logging.v2.DeleteLogRequest; @@ -52,6 +53,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.concurrent.ScheduledExecutorService; // Manually-added imports: add custom (non-generated) imports after this point. @@ -59,32 +61,86 @@ /** * Service Description: Service for ingesting and querying logs. * + *

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

+ * 
+ * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+ *   String logName = "";
+ *   loggingServiceV2Api.deleteLog(logName);
+ * }
+ * 
+ * 
+ * + *

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

The surface of this class includes several types of Java methods for each of the API's methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available + * as parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request + * object, which must be constructed before the call. Not every API method will have a request + * object method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable + * ApiCallable object, which can be used to initiate calls to the service. + *
+ * + *

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

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

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

+ * 
+ * LoggingServiceV2Settings loggingServiceV2Settings = LoggingServiceV2Settings.defaultBuilder()
+ *     .provideChannelWith(myCredentials)
+ *     .build();
+ * LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.create(loggingServiceV2Settings);
+ * 
+ * 
+ * * * */ @javax.annotation.Generated("by GAPIC") public class LoggingServiceV2Api implements AutoCloseable { + private final LoggingServiceV2Settings settings; private final ManagedChannel channel; + private final ScheduledExecutorService executor; private final List closeables = new ArrayList<>(); private final ApiCallable deleteLogCallable; private final ApiCallable writeLogEntriesCallable; private final ApiCallable listLogEntriesCallable; - private final ApiCallable> - listLogEntriesIterableCallable; + private final ApiCallable> + listLogEntriesPagedCallable; private final ApiCallable< ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsResponse> listMonitoredResourceDescriptorsCallable; private final ApiCallable< - ListMonitoredResourceDescriptorsRequest, Iterable> - listMonitoredResourceDescriptorsIterableCallable; + ListMonitoredResourceDescriptorsRequest, PageAccessor> + listMonitoredResourceDescriptorsPagedCallable; + + public final LoggingServiceV2Settings getSettings() { + return settings; + } private static final PathTemplate PROJECT_PATH_TEMPLATE = - PathTemplate.create("projects/{project}"); + PathTemplate.createWithoutUrlEncoding("projects/{project}"); private static final PathTemplate LOG_PATH_TEMPLATE = - PathTemplate.create("projects/{project}/logs/{log}"); + PathTemplate.createWithoutUrlEncoding("projects/{project}/logs/{log}"); /** * Formats a string containing the fully-qualified path to represent @@ -147,8 +203,8 @@ public static final String parseLogFromLogName(String logName) { * * */ - public static final LoggingServiceV2Api defaultInstance() throws IOException { - return create(LoggingServiceV2Settings.defaultInstance()); + public static final LoggingServiceV2Api createWithDefaults() throws IOException { + return create(LoggingServiceV2Settings.defaultBuilder().build()); } /** @@ -173,19 +229,27 @@ public static final LoggingServiceV2Api create(LoggingServiceV2Settings settings * */ protected LoggingServiceV2Api(LoggingServiceV2Settings settings) throws IOException { - this.channel = settings.getChannel(); - - this.deleteLogCallable = ApiCallable.create(settings.deleteLogSettings(), settings); - this.writeLogEntriesCallable = ApiCallable.create(settings.writeLogEntriesSettings(), settings); - this.listLogEntriesCallable = ApiCallable.create(settings.listLogEntriesSettings(), settings); - this.listLogEntriesIterableCallable = - ApiCallable.createIterable(settings.listLogEntriesSettings(), settings); + this.settings = settings; + this.executor = settings.getExecutorProvider().getOrBuildExecutor(); + this.channel = settings.getChannelProvider().getOrBuildChannel(this.executor); + + this.deleteLogCallable = + ApiCallable.create(settings.deleteLogSettings(), this.channel, this.executor); + this.writeLogEntriesCallable = + ApiCallable.create(settings.writeLogEntriesSettings(), this.channel, this.executor); + this.listLogEntriesCallable = + ApiCallable.create(settings.listLogEntriesSettings(), this.channel, this.executor); + this.listLogEntriesPagedCallable = + ApiCallable.createPagedVariant( + settings.listLogEntriesSettings(), this.channel, this.executor); this.listMonitoredResourceDescriptorsCallable = - ApiCallable.create(settings.listMonitoredResourceDescriptorsSettings(), settings); - this.listMonitoredResourceDescriptorsIterableCallable = - ApiCallable.createIterable(settings.listMonitoredResourceDescriptorsSettings(), settings); + ApiCallable.create( + settings.listMonitoredResourceDescriptorsSettings(), this.channel, this.executor); + this.listMonitoredResourceDescriptorsPagedCallable = + ApiCallable.createPagedVariant( + settings.listMonitoredResourceDescriptorsSettings(), this.channel, this.executor); - if (settings.shouldAutoCloseChannel()) { + if (settings.getChannelProvider().shouldAutoClose()) { closeables.add( new Closeable() { @Override @@ -194,6 +258,15 @@ public void close() throws IOException { } }); } + if (settings.getExecutorProvider().shouldAutoClose()) { + closeables.add( + new Closeable() { + @Override + public void close() throws IOException { + executor.shutdown(); + } + }); + } } // ----- deleteLog ----- @@ -208,11 +281,11 @@ public void close() throws IOException { * * @param logName Required. The resource name of the log to delete. Example: * `"projects/my-project/logs/syslog"`. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public final void deleteLog(String logName) { + LOG_PATH_TEMPLATE.validate(logName); DeleteLogRequest request = DeleteLogRequest.newBuilder().setLogName(logName).build(); - deleteLog(request); } @@ -225,7 +298,7 @@ public final void deleteLog(String logName) { * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ private void deleteLog(DeleteLogRequest request) { deleteLogCallable().call(request); @@ -238,7 +311,6 @@ private void deleteLog(DeleteLogRequest request) { * * * - * @throws ApiException if the remote call fails */ public final ApiCallable deleteLogCallable() { return deleteLogCallable; @@ -266,13 +338,15 @@ public final ApiCallable deleteLogCallable() { * Example: `{ "size": "large", "color":"red" }` * @param entries Required. The log entries to write. The log entries must have values for * all required fields. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public final WriteLogEntriesResponse writeLogEntries( String logName, MonitoredResource resource, Map labels, List entries) { + LOG_PATH_TEMPLATE.validate(logName); + WriteLogEntriesRequest request = WriteLogEntriesRequest.newBuilder() .setLogName(logName) @@ -280,7 +354,6 @@ public final WriteLogEntriesResponse writeLogEntries( .putAllLabels(labels) .addAllEntries(entries) .build(); - return writeLogEntries(request); } @@ -293,7 +366,7 @@ public final WriteLogEntriesResponse writeLogEntries( * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest request) { return writeLogEntriesCallable().call(request); @@ -306,7 +379,6 @@ public WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest request) { * * * - * @throws ApiException if the remote call fails */ public final ApiCallable writeLogEntriesCallable() { @@ -336,10 +408,11 @@ public WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest request) { * `LogEntry.timestamp` (oldest first), and the second option returns entries * in order of decreasing timestamps (newest first). Entries with equal * timestamps are returned in order of `LogEntry.insertId`. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ - public final Iterable listLogEntries( + public final PageAccessor listLogEntries( List projectIds, String filter, String orderBy) { + ListLogEntriesRequest request = ListLogEntriesRequest.newBuilder() .addAllProjectIds(projectIds) @@ -359,10 +432,10 @@ public final Iterable listLogEntries( * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ - public final Iterable listLogEntries(ListLogEntriesRequest request) { - return listLogEntriesIterableCallable().call(request); + public final PageAccessor listLogEntries(ListLogEntriesRequest request) { + return listLogEntriesPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. @@ -373,11 +446,10 @@ public final Iterable listLogEntries(ListLogEntriesRequest request) { * * * - * @throws ApiException if the remote call fails */ - public final ApiCallable> - listLogEntriesIterableCallable() { - return listLogEntriesIterableCallable; + public final ApiCallable> + listLogEntriesPagedCallable() { + return listLogEntriesPagedCallable; } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. @@ -388,7 +460,6 @@ public final Iterable listLogEntries(ListLogEntriesRequest request) { * * * - * @throws ApiException if the remote call fails */ public final ApiCallable listLogEntriesCallable() { return listLogEntriesCallable; @@ -404,11 +475,11 @@ public final ApiCallable listLogE * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ - public final Iterable listMonitoredResourceDescriptors( + public final PageAccessor listMonitoredResourceDescriptors( ListMonitoredResourceDescriptorsRequest request) { - return listMonitoredResourceDescriptorsIterableCallable().call(request); + return listMonitoredResourceDescriptorsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. @@ -417,12 +488,11 @@ public final Iterable listMonitoredResourceDescript * * * - * @throws ApiException if the remote call fails */ public final ApiCallable< - ListMonitoredResourceDescriptorsRequest, Iterable> - listMonitoredResourceDescriptorsIterableCallable() { - return listMonitoredResourceDescriptorsIterableCallable; + ListMonitoredResourceDescriptorsRequest, PageAccessor> + listMonitoredResourceDescriptorsPagedCallable() { + return listMonitoredResourceDescriptorsPagedCallable; } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. @@ -431,7 +501,6 @@ public final Iterable listMonitoredResourceDescript * * * - * @throws ApiException if the remote call fails */ public final ApiCallable< ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsResponse> diff --git a/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Settings.java b/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Settings.java index da6ae99fd9a7..c37e5c4ad305 100644 --- a/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Settings.java +++ b/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Settings.java @@ -41,6 +41,7 @@ import com.google.api.gax.grpc.PageStreamingDescriptor; import com.google.api.gax.grpc.ServiceApiSettings; import com.google.api.gax.grpc.SimpleCallSettings; +import com.google.auth.Credentials; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -59,12 +60,39 @@ import io.grpc.ManagedChannel; import io.grpc.Status; import java.io.IOException; +import java.util.List; import java.util.concurrent.ScheduledExecutorService; import org.joda.time.Duration; // Manually-added imports: add custom (non-generated) imports after this point. // AUTO-GENERATED DOCUMENTATION AND CLASS - see instructions at the top of the file for editing. +/** + * Settings class to configure an instance of {@link LoggingServiceV2Api}. + * + *

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

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

The builder of this class is recursive, so contained classes are themselves builders. + * When build() is called, the tree of builders is called to create the complete settings + * object. For example, to set the total timeout of DeleteLog to 30 seconds: + * + *

+ * 
+ * LoggingServiceV2Settings.Builder loggingServiceV2SettingsBuilder =
+ *     LoggingServiceV2Settings.defaultBuilder();
+ * loggingServiceV2SettingsBuilder.DeleteLogSettings().getRetrySettingsBuilder()
+ *     .setTotalTimeout(Duration.standardSeconds(30));
+ * LoggingServiceV2Settings loggingServiceV2Settings = loggingServiceV2SettingsBuilder.build();
+ * 
+ * 
+ */ @javax.annotation.Generated("by GAPIC") public class LoggingServiceV2Settings extends ServiceApiSettings { @@ -96,6 +124,16 @@ public class LoggingServiceV2Settings extends ServiceApiSettings { .add("https://www.googleapis.com/auth/cloud-platform") .build(); + /** + * The default connection settings of the service. + */ + public static final ConnectionSettings DEFAULT_CONNECTION_SETTINGS = + ConnectionSettings.newBuilder() + .setServiceAddress(DEFAULT_SERVICE_ADDRESS) + .setPort(DEFAULT_SERVICE_PORT) + .provideCredentialsWith(DEFAULT_SERVICE_SCOPES) + .build(); + private final SimpleCallSettings deleteLogSettings; private final SimpleCallSettings writeLogEntriesSettings; @@ -107,20 +145,32 @@ public class LoggingServiceV2Settings extends ServiceApiSettings { MonitoredResourceDescriptor> listMonitoredResourceDescriptorsSettings; + /** + * Returns the object with the settings used for calls to deleteLog. + */ public SimpleCallSettings deleteLogSettings() { return deleteLogSettings; } + /** + * Returns the object with the settings used for calls to writeLogEntries. + */ public SimpleCallSettings writeLogEntriesSettings() { return writeLogEntriesSettings; } + /** + * Returns the object with the settings used for calls to listLogEntries. + */ public PageStreamingCallSettings listLogEntriesSettings() { return listLogEntriesSettings; } + /** + * Returns the object with the settings used for calls to listMonitoredResourceDescriptors. + */ public PageStreamingCallSettings< ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> @@ -128,24 +178,31 @@ public SimpleCallSettings deleteLogSettings() { return listMonitoredResourceDescriptorsSettings; } - public static LoggingServiceV2Settings defaultInstance() throws IOException { - return newBuilder().build(); + /** + * Returns a builder for this class with recommended defaults. + */ + public static Builder defaultBuilder() { + return Builder.createDefault(); } + /** + * Returns a new builder for this class. + */ public static Builder newBuilder() { return new Builder(); } + /** + * Returns a builder containing all the values of this settings class. + */ public Builder toBuilder() { return new Builder(this); } private LoggingServiceV2Settings(Builder settingsBuilder) throws IOException { super( - settingsBuilder.getOrBuildChannel(), - settingsBuilder.shouldAutoCloseChannel(), - settingsBuilder.getOrBuildExecutor(), - settingsBuilder.getConnectionSettings(), + settingsBuilder.getChannelProvider(), + settingsBuilder.getExecutorProvider(), settingsBuilder.getGeneratorName(), settingsBuilder.getGeneratorVersion(), settingsBuilder.getClientLibName(), @@ -214,6 +271,9 @@ public Iterable extractResources( } }; + /** + * Builder for LoggingServiceV2Settings. + */ public static class Builder extends ServiceApiSettings.Builder { private final ImmutableList methodSettingsBuilders; @@ -270,35 +330,21 @@ public static class Builder extends ServiceApiSettings.Builder { } private Builder() { - super( - ConnectionSettings.builder() - .setServiceAddress(DEFAULT_SERVICE_ADDRESS) - .setPort(DEFAULT_SERVICE_PORT) - .provideCredentialsWith(DEFAULT_SERVICE_SCOPES) - .build()); - - deleteLogSettings = - SimpleCallSettings.newBuilder(LoggingServiceV2Grpc.METHOD_DELETE_LOG) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + super(DEFAULT_CONNECTION_SETTINGS); + + deleteLogSettings = SimpleCallSettings.newBuilder(LoggingServiceV2Grpc.METHOD_DELETE_LOG); writeLogEntriesSettings = - SimpleCallSettings.newBuilder(LoggingServiceV2Grpc.METHOD_WRITE_LOG_ENTRIES) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + SimpleCallSettings.newBuilder(LoggingServiceV2Grpc.METHOD_WRITE_LOG_ENTRIES); listLogEntriesSettings = PageStreamingCallSettings.newBuilder( - LoggingServiceV2Grpc.METHOD_LIST_LOG_ENTRIES, LIST_LOG_ENTRIES_PAGE_STR_DESC) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("list")); + LoggingServiceV2Grpc.METHOD_LIST_LOG_ENTRIES, LIST_LOG_ENTRIES_PAGE_STR_DESC); listMonitoredResourceDescriptorsSettings = PageStreamingCallSettings.newBuilder( - LoggingServiceV2Grpc.METHOD_LIST_MONITORED_RESOURCE_DESCRIPTORS, - LIST_MONITORED_RESOURCE_DESCRIPTORS_PAGE_STR_DESC) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + LoggingServiceV2Grpc.METHOD_LIST_MONITORED_RESOURCE_DESCRIPTORS, + LIST_MONITORED_RESOURCE_DESCRIPTORS_PAGE_STR_DESC); methodSettingsBuilders = ImmutableList.of( @@ -308,6 +354,31 @@ private Builder() { listMonitoredResourceDescriptorsSettings); } + private static Builder createDefault() { + Builder builder = new Builder(); + builder + .deleteLogSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .writeLogEntriesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listLogEntriesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("list")); + + builder + .listMonitoredResourceDescriptorsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + return builder; + } + private Builder(LoggingServiceV2Settings settings) { super(settings); @@ -325,6 +396,17 @@ private Builder(LoggingServiceV2Settings settings) { listMonitoredResourceDescriptorsSettings); } + @Override + protected ConnectionSettings getDefaultConnectionSettings() { + return DEFAULT_CONNECTION_SETTINGS; + } + + @Override + public Builder provideExecutorWith(ScheduledExecutorService executor, boolean shouldAutoClose) { + super.provideExecutorWith(executor, shouldAutoClose); + return this; + } + @Override public Builder provideChannelWith(ManagedChannel channel, boolean shouldAutoClose) { super.provideChannelWith(channel, shouldAutoClose); @@ -338,8 +420,14 @@ public Builder provideChannelWith(ConnectionSettings settings) { } @Override - public Builder setExecutor(ScheduledExecutorService executor) { - super.setExecutor(executor); + public Builder provideChannelWith(Credentials credentials) { + super.provideChannelWith(credentials); + return this; + } + + @Override + public Builder provideChannelWith(List scopes) { + super.provideChannelWith(scopes); return this; } @@ -355,26 +443,43 @@ public Builder setClientLibHeader(String name, String version) { return this; } + /** + * Applies the given settings to all of the API methods in this service. Only + * values that are non-null will be applied, so this method is not capable + * of un-setting any values. + */ public Builder applyToAllApiMethods(ApiCallSettings.Builder apiCallSettings) throws Exception { super.applyToAllApiMethods(methodSettingsBuilders, apiCallSettings); return this; } + /** + * Returns the builder for the settings used for calls to deleteLog. + */ public SimpleCallSettings.Builder deleteLogSettings() { return deleteLogSettings; } + /** + * Returns the builder for the settings used for calls to writeLogEntries. + */ public SimpleCallSettings.Builder writeLogEntriesSettings() { return writeLogEntriesSettings; } + /** + * Returns the builder for the settings used for calls to listLogEntries. + */ public PageStreamingCallSettings.Builder< ListLogEntriesRequest, ListLogEntriesResponse, LogEntry> listLogEntriesSettings() { return listLogEntriesSettings; } + /** + * Returns the builder for the settings used for calls to listMonitoredResourceDescriptors. + */ public PageStreamingCallSettings.Builder< ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> diff --git a/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Api.java b/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Api.java index a5f2306577b2..765197054e52 100644 --- a/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Api.java +++ b/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Api.java @@ -33,6 +33,7 @@ package com.google.cloud.logging.spi.v2; +import com.google.api.gax.core.PageAccessor; import com.google.api.gax.grpc.ApiCallable; import com.google.api.gax.protobuf.PathTemplate; import com.google.logging.v2.CreateLogMetricRequest; @@ -48,6 +49,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; +import java.util.concurrent.ScheduledExecutorService; // Manually-added imports: add custom (non-generated) imports after this point. @@ -55,27 +57,81 @@ /** * Service Description: * + *

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

+ * 
+ * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+ *   String projectName = "";
+ *   ListLogMetricsResponse response = metricsServiceV2Api.listLogMetrics(projectName);
+ * }
+ * 
+ * 
+ * + *

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

The surface of this class includes several types of Java methods for each of the API's methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available + * as parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request + * object, which must be constructed before the call. Not every API method will have a request + * object method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable + * ApiCallable object, which can be used to initiate calls to the service. + *
+ * + *

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

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

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

+ * 
+ * MetricsServiceV2Settings metricsServiceV2Settings = MetricsServiceV2Settings.defaultBuilder()
+ *     .provideChannelWith(myCredentials)
+ *     .build();
+ * MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.create(metricsServiceV2Settings);
+ * 
+ * 
+ * * * */ @javax.annotation.Generated("by GAPIC") public class MetricsServiceV2Api implements AutoCloseable { + private final MetricsServiceV2Settings settings; private final ManagedChannel channel; + private final ScheduledExecutorService executor; private final List closeables = new ArrayList<>(); private final ApiCallable listLogMetricsCallable; - private final ApiCallable> - listLogMetricsIterableCallable; + private final ApiCallable> + listLogMetricsPagedCallable; private final ApiCallable getLogMetricCallable; private final ApiCallable createLogMetricCallable; private final ApiCallable updateLogMetricCallable; private final ApiCallable deleteLogMetricCallable; + public final MetricsServiceV2Settings getSettings() { + return settings; + } + private static final PathTemplate PROJECT_PATH_TEMPLATE = - PathTemplate.create("projects/{project}"); + PathTemplate.createWithoutUrlEncoding("projects/{project}"); private static final PathTemplate METRIC_PATH_TEMPLATE = - PathTemplate.create("projects/{project}/metrics/{metric}"); + PathTemplate.createWithoutUrlEncoding("projects/{project}/metrics/{metric}"); /** * Formats a string containing the fully-qualified path to represent @@ -138,8 +194,8 @@ public static final String parseMetricFromMetricName(String metricName) { * * */ - public static final MetricsServiceV2Api defaultInstance() throws IOException { - return create(MetricsServiceV2Settings.defaultInstance()); + public static final MetricsServiceV2Api createWithDefaults() throws IOException { + return create(MetricsServiceV2Settings.defaultBuilder().build()); } /** @@ -164,17 +220,25 @@ public static final MetricsServiceV2Api create(MetricsServiceV2Settings settings * */ protected MetricsServiceV2Api(MetricsServiceV2Settings settings) throws IOException { - this.channel = settings.getChannel(); - - this.listLogMetricsCallable = ApiCallable.create(settings.listLogMetricsSettings(), settings); - this.listLogMetricsIterableCallable = - ApiCallable.createIterable(settings.listLogMetricsSettings(), settings); - this.getLogMetricCallable = ApiCallable.create(settings.getLogMetricSettings(), settings); - this.createLogMetricCallable = ApiCallable.create(settings.createLogMetricSettings(), settings); - this.updateLogMetricCallable = ApiCallable.create(settings.updateLogMetricSettings(), settings); - this.deleteLogMetricCallable = ApiCallable.create(settings.deleteLogMetricSettings(), settings); - - if (settings.shouldAutoCloseChannel()) { + this.settings = settings; + this.executor = settings.getExecutorProvider().getOrBuildExecutor(); + this.channel = settings.getChannelProvider().getOrBuildChannel(this.executor); + + this.listLogMetricsCallable = + ApiCallable.create(settings.listLogMetricsSettings(), this.channel, this.executor); + this.listLogMetricsPagedCallable = + ApiCallable.createPagedVariant( + settings.listLogMetricsSettings(), this.channel, this.executor); + this.getLogMetricCallable = + ApiCallable.create(settings.getLogMetricSettings(), this.channel, this.executor); + this.createLogMetricCallable = + ApiCallable.create(settings.createLogMetricSettings(), this.channel, this.executor); + this.updateLogMetricCallable = + ApiCallable.create(settings.updateLogMetricSettings(), this.channel, this.executor); + this.deleteLogMetricCallable = + ApiCallable.create(settings.deleteLogMetricSettings(), this.channel, this.executor); + + if (settings.getChannelProvider().shouldAutoClose()) { closeables.add( new Closeable() { @Override @@ -183,6 +247,15 @@ public void close() throws IOException { } }); } + if (settings.getExecutorProvider().shouldAutoClose()) { + closeables.add( + new Closeable() { + @Override + public void close() throws IOException { + executor.shutdown(); + } + }); + } } // ----- listLogMetrics ----- @@ -196,9 +269,10 @@ public void close() throws IOException { * * @param projectName Required. The resource name of the project containing the metrics. * Example: `"projects/my-project-id"`. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ - public final Iterable listLogMetrics(String projectName) { + public final PageAccessor listLogMetrics(String projectName) { + PROJECT_PATH_TEMPLATE.validate(projectName); ListLogMetricsRequest request = ListLogMetricsRequest.newBuilder().setProjectName(projectName).build(); return listLogMetrics(request); @@ -212,10 +286,10 @@ public final Iterable listLogMetrics(String projectName) { * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ - public final Iterable listLogMetrics(ListLogMetricsRequest request) { - return listLogMetricsIterableCallable().call(request); + public final PageAccessor listLogMetrics(ListLogMetricsRequest request) { + return listLogMetricsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. @@ -224,11 +298,10 @@ public final Iterable listLogMetrics(ListLogMetricsRequest request) { * * * - * @throws ApiException if the remote call fails */ - public final ApiCallable> - listLogMetricsIterableCallable() { - return listLogMetricsIterableCallable; + public final ApiCallable> + listLogMetricsPagedCallable() { + return listLogMetricsPagedCallable; } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. @@ -237,7 +310,6 @@ public final Iterable listLogMetrics(ListLogMetricsRequest request) { * * * - * @throws ApiException if the remote call fails */ public final ApiCallable listLogMetricsCallable() { return listLogMetricsCallable; @@ -254,12 +326,12 @@ public final ApiCallable listLogM * * @param metricName The resource name of the desired metric. * Example: `"projects/my-project-id/metrics/my-metric-id"`. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public final LogMetric getLogMetric(String metricName) { + METRIC_PATH_TEMPLATE.validate(metricName); GetLogMetricRequest request = GetLogMetricRequest.newBuilder().setMetricName(metricName).build(); - return getLogMetric(request); } @@ -271,7 +343,7 @@ public final LogMetric getLogMetric(String metricName) { * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ private LogMetric getLogMetric(GetLogMetricRequest request) { return getLogMetricCallable().call(request); @@ -283,7 +355,6 @@ private LogMetric getLogMetric(GetLogMetricRequest request) { * * * - * @throws ApiException if the remote call fails */ public final ApiCallable getLogMetricCallable() { return getLogMetricCallable; @@ -304,12 +375,13 @@ public final ApiCallable getLogMetricCallable() * The new metric must be provided in the request. * @param metric The new logs-based metric, which must not have an identifier that * already exists. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public final LogMetric createLogMetric(String projectName, LogMetric metric) { + PROJECT_PATH_TEMPLATE.validate(projectName); + CreateLogMetricRequest request = CreateLogMetricRequest.newBuilder().setProjectName(projectName).setMetric(metric).build(); - return createLogMetric(request); } @@ -321,7 +393,7 @@ public final LogMetric createLogMetric(String projectName, LogMetric metric) { * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public LogMetric createLogMetric(CreateLogMetricRequest request) { return createLogMetricCallable().call(request); @@ -333,7 +405,6 @@ public LogMetric createLogMetric(CreateLogMetricRequest request) { * * * - * @throws ApiException if the remote call fails */ public final ApiCallable createLogMetricCallable() { return createLogMetricCallable; @@ -357,12 +428,13 @@ public final ApiCallable createLogMetricCalla * @param metric The updated metric, whose name must be the same as the * metric identifier in `metricName`. If `metricName` does not * exist, then a new metric is created. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public final LogMetric updateLogMetric(String metricName, LogMetric metric) { + METRIC_PATH_TEMPLATE.validate(metricName); + UpdateLogMetricRequest request = UpdateLogMetricRequest.newBuilder().setMetricName(metricName).setMetric(metric).build(); - return updateLogMetric(request); } @@ -374,7 +446,7 @@ public final LogMetric updateLogMetric(String metricName, LogMetric metric) { * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public LogMetric updateLogMetric(UpdateLogMetricRequest request) { return updateLogMetricCallable().call(request); @@ -386,7 +458,6 @@ public LogMetric updateLogMetric(UpdateLogMetricRequest request) { * * * - * @throws ApiException if the remote call fails */ public final ApiCallable updateLogMetricCallable() { return updateLogMetricCallable; @@ -403,12 +474,12 @@ public final ApiCallable updateLogMetricCalla * * @param metricName The resource name of the metric to delete. * Example: `"projects/my-project-id/metrics/my-metric-id"`. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public final void deleteLogMetric(String metricName) { + METRIC_PATH_TEMPLATE.validate(metricName); DeleteLogMetricRequest request = DeleteLogMetricRequest.newBuilder().setMetricName(metricName).build(); - deleteLogMetric(request); } @@ -420,7 +491,7 @@ public final void deleteLogMetric(String metricName) { * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ private void deleteLogMetric(DeleteLogMetricRequest request) { deleteLogMetricCallable().call(request); @@ -432,7 +503,6 @@ private void deleteLogMetric(DeleteLogMetricRequest request) { * * * - * @throws ApiException if the remote call fails */ public final ApiCallable deleteLogMetricCallable() { return deleteLogMetricCallable; diff --git a/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Settings.java b/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Settings.java index 316a9851bf11..1308b95eb029 100644 --- a/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Settings.java +++ b/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Settings.java @@ -40,6 +40,7 @@ import com.google.api.gax.grpc.PageStreamingDescriptor; import com.google.api.gax.grpc.ServiceApiSettings; import com.google.api.gax.grpc.SimpleCallSettings; +import com.google.auth.Credentials; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -57,12 +58,39 @@ import io.grpc.ManagedChannel; import io.grpc.Status; import java.io.IOException; +import java.util.List; import java.util.concurrent.ScheduledExecutorService; import org.joda.time.Duration; // Manually-added imports: add custom (non-generated) imports after this point. // AUTO-GENERATED DOCUMENTATION AND CLASS - see instructions at the top of the file for editing. +/** + * Settings class to configure an instance of {@link MetricsServiceV2Api}. + * + *

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

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

The builder of this class is recursive, so contained classes are themselves builders. + * When build() is called, the tree of builders is called to create the complete settings + * object. For example, to set the total timeout of ListLogMetrics to 30 seconds: + * + *

+ * 
+ * MetricsServiceV2Settings.Builder metricsServiceV2SettingsBuilder =
+ *     MetricsServiceV2Settings.defaultBuilder();
+ * metricsServiceV2SettingsBuilder.ListLogMetricsSettings().getRetrySettingsBuilder()
+ *     .setTotalTimeout(Duration.standardSeconds(30));
+ * MetricsServiceV2Settings metricsServiceV2Settings = metricsServiceV2SettingsBuilder.build();
+ * 
+ * 
+ */ @javax.annotation.Generated("by GAPIC") public class MetricsServiceV2Settings extends ServiceApiSettings { @@ -94,6 +122,16 @@ public class MetricsServiceV2Settings extends ServiceApiSettings { .add("https://www.googleapis.com/auth/cloud-platform") .build(); + /** + * The default connection settings of the service. + */ + public static final ConnectionSettings DEFAULT_CONNECTION_SETTINGS = + ConnectionSettings.newBuilder() + .setServiceAddress(DEFAULT_SERVICE_ADDRESS) + .setPort(DEFAULT_SERVICE_PORT) + .provideCredentialsWith(DEFAULT_SERVICE_SCOPES) + .build(); + private final PageStreamingCallSettings listLogMetricsSettings; @@ -102,45 +140,67 @@ public class MetricsServiceV2Settings extends ServiceApiSettings { private final SimpleCallSettings updateLogMetricSettings; private final SimpleCallSettings deleteLogMetricSettings; + /** + * Returns the object with the settings used for calls to listLogMetrics. + */ public PageStreamingCallSettings listLogMetricsSettings() { return listLogMetricsSettings; } + /** + * Returns the object with the settings used for calls to getLogMetric. + */ public SimpleCallSettings getLogMetricSettings() { return getLogMetricSettings; } + /** + * Returns the object with the settings used for calls to createLogMetric. + */ public SimpleCallSettings createLogMetricSettings() { return createLogMetricSettings; } + /** + * Returns the object with the settings used for calls to updateLogMetric. + */ public SimpleCallSettings updateLogMetricSettings() { return updateLogMetricSettings; } + /** + * Returns the object with the settings used for calls to deleteLogMetric. + */ public SimpleCallSettings deleteLogMetricSettings() { return deleteLogMetricSettings; } - public static MetricsServiceV2Settings defaultInstance() throws IOException { - return newBuilder().build(); + /** + * Returns a builder for this class with recommended defaults. + */ + public static Builder defaultBuilder() { + return Builder.createDefault(); } + /** + * Returns a new builder for this class. + */ public static Builder newBuilder() { return new Builder(); } + /** + * Returns a builder containing all the values of this settings class. + */ public Builder toBuilder() { return new Builder(this); } private MetricsServiceV2Settings(Builder settingsBuilder) throws IOException { super( - settingsBuilder.getOrBuildChannel(), - settingsBuilder.shouldAutoCloseChannel(), - settingsBuilder.getOrBuildExecutor(), - settingsBuilder.getConnectionSettings(), + settingsBuilder.getChannelProvider(), + settingsBuilder.getExecutorProvider(), settingsBuilder.getGeneratorName(), settingsBuilder.getGeneratorVersion(), settingsBuilder.getClientLibName(), @@ -177,6 +237,9 @@ public Iterable extractResources(ListLogMetricsResponse payload) { } }; + /** + * Builder for MetricsServiceV2Settings. + */ public static class Builder extends ServiceApiSettings.Builder { private final ImmutableList methodSettingsBuilders; @@ -220,38 +283,23 @@ public static class Builder extends ServiceApiSettings.Builder { } private Builder() { - super( - ConnectionSettings.builder() - .setServiceAddress(DEFAULT_SERVICE_ADDRESS) - .setPort(DEFAULT_SERVICE_PORT) - .provideCredentialsWith(DEFAULT_SERVICE_SCOPES) - .build()); + super(DEFAULT_CONNECTION_SETTINGS); listLogMetricsSettings = PageStreamingCallSettings.newBuilder( - MetricsServiceV2Grpc.METHOD_LIST_LOG_METRICS, LIST_LOG_METRICS_PAGE_STR_DESC) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + MetricsServiceV2Grpc.METHOD_LIST_LOG_METRICS, LIST_LOG_METRICS_PAGE_STR_DESC); getLogMetricSettings = - SimpleCallSettings.newBuilder(MetricsServiceV2Grpc.METHOD_GET_LOG_METRIC) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + SimpleCallSettings.newBuilder(MetricsServiceV2Grpc.METHOD_GET_LOG_METRIC); createLogMetricSettings = - SimpleCallSettings.newBuilder(MetricsServiceV2Grpc.METHOD_CREATE_LOG_METRIC) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + SimpleCallSettings.newBuilder(MetricsServiceV2Grpc.METHOD_CREATE_LOG_METRIC); updateLogMetricSettings = - SimpleCallSettings.newBuilder(MetricsServiceV2Grpc.METHOD_UPDATE_LOG_METRIC) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + SimpleCallSettings.newBuilder(MetricsServiceV2Grpc.METHOD_UPDATE_LOG_METRIC); deleteLogMetricSettings = - SimpleCallSettings.newBuilder(MetricsServiceV2Grpc.METHOD_DELETE_LOG_METRIC) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + SimpleCallSettings.newBuilder(MetricsServiceV2Grpc.METHOD_DELETE_LOG_METRIC); methodSettingsBuilders = ImmutableList.of( @@ -262,6 +310,36 @@ private Builder() { deleteLogMetricSettings); } + private static Builder createDefault() { + Builder builder = new Builder(); + builder + .listLogMetricsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getLogMetricSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .createLogMetricSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .updateLogMetricSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .deleteLogMetricSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + return builder; + } + private Builder(MetricsServiceV2Settings settings) { super(settings); @@ -280,6 +358,17 @@ private Builder(MetricsServiceV2Settings settings) { deleteLogMetricSettings); } + @Override + protected ConnectionSettings getDefaultConnectionSettings() { + return DEFAULT_CONNECTION_SETTINGS; + } + + @Override + public Builder provideExecutorWith(ScheduledExecutorService executor, boolean shouldAutoClose) { + super.provideExecutorWith(executor, shouldAutoClose); + return this; + } + @Override public Builder provideChannelWith(ManagedChannel channel, boolean shouldAutoClose) { super.provideChannelWith(channel, shouldAutoClose); @@ -293,8 +382,14 @@ public Builder provideChannelWith(ConnectionSettings settings) { } @Override - public Builder setExecutor(ScheduledExecutorService executor) { - super.setExecutor(executor); + public Builder provideChannelWith(Credentials credentials) { + super.provideChannelWith(credentials); + return this; + } + + @Override + public Builder provideChannelWith(List scopes) { + super.provideChannelWith(scopes); return this; } @@ -310,29 +405,49 @@ public Builder setClientLibHeader(String name, String version) { return this; } + /** + * Applies the given settings to all of the API methods in this service. Only + * values that are non-null will be applied, so this method is not capable + * of un-setting any values. + */ public Builder applyToAllApiMethods(ApiCallSettings.Builder apiCallSettings) throws Exception { super.applyToAllApiMethods(methodSettingsBuilders, apiCallSettings); return this; } + /** + * Returns the builder for the settings used for calls to listLogMetrics. + */ public PageStreamingCallSettings.Builder< ListLogMetricsRequest, ListLogMetricsResponse, LogMetric> listLogMetricsSettings() { return listLogMetricsSettings; } + /** + * Returns the builder for the settings used for calls to getLogMetric. + */ public SimpleCallSettings.Builder getLogMetricSettings() { return getLogMetricSettings; } + /** + * Returns the builder for the settings used for calls to createLogMetric. + */ public SimpleCallSettings.Builder createLogMetricSettings() { return createLogMetricSettings; } + /** + * Returns the builder for the settings used for calls to updateLogMetric. + */ public SimpleCallSettings.Builder updateLogMetricSettings() { return updateLogMetricSettings; } + /** + * Returns the builder for the settings used for calls to deleteLogMetric. + */ public SimpleCallSettings.Builder deleteLogMetricSettings() { return deleteLogMetricSettings; } diff --git a/gcloud-java-logging/pom.xml b/gcloud-java-logging/pom.xml index 213c597648fa..38ef3f4979a2 100644 --- a/gcloud-java-logging/pom.xml +++ b/gcloud-java-logging/pom.xml @@ -1,18 +1,14 @@ 4.0.0 - com.google.gcloud - gcloud-java-logging - jar GCloud Java Logging Java idiomatic client for Google Cloud Logging. - - com.google.gcloud - gcloud-java-pom - 0.1.4 - + com.google.gcloud + gcloud-java-logging + 0.0.0 + jar gcloud-java-logging @@ -20,12 +16,7 @@ com.google.api gax - 0.0.9 - - - com.google.api.grpc - grpc-core-proto - 0.0.2 + 0.0.13 com.google.api.grpc @@ -40,7 +31,7 @@ io.grpc grpc-all - 0.9.0 + 0.12.0 com.google.auto.value @@ -54,6 +45,18 @@ test + + + doclint-java8-disable + + [1.8,) + + + + -Xdoclint:none + + + @@ -66,12 +69,41 @@ add-source - generated/src/main + generated/src/main/java + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.3 + + + attach-javadocs + + jar + + + ${javadoc.opts} + + + + + + maven-compiler-plugin + + + + 3.1 + + 1.7 + 1.7 + UTF-8 + -Xlint:unchecked + + diff --git a/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Api.java b/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Api.java index 350b8de61b1e..7c87dda578fe 100644 --- a/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Api.java +++ b/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Api.java @@ -33,6 +33,7 @@ package com.google.cloud.logging.spi.v2; +import com.google.api.gax.core.PageAccessor; import com.google.api.gax.grpc.ApiCallable; import com.google.api.gax.protobuf.PathTemplate; import com.google.logging.v2.CreateSinkRequest; @@ -48,6 +49,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; +import java.util.concurrent.ScheduledExecutorService; // Manually-added imports: add custom (non-generated) imports after this point. @@ -55,26 +57,80 @@ /** * Service Description: * + *

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

+ * 
+ * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+ *   String projectName = "";
+ *   ListSinksResponse response = configServiceV2Api.listSinks(projectName);
+ * }
+ * 
+ * 
+ * + *

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

The surface of this class includes several types of Java methods for each of the API's methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available + * as parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request + * object, which must be constructed before the call. Not every API method will have a request + * object method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable + * ApiCallable object, which can be used to initiate calls to the service. + *
+ * + *

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

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

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

+ * 
+ * ConfigServiceV2Settings configServiceV2Settings = ConfigServiceV2Settings.defaultBuilder()
+ *     .provideChannelWith(myCredentials)
+ *     .build();
+ * ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.create(configServiceV2Settings);
+ * 
+ * 
+ * * * */ @javax.annotation.Generated("by GAPIC") public class ConfigServiceV2Api implements AutoCloseable { + private final ConfigServiceV2Settings settings; private final ManagedChannel channel; + private final ScheduledExecutorService executor; private final List closeables = new ArrayList<>(); private final ApiCallable listSinksCallable; - private final ApiCallable> listSinksIterableCallable; + private final ApiCallable> listSinksPagedCallable; private final ApiCallable getSinkCallable; private final ApiCallable createSinkCallable; private final ApiCallable updateSinkCallable; private final ApiCallable deleteSinkCallable; + public final ConfigServiceV2Settings getSettings() { + return settings; + } + private static final PathTemplate PROJECT_PATH_TEMPLATE = - PathTemplate.create("projects/{project}"); + PathTemplate.createWithoutUrlEncoding("projects/{project}"); private static final PathTemplate SINK_PATH_TEMPLATE = - PathTemplate.create("projects/{project}/sinks/{sink}"); + PathTemplate.createWithoutUrlEncoding("projects/{project}/sinks/{sink}"); /** * Formats a string containing the fully-qualified path to represent @@ -137,8 +193,8 @@ public static final String parseSinkFromSinkName(String sinkName) { * * */ - public static final ConfigServiceV2Api defaultInstance() throws IOException { - return create(ConfigServiceV2Settings.defaultInstance()); + public static final ConfigServiceV2Api createWithDefaults() throws IOException { + return create(ConfigServiceV2Settings.defaultBuilder().build()); } /** @@ -163,17 +219,24 @@ public static final ConfigServiceV2Api create(ConfigServiceV2Settings settings) * */ protected ConfigServiceV2Api(ConfigServiceV2Settings settings) throws IOException { - this.channel = settings.getChannel(); - - this.listSinksCallable = ApiCallable.create(settings.listSinksSettings(), settings); - this.listSinksIterableCallable = - ApiCallable.createIterable(settings.listSinksSettings(), settings); - this.getSinkCallable = ApiCallable.create(settings.getSinkSettings(), settings); - this.createSinkCallable = ApiCallable.create(settings.createSinkSettings(), settings); - this.updateSinkCallable = ApiCallable.create(settings.updateSinkSettings(), settings); - this.deleteSinkCallable = ApiCallable.create(settings.deleteSinkSettings(), settings); - - if (settings.shouldAutoCloseChannel()) { + this.settings = settings; + this.executor = settings.getExecutorProvider().getOrBuildExecutor(); + this.channel = settings.getChannelProvider().getOrBuildChannel(this.executor); + + this.listSinksCallable = + ApiCallable.create(settings.listSinksSettings(), this.channel, this.executor); + this.listSinksPagedCallable = + ApiCallable.createPagedVariant(settings.listSinksSettings(), this.channel, this.executor); + this.getSinkCallable = + ApiCallable.create(settings.getSinkSettings(), this.channel, this.executor); + this.createSinkCallable = + ApiCallable.create(settings.createSinkSettings(), this.channel, this.executor); + this.updateSinkCallable = + ApiCallable.create(settings.updateSinkSettings(), this.channel, this.executor); + this.deleteSinkCallable = + ApiCallable.create(settings.deleteSinkSettings(), this.channel, this.executor); + + if (settings.getChannelProvider().shouldAutoClose()) { closeables.add( new Closeable() { @Override @@ -182,6 +245,15 @@ public void close() throws IOException { } }); } + if (settings.getExecutorProvider().shouldAutoClose()) { + closeables.add( + new Closeable() { + @Override + public void close() throws IOException { + executor.shutdown(); + } + }); + } } // ----- listSinks ----- @@ -195,9 +267,10 @@ public void close() throws IOException { * * @param projectName Required. The resource name of the project containing the sinks. * Example: `"projects/my-logging-project"`, `"projects/01234567890"`. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ - public final Iterable listSinks(String projectName) { + public final PageAccessor listSinks(String projectName) { + PROJECT_PATH_TEMPLATE.validate(projectName); ListSinksRequest request = ListSinksRequest.newBuilder().setProjectName(projectName).build(); return listSinks(request); } @@ -210,10 +283,10 @@ public final Iterable listSinks(String projectName) { * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ - public final Iterable listSinks(ListSinksRequest request) { - return listSinksIterableCallable().call(request); + public final PageAccessor listSinks(ListSinksRequest request) { + return listSinksPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. @@ -222,10 +295,9 @@ public final Iterable listSinks(ListSinksRequest request) { * * * - * @throws ApiException if the remote call fails */ - public final ApiCallable> listSinksIterableCallable() { - return listSinksIterableCallable; + public final ApiCallable> listSinksPagedCallable() { + return listSinksPagedCallable; } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. @@ -234,7 +306,6 @@ public final ApiCallable> listSinksIterableC * * * - * @throws ApiException if the remote call fails */ public final ApiCallable listSinksCallable() { return listSinksCallable; @@ -251,11 +322,11 @@ public final ApiCallable listSinksCallable( * * @param sinkName The resource name of the sink to return. * Example: `"projects/my-project-id/sinks/my-sink-id"`. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public final LogSink getSink(String sinkName) { + SINK_PATH_TEMPLATE.validate(sinkName); GetSinkRequest request = GetSinkRequest.newBuilder().setSinkName(sinkName).build(); - return getSink(request); } @@ -267,7 +338,7 @@ public final LogSink getSink(String sinkName) { * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ private LogSink getSink(GetSinkRequest request) { return getSinkCallable().call(request); @@ -279,7 +350,6 @@ private LogSink getSink(GetSinkRequest request) { * * * - * @throws ApiException if the remote call fails */ public final ApiCallable getSinkCallable() { return getSinkCallable; @@ -300,12 +370,13 @@ public final ApiCallable getSinkCallable() { * The new sink must be provided in the request. * @param sink The new sink, which must not have an identifier that already * exists. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public final LogSink createSink(String projectName, LogSink sink) { + PROJECT_PATH_TEMPLATE.validate(projectName); + CreateSinkRequest request = CreateSinkRequest.newBuilder().setProjectName(projectName).setSink(sink).build(); - return createSink(request); } @@ -317,7 +388,7 @@ public final LogSink createSink(String projectName, LogSink sink) { * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public LogSink createSink(CreateSinkRequest request) { return createSinkCallable().call(request); @@ -329,7 +400,6 @@ public LogSink createSink(CreateSinkRequest request) { * * * - * @throws ApiException if the remote call fails */ public final ApiCallable createSinkCallable() { return createSinkCallable; @@ -353,12 +423,13 @@ public final ApiCallable createSinkCallable() { * @param sink The updated sink, whose name must be the same as the sink * identifier in `sinkName`. If `sinkName` does not exist, then * this method creates a new sink. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public final LogSink updateSink(String sinkName, LogSink sink) { + SINK_PATH_TEMPLATE.validate(sinkName); + UpdateSinkRequest request = UpdateSinkRequest.newBuilder().setSinkName(sinkName).setSink(sink).build(); - return updateSink(request); } @@ -370,7 +441,7 @@ public final LogSink updateSink(String sinkName, LogSink sink) { * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public LogSink updateSink(UpdateSinkRequest request) { return updateSinkCallable().call(request); @@ -382,7 +453,6 @@ public LogSink updateSink(UpdateSinkRequest request) { * * * - * @throws ApiException if the remote call fails */ public final ApiCallable updateSinkCallable() { return updateSinkCallable; @@ -399,11 +469,11 @@ public final ApiCallable updateSinkCallable() { * * @param sinkName The resource name of the sink to delete. * Example: `"projects/my-project-id/sinks/my-sink-id"`. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public final void deleteSink(String sinkName) { + SINK_PATH_TEMPLATE.validate(sinkName); DeleteSinkRequest request = DeleteSinkRequest.newBuilder().setSinkName(sinkName).build(); - deleteSink(request); } @@ -415,7 +485,7 @@ public final void deleteSink(String sinkName) { * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ private void deleteSink(DeleteSinkRequest request) { deleteSinkCallable().call(request); @@ -427,7 +497,6 @@ private void deleteSink(DeleteSinkRequest request) { * * * - * @throws ApiException if the remote call fails */ public final ApiCallable deleteSinkCallable() { return deleteSinkCallable; diff --git a/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Settings.java b/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Settings.java index 157f4b5d2427..9c1558fec565 100644 --- a/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Settings.java +++ b/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Settings.java @@ -40,6 +40,7 @@ import com.google.api.gax.grpc.PageStreamingDescriptor; import com.google.api.gax.grpc.ServiceApiSettings; import com.google.api.gax.grpc.SimpleCallSettings; +import com.google.auth.Credentials; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -57,12 +58,39 @@ import io.grpc.ManagedChannel; import io.grpc.Status; import java.io.IOException; +import java.util.List; import java.util.concurrent.ScheduledExecutorService; import org.joda.time.Duration; // Manually-added imports: add custom (non-generated) imports after this point. // AUTO-GENERATED DOCUMENTATION AND CLASS - see instructions at the top of the file for editing. +/** + * Settings class to configure an instance of {@link ConfigServiceV2Api}. + * + *

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

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

The builder of this class is recursive, so contained classes are themselves builders. + * When build() is called, the tree of builders is called to create the complete settings + * object. For example, to set the total timeout of ListSinks to 30 seconds: + * + *

+ * 
+ * ConfigServiceV2Settings.Builder configServiceV2SettingsBuilder =
+ *     ConfigServiceV2Settings.defaultBuilder();
+ * configServiceV2SettingsBuilder.ListSinksSettings().getRetrySettingsBuilder()
+ *     .setTotalTimeout(Duration.standardSeconds(30));
+ * ConfigServiceV2Settings configServiceV2Settings = configServiceV2SettingsBuilder.build();
+ * 
+ * 
+ */ @javax.annotation.Generated("by GAPIC") public class ConfigServiceV2Settings extends ServiceApiSettings { @@ -94,6 +122,16 @@ public class ConfigServiceV2Settings extends ServiceApiSettings { .add("https://www.googleapis.com/auth/cloud-platform") .build(); + /** + * The default connection settings of the service. + */ + public static final ConnectionSettings DEFAULT_CONNECTION_SETTINGS = + ConnectionSettings.newBuilder() + .setServiceAddress(DEFAULT_SERVICE_ADDRESS) + .setPort(DEFAULT_SERVICE_PORT) + .provideCredentialsWith(DEFAULT_SERVICE_SCOPES) + .build(); + private final PageStreamingCallSettings listSinksSettings; @@ -102,45 +140,67 @@ public class ConfigServiceV2Settings extends ServiceApiSettings { private final SimpleCallSettings updateSinkSettings; private final SimpleCallSettings deleteSinkSettings; + /** + * Returns the object with the settings used for calls to listSinks. + */ public PageStreamingCallSettings listSinksSettings() { return listSinksSettings; } + /** + * Returns the object with the settings used for calls to getSink. + */ public SimpleCallSettings getSinkSettings() { return getSinkSettings; } + /** + * Returns the object with the settings used for calls to createSink. + */ public SimpleCallSettings createSinkSettings() { return createSinkSettings; } + /** + * Returns the object with the settings used for calls to updateSink. + */ public SimpleCallSettings updateSinkSettings() { return updateSinkSettings; } + /** + * Returns the object with the settings used for calls to deleteSink. + */ public SimpleCallSettings deleteSinkSettings() { return deleteSinkSettings; } - public static ConfigServiceV2Settings defaultInstance() throws IOException { - return newBuilder().build(); + /** + * Returns a builder for this class with recommended defaults. + */ + public static Builder defaultBuilder() { + return Builder.createDefault(); } + /** + * Returns a new builder for this class. + */ public static Builder newBuilder() { return new Builder(); } + /** + * Returns a builder containing all the values of this settings class. + */ public Builder toBuilder() { return new Builder(this); } private ConfigServiceV2Settings(Builder settingsBuilder) throws IOException { super( - settingsBuilder.getOrBuildChannel(), - settingsBuilder.shouldAutoCloseChannel(), - settingsBuilder.getOrBuildExecutor(), - settingsBuilder.getConnectionSettings(), + settingsBuilder.getChannelProvider(), + settingsBuilder.getExecutorProvider(), settingsBuilder.getGeneratorName(), settingsBuilder.getGeneratorVersion(), settingsBuilder.getClientLibName(), @@ -177,6 +237,9 @@ public Iterable extractResources(ListSinksResponse payload) { } }; + /** + * Builder for ConfigServiceV2Settings. + */ public static class Builder extends ServiceApiSettings.Builder { private final ImmutableList methodSettingsBuilders; @@ -219,38 +282,19 @@ public static class Builder extends ServiceApiSettings.Builder { } private Builder() { - super( - ConnectionSettings.builder() - .setServiceAddress(DEFAULT_SERVICE_ADDRESS) - .setPort(DEFAULT_SERVICE_PORT) - .provideCredentialsWith(DEFAULT_SERVICE_SCOPES) - .build()); + super(DEFAULT_CONNECTION_SETTINGS); listSinksSettings = PageStreamingCallSettings.newBuilder( - ConfigServiceV2Grpc.METHOD_LIST_SINKS, LIST_SINKS_PAGE_STR_DESC) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); - - getSinkSettings = - SimpleCallSettings.newBuilder(ConfigServiceV2Grpc.METHOD_GET_SINK) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); - - createSinkSettings = - SimpleCallSettings.newBuilder(ConfigServiceV2Grpc.METHOD_CREATE_SINK) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); - - updateSinkSettings = - SimpleCallSettings.newBuilder(ConfigServiceV2Grpc.METHOD_UPDATE_SINK) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); - - deleteSinkSettings = - SimpleCallSettings.newBuilder(ConfigServiceV2Grpc.METHOD_DELETE_SINK) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + ConfigServiceV2Grpc.METHOD_LIST_SINKS, LIST_SINKS_PAGE_STR_DESC); + + getSinkSettings = SimpleCallSettings.newBuilder(ConfigServiceV2Grpc.METHOD_GET_SINK); + + createSinkSettings = SimpleCallSettings.newBuilder(ConfigServiceV2Grpc.METHOD_CREATE_SINK); + + updateSinkSettings = SimpleCallSettings.newBuilder(ConfigServiceV2Grpc.METHOD_UPDATE_SINK); + + deleteSinkSettings = SimpleCallSettings.newBuilder(ConfigServiceV2Grpc.METHOD_DELETE_SINK); methodSettingsBuilders = ImmutableList.of( @@ -261,6 +305,36 @@ private Builder() { deleteSinkSettings); } + private static Builder createDefault() { + Builder builder = new Builder(); + builder + .listSinksSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getSinkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .createSinkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .updateSinkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .deleteSinkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + return builder; + } + private Builder(ConfigServiceV2Settings settings) { super(settings); @@ -279,6 +353,17 @@ private Builder(ConfigServiceV2Settings settings) { deleteSinkSettings); } + @Override + protected ConnectionSettings getDefaultConnectionSettings() { + return DEFAULT_CONNECTION_SETTINGS; + } + + @Override + public Builder provideExecutorWith(ScheduledExecutorService executor, boolean shouldAutoClose) { + super.provideExecutorWith(executor, shouldAutoClose); + return this; + } + @Override public Builder provideChannelWith(ManagedChannel channel, boolean shouldAutoClose) { super.provideChannelWith(channel, shouldAutoClose); @@ -292,8 +377,14 @@ public Builder provideChannelWith(ConnectionSettings settings) { } @Override - public Builder setExecutor(ScheduledExecutorService executor) { - super.setExecutor(executor); + public Builder provideChannelWith(Credentials credentials) { + super.provideChannelWith(credentials); + return this; + } + + @Override + public Builder provideChannelWith(List scopes) { + super.provideChannelWith(scopes); return this; } @@ -309,28 +400,48 @@ public Builder setClientLibHeader(String name, String version) { return this; } + /** + * Applies the given settings to all of the API methods in this service. Only + * values that are non-null will be applied, so this method is not capable + * of un-setting any values. + */ public Builder applyToAllApiMethods(ApiCallSettings.Builder apiCallSettings) throws Exception { super.applyToAllApiMethods(methodSettingsBuilders, apiCallSettings); return this; } + /** + * Returns the builder for the settings used for calls to listSinks. + */ public PageStreamingCallSettings.Builder listSinksSettings() { return listSinksSettings; } + /** + * Returns the builder for the settings used for calls to getSink. + */ public SimpleCallSettings.Builder getSinkSettings() { return getSinkSettings; } + /** + * Returns the builder for the settings used for calls to createSink. + */ public SimpleCallSettings.Builder createSinkSettings() { return createSinkSettings; } + /** + * Returns the builder for the settings used for calls to updateSink. + */ public SimpleCallSettings.Builder updateSinkSettings() { return updateSinkSettings; } + /** + * Returns the builder for the settings used for calls to deleteSink. + */ public SimpleCallSettings.Builder deleteSinkSettings() { return deleteSinkSettings; } diff --git a/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Api.java b/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Api.java index ead7c1b886aa..abe8820eb463 100644 --- a/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Api.java +++ b/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Api.java @@ -35,6 +35,7 @@ import com.google.api.MonitoredResource; import com.google.api.MonitoredResourceDescriptor; +import com.google.api.gax.core.PageAccessor; import com.google.api.gax.grpc.ApiCallable; import com.google.api.gax.protobuf.PathTemplate; import com.google.logging.v2.DeleteLogRequest; @@ -52,6 +53,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.concurrent.ScheduledExecutorService; // Manually-added imports: add custom (non-generated) imports after this point. @@ -59,32 +61,86 @@ /** * Service Description: Service for ingesting and querying logs. * + *

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

+ * 
+ * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+ *   String logName = "";
+ *   loggingServiceV2Api.deleteLog(logName);
+ * }
+ * 
+ * 
+ * + *

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

The surface of this class includes several types of Java methods for each of the API's methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available + * as parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request + * object, which must be constructed before the call. Not every API method will have a request + * object method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable + * ApiCallable object, which can be used to initiate calls to the service. + *
+ * + *

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

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

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

+ * 
+ * LoggingServiceV2Settings loggingServiceV2Settings = LoggingServiceV2Settings.defaultBuilder()
+ *     .provideChannelWith(myCredentials)
+ *     .build();
+ * LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.create(loggingServiceV2Settings);
+ * 
+ * 
+ * * * */ @javax.annotation.Generated("by GAPIC") public class LoggingServiceV2Api implements AutoCloseable { + private final LoggingServiceV2Settings settings; private final ManagedChannel channel; + private final ScheduledExecutorService executor; private final List closeables = new ArrayList<>(); private final ApiCallable deleteLogCallable; private final ApiCallable writeLogEntriesCallable; private final ApiCallable listLogEntriesCallable; - private final ApiCallable> - listLogEntriesIterableCallable; + private final ApiCallable> + listLogEntriesPagedCallable; private final ApiCallable< ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsResponse> listMonitoredResourceDescriptorsCallable; private final ApiCallable< - ListMonitoredResourceDescriptorsRequest, Iterable> - listMonitoredResourceDescriptorsIterableCallable; + ListMonitoredResourceDescriptorsRequest, PageAccessor> + listMonitoredResourceDescriptorsPagedCallable; + + public final LoggingServiceV2Settings getSettings() { + return settings; + } private static final PathTemplate PROJECT_PATH_TEMPLATE = - PathTemplate.create("projects/{project}"); + PathTemplate.createWithoutUrlEncoding("projects/{project}"); private static final PathTemplate LOG_PATH_TEMPLATE = - PathTemplate.create("projects/{project}/logs/{log}"); + PathTemplate.createWithoutUrlEncoding("projects/{project}/logs/{log}"); /** * Formats a string containing the fully-qualified path to represent @@ -147,8 +203,8 @@ public static final String parseLogFromLogName(String logName) { * * */ - public static final LoggingServiceV2Api defaultInstance() throws IOException { - return create(LoggingServiceV2Settings.defaultInstance()); + public static final LoggingServiceV2Api createWithDefaults() throws IOException { + return create(LoggingServiceV2Settings.defaultBuilder().build()); } /** @@ -173,19 +229,27 @@ public static final LoggingServiceV2Api create(LoggingServiceV2Settings settings * */ protected LoggingServiceV2Api(LoggingServiceV2Settings settings) throws IOException { - this.channel = settings.getChannel(); - - this.deleteLogCallable = ApiCallable.create(settings.deleteLogSettings(), settings); - this.writeLogEntriesCallable = ApiCallable.create(settings.writeLogEntriesSettings(), settings); - this.listLogEntriesCallable = ApiCallable.create(settings.listLogEntriesSettings(), settings); - this.listLogEntriesIterableCallable = - ApiCallable.createIterable(settings.listLogEntriesSettings(), settings); + this.settings = settings; + this.executor = settings.getExecutorProvider().getOrBuildExecutor(); + this.channel = settings.getChannelProvider().getOrBuildChannel(this.executor); + + this.deleteLogCallable = + ApiCallable.create(settings.deleteLogSettings(), this.channel, this.executor); + this.writeLogEntriesCallable = + ApiCallable.create(settings.writeLogEntriesSettings(), this.channel, this.executor); + this.listLogEntriesCallable = + ApiCallable.create(settings.listLogEntriesSettings(), this.channel, this.executor); + this.listLogEntriesPagedCallable = + ApiCallable.createPagedVariant( + settings.listLogEntriesSettings(), this.channel, this.executor); this.listMonitoredResourceDescriptorsCallable = - ApiCallable.create(settings.listMonitoredResourceDescriptorsSettings(), settings); - this.listMonitoredResourceDescriptorsIterableCallable = - ApiCallable.createIterable(settings.listMonitoredResourceDescriptorsSettings(), settings); + ApiCallable.create( + settings.listMonitoredResourceDescriptorsSettings(), this.channel, this.executor); + this.listMonitoredResourceDescriptorsPagedCallable = + ApiCallable.createPagedVariant( + settings.listMonitoredResourceDescriptorsSettings(), this.channel, this.executor); - if (settings.shouldAutoCloseChannel()) { + if (settings.getChannelProvider().shouldAutoClose()) { closeables.add( new Closeable() { @Override @@ -194,6 +258,15 @@ public void close() throws IOException { } }); } + if (settings.getExecutorProvider().shouldAutoClose()) { + closeables.add( + new Closeable() { + @Override + public void close() throws IOException { + executor.shutdown(); + } + }); + } } // ----- deleteLog ----- @@ -208,11 +281,11 @@ public void close() throws IOException { * * @param logName Required. The resource name of the log to delete. Example: * `"projects/my-project/logs/syslog"`. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public final void deleteLog(String logName) { + LOG_PATH_TEMPLATE.validate(logName); DeleteLogRequest request = DeleteLogRequest.newBuilder().setLogName(logName).build(); - deleteLog(request); } @@ -225,7 +298,7 @@ public final void deleteLog(String logName) { * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ private void deleteLog(DeleteLogRequest request) { deleteLogCallable().call(request); @@ -238,7 +311,6 @@ private void deleteLog(DeleteLogRequest request) { * * * - * @throws ApiException if the remote call fails */ public final ApiCallable deleteLogCallable() { return deleteLogCallable; @@ -266,13 +338,15 @@ public final ApiCallable deleteLogCallable() { * Example: `{ "size": "large", "color":"red" }` * @param entries Required. The log entries to write. The log entries must have values for * all required fields. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public final WriteLogEntriesResponse writeLogEntries( String logName, MonitoredResource resource, Map labels, List entries) { + LOG_PATH_TEMPLATE.validate(logName); + WriteLogEntriesRequest request = WriteLogEntriesRequest.newBuilder() .setLogName(logName) @@ -280,7 +354,6 @@ public final WriteLogEntriesResponse writeLogEntries( .putAllLabels(labels) .addAllEntries(entries) .build(); - return writeLogEntries(request); } @@ -293,7 +366,7 @@ public final WriteLogEntriesResponse writeLogEntries( * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest request) { return writeLogEntriesCallable().call(request); @@ -306,7 +379,6 @@ public WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest request) { * * * - * @throws ApiException if the remote call fails */ public final ApiCallable writeLogEntriesCallable() { @@ -336,10 +408,11 @@ public WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest request) { * `LogEntry.timestamp` (oldest first), and the second option returns entries * in order of decreasing timestamps (newest first). Entries with equal * timestamps are returned in order of `LogEntry.insertId`. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ - public final Iterable listLogEntries( + public final PageAccessor listLogEntries( List projectIds, String filter, String orderBy) { + ListLogEntriesRequest request = ListLogEntriesRequest.newBuilder() .addAllProjectIds(projectIds) @@ -359,10 +432,10 @@ public final Iterable listLogEntries( * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ - public final Iterable listLogEntries(ListLogEntriesRequest request) { - return listLogEntriesIterableCallable().call(request); + public final PageAccessor listLogEntries(ListLogEntriesRequest request) { + return listLogEntriesPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. @@ -373,11 +446,10 @@ public final Iterable listLogEntries(ListLogEntriesRequest request) { * * * - * @throws ApiException if the remote call fails */ - public final ApiCallable> - listLogEntriesIterableCallable() { - return listLogEntriesIterableCallable; + public final ApiCallable> + listLogEntriesPagedCallable() { + return listLogEntriesPagedCallable; } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. @@ -388,7 +460,6 @@ public final Iterable listLogEntries(ListLogEntriesRequest request) { * * * - * @throws ApiException if the remote call fails */ public final ApiCallable listLogEntriesCallable() { return listLogEntriesCallable; @@ -404,11 +475,11 @@ public final ApiCallable listLogE * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ - public final Iterable listMonitoredResourceDescriptors( + public final PageAccessor listMonitoredResourceDescriptors( ListMonitoredResourceDescriptorsRequest request) { - return listMonitoredResourceDescriptorsIterableCallable().call(request); + return listMonitoredResourceDescriptorsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. @@ -417,12 +488,11 @@ public final Iterable listMonitoredResourceDescript * * * - * @throws ApiException if the remote call fails */ public final ApiCallable< - ListMonitoredResourceDescriptorsRequest, Iterable> - listMonitoredResourceDescriptorsIterableCallable() { - return listMonitoredResourceDescriptorsIterableCallable; + ListMonitoredResourceDescriptorsRequest, PageAccessor> + listMonitoredResourceDescriptorsPagedCallable() { + return listMonitoredResourceDescriptorsPagedCallable; } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. @@ -431,7 +501,6 @@ public final Iterable listMonitoredResourceDescript * * * - * @throws ApiException if the remote call fails */ public final ApiCallable< ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsResponse> diff --git a/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Settings.java b/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Settings.java index da6ae99fd9a7..c37e5c4ad305 100644 --- a/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Settings.java +++ b/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Settings.java @@ -41,6 +41,7 @@ import com.google.api.gax.grpc.PageStreamingDescriptor; import com.google.api.gax.grpc.ServiceApiSettings; import com.google.api.gax.grpc.SimpleCallSettings; +import com.google.auth.Credentials; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -59,12 +60,39 @@ import io.grpc.ManagedChannel; import io.grpc.Status; import java.io.IOException; +import java.util.List; import java.util.concurrent.ScheduledExecutorService; import org.joda.time.Duration; // Manually-added imports: add custom (non-generated) imports after this point. // AUTO-GENERATED DOCUMENTATION AND CLASS - see instructions at the top of the file for editing. +/** + * Settings class to configure an instance of {@link LoggingServiceV2Api}. + * + *

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

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

The builder of this class is recursive, so contained classes are themselves builders. + * When build() is called, the tree of builders is called to create the complete settings + * object. For example, to set the total timeout of DeleteLog to 30 seconds: + * + *

+ * 
+ * LoggingServiceV2Settings.Builder loggingServiceV2SettingsBuilder =
+ *     LoggingServiceV2Settings.defaultBuilder();
+ * loggingServiceV2SettingsBuilder.DeleteLogSettings().getRetrySettingsBuilder()
+ *     .setTotalTimeout(Duration.standardSeconds(30));
+ * LoggingServiceV2Settings loggingServiceV2Settings = loggingServiceV2SettingsBuilder.build();
+ * 
+ * 
+ */ @javax.annotation.Generated("by GAPIC") public class LoggingServiceV2Settings extends ServiceApiSettings { @@ -96,6 +124,16 @@ public class LoggingServiceV2Settings extends ServiceApiSettings { .add("https://www.googleapis.com/auth/cloud-platform") .build(); + /** + * The default connection settings of the service. + */ + public static final ConnectionSettings DEFAULT_CONNECTION_SETTINGS = + ConnectionSettings.newBuilder() + .setServiceAddress(DEFAULT_SERVICE_ADDRESS) + .setPort(DEFAULT_SERVICE_PORT) + .provideCredentialsWith(DEFAULT_SERVICE_SCOPES) + .build(); + private final SimpleCallSettings deleteLogSettings; private final SimpleCallSettings writeLogEntriesSettings; @@ -107,20 +145,32 @@ public class LoggingServiceV2Settings extends ServiceApiSettings { MonitoredResourceDescriptor> listMonitoredResourceDescriptorsSettings; + /** + * Returns the object with the settings used for calls to deleteLog. + */ public SimpleCallSettings deleteLogSettings() { return deleteLogSettings; } + /** + * Returns the object with the settings used for calls to writeLogEntries. + */ public SimpleCallSettings writeLogEntriesSettings() { return writeLogEntriesSettings; } + /** + * Returns the object with the settings used for calls to listLogEntries. + */ public PageStreamingCallSettings listLogEntriesSettings() { return listLogEntriesSettings; } + /** + * Returns the object with the settings used for calls to listMonitoredResourceDescriptors. + */ public PageStreamingCallSettings< ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> @@ -128,24 +178,31 @@ public SimpleCallSettings deleteLogSettings() { return listMonitoredResourceDescriptorsSettings; } - public static LoggingServiceV2Settings defaultInstance() throws IOException { - return newBuilder().build(); + /** + * Returns a builder for this class with recommended defaults. + */ + public static Builder defaultBuilder() { + return Builder.createDefault(); } + /** + * Returns a new builder for this class. + */ public static Builder newBuilder() { return new Builder(); } + /** + * Returns a builder containing all the values of this settings class. + */ public Builder toBuilder() { return new Builder(this); } private LoggingServiceV2Settings(Builder settingsBuilder) throws IOException { super( - settingsBuilder.getOrBuildChannel(), - settingsBuilder.shouldAutoCloseChannel(), - settingsBuilder.getOrBuildExecutor(), - settingsBuilder.getConnectionSettings(), + settingsBuilder.getChannelProvider(), + settingsBuilder.getExecutorProvider(), settingsBuilder.getGeneratorName(), settingsBuilder.getGeneratorVersion(), settingsBuilder.getClientLibName(), @@ -214,6 +271,9 @@ public Iterable extractResources( } }; + /** + * Builder for LoggingServiceV2Settings. + */ public static class Builder extends ServiceApiSettings.Builder { private final ImmutableList methodSettingsBuilders; @@ -270,35 +330,21 @@ public static class Builder extends ServiceApiSettings.Builder { } private Builder() { - super( - ConnectionSettings.builder() - .setServiceAddress(DEFAULT_SERVICE_ADDRESS) - .setPort(DEFAULT_SERVICE_PORT) - .provideCredentialsWith(DEFAULT_SERVICE_SCOPES) - .build()); - - deleteLogSettings = - SimpleCallSettings.newBuilder(LoggingServiceV2Grpc.METHOD_DELETE_LOG) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + super(DEFAULT_CONNECTION_SETTINGS); + + deleteLogSettings = SimpleCallSettings.newBuilder(LoggingServiceV2Grpc.METHOD_DELETE_LOG); writeLogEntriesSettings = - SimpleCallSettings.newBuilder(LoggingServiceV2Grpc.METHOD_WRITE_LOG_ENTRIES) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + SimpleCallSettings.newBuilder(LoggingServiceV2Grpc.METHOD_WRITE_LOG_ENTRIES); listLogEntriesSettings = PageStreamingCallSettings.newBuilder( - LoggingServiceV2Grpc.METHOD_LIST_LOG_ENTRIES, LIST_LOG_ENTRIES_PAGE_STR_DESC) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("list")); + LoggingServiceV2Grpc.METHOD_LIST_LOG_ENTRIES, LIST_LOG_ENTRIES_PAGE_STR_DESC); listMonitoredResourceDescriptorsSettings = PageStreamingCallSettings.newBuilder( - LoggingServiceV2Grpc.METHOD_LIST_MONITORED_RESOURCE_DESCRIPTORS, - LIST_MONITORED_RESOURCE_DESCRIPTORS_PAGE_STR_DESC) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + LoggingServiceV2Grpc.METHOD_LIST_MONITORED_RESOURCE_DESCRIPTORS, + LIST_MONITORED_RESOURCE_DESCRIPTORS_PAGE_STR_DESC); methodSettingsBuilders = ImmutableList.of( @@ -308,6 +354,31 @@ private Builder() { listMonitoredResourceDescriptorsSettings); } + private static Builder createDefault() { + Builder builder = new Builder(); + builder + .deleteLogSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .writeLogEntriesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listLogEntriesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("list")); + + builder + .listMonitoredResourceDescriptorsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + return builder; + } + private Builder(LoggingServiceV2Settings settings) { super(settings); @@ -325,6 +396,17 @@ private Builder(LoggingServiceV2Settings settings) { listMonitoredResourceDescriptorsSettings); } + @Override + protected ConnectionSettings getDefaultConnectionSettings() { + return DEFAULT_CONNECTION_SETTINGS; + } + + @Override + public Builder provideExecutorWith(ScheduledExecutorService executor, boolean shouldAutoClose) { + super.provideExecutorWith(executor, shouldAutoClose); + return this; + } + @Override public Builder provideChannelWith(ManagedChannel channel, boolean shouldAutoClose) { super.provideChannelWith(channel, shouldAutoClose); @@ -338,8 +420,14 @@ public Builder provideChannelWith(ConnectionSettings settings) { } @Override - public Builder setExecutor(ScheduledExecutorService executor) { - super.setExecutor(executor); + public Builder provideChannelWith(Credentials credentials) { + super.provideChannelWith(credentials); + return this; + } + + @Override + public Builder provideChannelWith(List scopes) { + super.provideChannelWith(scopes); return this; } @@ -355,26 +443,43 @@ public Builder setClientLibHeader(String name, String version) { return this; } + /** + * Applies the given settings to all of the API methods in this service. Only + * values that are non-null will be applied, so this method is not capable + * of un-setting any values. + */ public Builder applyToAllApiMethods(ApiCallSettings.Builder apiCallSettings) throws Exception { super.applyToAllApiMethods(methodSettingsBuilders, apiCallSettings); return this; } + /** + * Returns the builder for the settings used for calls to deleteLog. + */ public SimpleCallSettings.Builder deleteLogSettings() { return deleteLogSettings; } + /** + * Returns the builder for the settings used for calls to writeLogEntries. + */ public SimpleCallSettings.Builder writeLogEntriesSettings() { return writeLogEntriesSettings; } + /** + * Returns the builder for the settings used for calls to listLogEntries. + */ public PageStreamingCallSettings.Builder< ListLogEntriesRequest, ListLogEntriesResponse, LogEntry> listLogEntriesSettings() { return listLogEntriesSettings; } + /** + * Returns the builder for the settings used for calls to listMonitoredResourceDescriptors. + */ public PageStreamingCallSettings.Builder< ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> diff --git a/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Api.java b/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Api.java index a5f2306577b2..765197054e52 100644 --- a/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Api.java +++ b/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Api.java @@ -33,6 +33,7 @@ package com.google.cloud.logging.spi.v2; +import com.google.api.gax.core.PageAccessor; import com.google.api.gax.grpc.ApiCallable; import com.google.api.gax.protobuf.PathTemplate; import com.google.logging.v2.CreateLogMetricRequest; @@ -48,6 +49,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; +import java.util.concurrent.ScheduledExecutorService; // Manually-added imports: add custom (non-generated) imports after this point. @@ -55,27 +57,81 @@ /** * Service Description: * + *

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

+ * 
+ * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+ *   String projectName = "";
+ *   ListLogMetricsResponse response = metricsServiceV2Api.listLogMetrics(projectName);
+ * }
+ * 
+ * 
+ * + *

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

The surface of this class includes several types of Java methods for each of the API's methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available + * as parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request + * object, which must be constructed before the call. Not every API method will have a request + * object method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable + * ApiCallable object, which can be used to initiate calls to the service. + *
+ * + *

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

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

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

+ * 
+ * MetricsServiceV2Settings metricsServiceV2Settings = MetricsServiceV2Settings.defaultBuilder()
+ *     .provideChannelWith(myCredentials)
+ *     .build();
+ * MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.create(metricsServiceV2Settings);
+ * 
+ * 
+ * * * */ @javax.annotation.Generated("by GAPIC") public class MetricsServiceV2Api implements AutoCloseable { + private final MetricsServiceV2Settings settings; private final ManagedChannel channel; + private final ScheduledExecutorService executor; private final List closeables = new ArrayList<>(); private final ApiCallable listLogMetricsCallable; - private final ApiCallable> - listLogMetricsIterableCallable; + private final ApiCallable> + listLogMetricsPagedCallable; private final ApiCallable getLogMetricCallable; private final ApiCallable createLogMetricCallable; private final ApiCallable updateLogMetricCallable; private final ApiCallable deleteLogMetricCallable; + public final MetricsServiceV2Settings getSettings() { + return settings; + } + private static final PathTemplate PROJECT_PATH_TEMPLATE = - PathTemplate.create("projects/{project}"); + PathTemplate.createWithoutUrlEncoding("projects/{project}"); private static final PathTemplate METRIC_PATH_TEMPLATE = - PathTemplate.create("projects/{project}/metrics/{metric}"); + PathTemplate.createWithoutUrlEncoding("projects/{project}/metrics/{metric}"); /** * Formats a string containing the fully-qualified path to represent @@ -138,8 +194,8 @@ public static final String parseMetricFromMetricName(String metricName) { * * */ - public static final MetricsServiceV2Api defaultInstance() throws IOException { - return create(MetricsServiceV2Settings.defaultInstance()); + public static final MetricsServiceV2Api createWithDefaults() throws IOException { + return create(MetricsServiceV2Settings.defaultBuilder().build()); } /** @@ -164,17 +220,25 @@ public static final MetricsServiceV2Api create(MetricsServiceV2Settings settings * */ protected MetricsServiceV2Api(MetricsServiceV2Settings settings) throws IOException { - this.channel = settings.getChannel(); - - this.listLogMetricsCallable = ApiCallable.create(settings.listLogMetricsSettings(), settings); - this.listLogMetricsIterableCallable = - ApiCallable.createIterable(settings.listLogMetricsSettings(), settings); - this.getLogMetricCallable = ApiCallable.create(settings.getLogMetricSettings(), settings); - this.createLogMetricCallable = ApiCallable.create(settings.createLogMetricSettings(), settings); - this.updateLogMetricCallable = ApiCallable.create(settings.updateLogMetricSettings(), settings); - this.deleteLogMetricCallable = ApiCallable.create(settings.deleteLogMetricSettings(), settings); - - if (settings.shouldAutoCloseChannel()) { + this.settings = settings; + this.executor = settings.getExecutorProvider().getOrBuildExecutor(); + this.channel = settings.getChannelProvider().getOrBuildChannel(this.executor); + + this.listLogMetricsCallable = + ApiCallable.create(settings.listLogMetricsSettings(), this.channel, this.executor); + this.listLogMetricsPagedCallable = + ApiCallable.createPagedVariant( + settings.listLogMetricsSettings(), this.channel, this.executor); + this.getLogMetricCallable = + ApiCallable.create(settings.getLogMetricSettings(), this.channel, this.executor); + this.createLogMetricCallable = + ApiCallable.create(settings.createLogMetricSettings(), this.channel, this.executor); + this.updateLogMetricCallable = + ApiCallable.create(settings.updateLogMetricSettings(), this.channel, this.executor); + this.deleteLogMetricCallable = + ApiCallable.create(settings.deleteLogMetricSettings(), this.channel, this.executor); + + if (settings.getChannelProvider().shouldAutoClose()) { closeables.add( new Closeable() { @Override @@ -183,6 +247,15 @@ public void close() throws IOException { } }); } + if (settings.getExecutorProvider().shouldAutoClose()) { + closeables.add( + new Closeable() { + @Override + public void close() throws IOException { + executor.shutdown(); + } + }); + } } // ----- listLogMetrics ----- @@ -196,9 +269,10 @@ public void close() throws IOException { * * @param projectName Required. The resource name of the project containing the metrics. * Example: `"projects/my-project-id"`. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ - public final Iterable listLogMetrics(String projectName) { + public final PageAccessor listLogMetrics(String projectName) { + PROJECT_PATH_TEMPLATE.validate(projectName); ListLogMetricsRequest request = ListLogMetricsRequest.newBuilder().setProjectName(projectName).build(); return listLogMetrics(request); @@ -212,10 +286,10 @@ public final Iterable listLogMetrics(String projectName) { * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ - public final Iterable listLogMetrics(ListLogMetricsRequest request) { - return listLogMetricsIterableCallable().call(request); + public final PageAccessor listLogMetrics(ListLogMetricsRequest request) { + return listLogMetricsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. @@ -224,11 +298,10 @@ public final Iterable listLogMetrics(ListLogMetricsRequest request) { * * * - * @throws ApiException if the remote call fails */ - public final ApiCallable> - listLogMetricsIterableCallable() { - return listLogMetricsIterableCallable; + public final ApiCallable> + listLogMetricsPagedCallable() { + return listLogMetricsPagedCallable; } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. @@ -237,7 +310,6 @@ public final Iterable listLogMetrics(ListLogMetricsRequest request) { * * * - * @throws ApiException if the remote call fails */ public final ApiCallable listLogMetricsCallable() { return listLogMetricsCallable; @@ -254,12 +326,12 @@ public final ApiCallable listLogM * * @param metricName The resource name of the desired metric. * Example: `"projects/my-project-id/metrics/my-metric-id"`. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public final LogMetric getLogMetric(String metricName) { + METRIC_PATH_TEMPLATE.validate(metricName); GetLogMetricRequest request = GetLogMetricRequest.newBuilder().setMetricName(metricName).build(); - return getLogMetric(request); } @@ -271,7 +343,7 @@ public final LogMetric getLogMetric(String metricName) { * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ private LogMetric getLogMetric(GetLogMetricRequest request) { return getLogMetricCallable().call(request); @@ -283,7 +355,6 @@ private LogMetric getLogMetric(GetLogMetricRequest request) { * * * - * @throws ApiException if the remote call fails */ public final ApiCallable getLogMetricCallable() { return getLogMetricCallable; @@ -304,12 +375,13 @@ public final ApiCallable getLogMetricCallable() * The new metric must be provided in the request. * @param metric The new logs-based metric, which must not have an identifier that * already exists. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public final LogMetric createLogMetric(String projectName, LogMetric metric) { + PROJECT_PATH_TEMPLATE.validate(projectName); + CreateLogMetricRequest request = CreateLogMetricRequest.newBuilder().setProjectName(projectName).setMetric(metric).build(); - return createLogMetric(request); } @@ -321,7 +393,7 @@ public final LogMetric createLogMetric(String projectName, LogMetric metric) { * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public LogMetric createLogMetric(CreateLogMetricRequest request) { return createLogMetricCallable().call(request); @@ -333,7 +405,6 @@ public LogMetric createLogMetric(CreateLogMetricRequest request) { * * * - * @throws ApiException if the remote call fails */ public final ApiCallable createLogMetricCallable() { return createLogMetricCallable; @@ -357,12 +428,13 @@ public final ApiCallable createLogMetricCalla * @param metric The updated metric, whose name must be the same as the * metric identifier in `metricName`. If `metricName` does not * exist, then a new metric is created. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public final LogMetric updateLogMetric(String metricName, LogMetric metric) { + METRIC_PATH_TEMPLATE.validate(metricName); + UpdateLogMetricRequest request = UpdateLogMetricRequest.newBuilder().setMetricName(metricName).setMetric(metric).build(); - return updateLogMetric(request); } @@ -374,7 +446,7 @@ public final LogMetric updateLogMetric(String metricName, LogMetric metric) { * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public LogMetric updateLogMetric(UpdateLogMetricRequest request) { return updateLogMetricCallable().call(request); @@ -386,7 +458,6 @@ public LogMetric updateLogMetric(UpdateLogMetricRequest request) { * * * - * @throws ApiException if the remote call fails */ public final ApiCallable updateLogMetricCallable() { return updateLogMetricCallable; @@ -403,12 +474,12 @@ public final ApiCallable updateLogMetricCalla * * @param metricName The resource name of the metric to delete. * Example: `"projects/my-project-id/metrics/my-metric-id"`. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public final void deleteLogMetric(String metricName) { + METRIC_PATH_TEMPLATE.validate(metricName); DeleteLogMetricRequest request = DeleteLogMetricRequest.newBuilder().setMetricName(metricName).build(); - deleteLogMetric(request); } @@ -420,7 +491,7 @@ public final void deleteLogMetric(String metricName) { * * * @param request The request object containing all of the parameters for the API call. - * @throws ApiException if the remote call fails + * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ private void deleteLogMetric(DeleteLogMetricRequest request) { deleteLogMetricCallable().call(request); @@ -432,7 +503,6 @@ private void deleteLogMetric(DeleteLogMetricRequest request) { * * * - * @throws ApiException if the remote call fails */ public final ApiCallable deleteLogMetricCallable() { return deleteLogMetricCallable; diff --git a/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Settings.java b/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Settings.java index 316a9851bf11..1308b95eb029 100644 --- a/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Settings.java +++ b/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Settings.java @@ -40,6 +40,7 @@ import com.google.api.gax.grpc.PageStreamingDescriptor; import com.google.api.gax.grpc.ServiceApiSettings; import com.google.api.gax.grpc.SimpleCallSettings; +import com.google.auth.Credentials; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -57,12 +58,39 @@ import io.grpc.ManagedChannel; import io.grpc.Status; import java.io.IOException; +import java.util.List; import java.util.concurrent.ScheduledExecutorService; import org.joda.time.Duration; // Manually-added imports: add custom (non-generated) imports after this point. // AUTO-GENERATED DOCUMENTATION AND CLASS - see instructions at the top of the file for editing. +/** + * Settings class to configure an instance of {@link MetricsServiceV2Api}. + * + *

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

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

The builder of this class is recursive, so contained classes are themselves builders. + * When build() is called, the tree of builders is called to create the complete settings + * object. For example, to set the total timeout of ListLogMetrics to 30 seconds: + * + *

+ * 
+ * MetricsServiceV2Settings.Builder metricsServiceV2SettingsBuilder =
+ *     MetricsServiceV2Settings.defaultBuilder();
+ * metricsServiceV2SettingsBuilder.ListLogMetricsSettings().getRetrySettingsBuilder()
+ *     .setTotalTimeout(Duration.standardSeconds(30));
+ * MetricsServiceV2Settings metricsServiceV2Settings = metricsServiceV2SettingsBuilder.build();
+ * 
+ * 
+ */ @javax.annotation.Generated("by GAPIC") public class MetricsServiceV2Settings extends ServiceApiSettings { @@ -94,6 +122,16 @@ public class MetricsServiceV2Settings extends ServiceApiSettings { .add("https://www.googleapis.com/auth/cloud-platform") .build(); + /** + * The default connection settings of the service. + */ + public static final ConnectionSettings DEFAULT_CONNECTION_SETTINGS = + ConnectionSettings.newBuilder() + .setServiceAddress(DEFAULT_SERVICE_ADDRESS) + .setPort(DEFAULT_SERVICE_PORT) + .provideCredentialsWith(DEFAULT_SERVICE_SCOPES) + .build(); + private final PageStreamingCallSettings listLogMetricsSettings; @@ -102,45 +140,67 @@ public class MetricsServiceV2Settings extends ServiceApiSettings { private final SimpleCallSettings updateLogMetricSettings; private final SimpleCallSettings deleteLogMetricSettings; + /** + * Returns the object with the settings used for calls to listLogMetrics. + */ public PageStreamingCallSettings listLogMetricsSettings() { return listLogMetricsSettings; } + /** + * Returns the object with the settings used for calls to getLogMetric. + */ public SimpleCallSettings getLogMetricSettings() { return getLogMetricSettings; } + /** + * Returns the object with the settings used for calls to createLogMetric. + */ public SimpleCallSettings createLogMetricSettings() { return createLogMetricSettings; } + /** + * Returns the object with the settings used for calls to updateLogMetric. + */ public SimpleCallSettings updateLogMetricSettings() { return updateLogMetricSettings; } + /** + * Returns the object with the settings used for calls to deleteLogMetric. + */ public SimpleCallSettings deleteLogMetricSettings() { return deleteLogMetricSettings; } - public static MetricsServiceV2Settings defaultInstance() throws IOException { - return newBuilder().build(); + /** + * Returns a builder for this class with recommended defaults. + */ + public static Builder defaultBuilder() { + return Builder.createDefault(); } + /** + * Returns a new builder for this class. + */ public static Builder newBuilder() { return new Builder(); } + /** + * Returns a builder containing all the values of this settings class. + */ public Builder toBuilder() { return new Builder(this); } private MetricsServiceV2Settings(Builder settingsBuilder) throws IOException { super( - settingsBuilder.getOrBuildChannel(), - settingsBuilder.shouldAutoCloseChannel(), - settingsBuilder.getOrBuildExecutor(), - settingsBuilder.getConnectionSettings(), + settingsBuilder.getChannelProvider(), + settingsBuilder.getExecutorProvider(), settingsBuilder.getGeneratorName(), settingsBuilder.getGeneratorVersion(), settingsBuilder.getClientLibName(), @@ -177,6 +237,9 @@ public Iterable extractResources(ListLogMetricsResponse payload) { } }; + /** + * Builder for MetricsServiceV2Settings. + */ public static class Builder extends ServiceApiSettings.Builder { private final ImmutableList methodSettingsBuilders; @@ -220,38 +283,23 @@ public static class Builder extends ServiceApiSettings.Builder { } private Builder() { - super( - ConnectionSettings.builder() - .setServiceAddress(DEFAULT_SERVICE_ADDRESS) - .setPort(DEFAULT_SERVICE_PORT) - .provideCredentialsWith(DEFAULT_SERVICE_SCOPES) - .build()); + super(DEFAULT_CONNECTION_SETTINGS); listLogMetricsSettings = PageStreamingCallSettings.newBuilder( - MetricsServiceV2Grpc.METHOD_LIST_LOG_METRICS, LIST_LOG_METRICS_PAGE_STR_DESC) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + MetricsServiceV2Grpc.METHOD_LIST_LOG_METRICS, LIST_LOG_METRICS_PAGE_STR_DESC); getLogMetricSettings = - SimpleCallSettings.newBuilder(MetricsServiceV2Grpc.METHOD_GET_LOG_METRIC) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + SimpleCallSettings.newBuilder(MetricsServiceV2Grpc.METHOD_GET_LOG_METRIC); createLogMetricSettings = - SimpleCallSettings.newBuilder(MetricsServiceV2Grpc.METHOD_CREATE_LOG_METRIC) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + SimpleCallSettings.newBuilder(MetricsServiceV2Grpc.METHOD_CREATE_LOG_METRIC); updateLogMetricSettings = - SimpleCallSettings.newBuilder(MetricsServiceV2Grpc.METHOD_UPDATE_LOG_METRIC) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + SimpleCallSettings.newBuilder(MetricsServiceV2Grpc.METHOD_UPDATE_LOG_METRIC); deleteLogMetricSettings = - SimpleCallSettings.newBuilder(MetricsServiceV2Grpc.METHOD_DELETE_LOG_METRIC) - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + SimpleCallSettings.newBuilder(MetricsServiceV2Grpc.METHOD_DELETE_LOG_METRIC); methodSettingsBuilders = ImmutableList.of( @@ -262,6 +310,36 @@ private Builder() { deleteLogMetricSettings); } + private static Builder createDefault() { + Builder builder = new Builder(); + builder + .listLogMetricsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getLogMetricSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .createLogMetricSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .updateLogMetricSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .deleteLogMetricSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default")); + + return builder; + } + private Builder(MetricsServiceV2Settings settings) { super(settings); @@ -280,6 +358,17 @@ private Builder(MetricsServiceV2Settings settings) { deleteLogMetricSettings); } + @Override + protected ConnectionSettings getDefaultConnectionSettings() { + return DEFAULT_CONNECTION_SETTINGS; + } + + @Override + public Builder provideExecutorWith(ScheduledExecutorService executor, boolean shouldAutoClose) { + super.provideExecutorWith(executor, shouldAutoClose); + return this; + } + @Override public Builder provideChannelWith(ManagedChannel channel, boolean shouldAutoClose) { super.provideChannelWith(channel, shouldAutoClose); @@ -293,8 +382,14 @@ public Builder provideChannelWith(ConnectionSettings settings) { } @Override - public Builder setExecutor(ScheduledExecutorService executor) { - super.setExecutor(executor); + public Builder provideChannelWith(Credentials credentials) { + super.provideChannelWith(credentials); + return this; + } + + @Override + public Builder provideChannelWith(List scopes) { + super.provideChannelWith(scopes); return this; } @@ -310,29 +405,49 @@ public Builder setClientLibHeader(String name, String version) { return this; } + /** + * Applies the given settings to all of the API methods in this service. Only + * values that are non-null will be applied, so this method is not capable + * of un-setting any values. + */ public Builder applyToAllApiMethods(ApiCallSettings.Builder apiCallSettings) throws Exception { super.applyToAllApiMethods(methodSettingsBuilders, apiCallSettings); return this; } + /** + * Returns the builder for the settings used for calls to listLogMetrics. + */ public PageStreamingCallSettings.Builder< ListLogMetricsRequest, ListLogMetricsResponse, LogMetric> listLogMetricsSettings() { return listLogMetricsSettings; } + /** + * Returns the builder for the settings used for calls to getLogMetric. + */ public SimpleCallSettings.Builder getLogMetricSettings() { return getLogMetricSettings; } + /** + * Returns the builder for the settings used for calls to createLogMetric. + */ public SimpleCallSettings.Builder createLogMetricSettings() { return createLogMetricSettings; } + /** + * Returns the builder for the settings used for calls to updateLogMetric. + */ public SimpleCallSettings.Builder updateLogMetricSettings() { return updateLogMetricSettings; } + /** + * Returns the builder for the settings used for calls to deleteLogMetric. + */ public SimpleCallSettings.Builder deleteLogMetricSettings() { return deleteLogMetricSettings; } diff --git a/gcloud-java-logging/src/test/java/com/google/cloud/logging/spi/v2/LoggingServiceV2ApiTest.java b/gcloud-java-logging/src/test/java/com/google/cloud/logging/spi/v2/LoggingServiceV2ApiTest.java index cde54a4966e7..a463cc1c69a3 100644 --- a/gcloud-java-logging/src/test/java/com/google/cloud/logging/spi/v2/LoggingServiceV2ApiTest.java +++ b/gcloud-java-logging/src/test/java/com/google/cloud/logging/spi/v2/LoggingServiceV2ApiTest.java @@ -15,8 +15,9 @@ package com.google.cloud.logging.spi.v2; import com.google.api.MonitoredResource; -import com.google.common.collect.Iterables; +import com.google.api.gax.core.PageAccessor; import com.google.cloud.logging.spi.v2.testing.LocalLoggingHelper; +import com.google.common.collect.Iterables; import com.google.logging.v2.LogEntry; import org.junit.After; @@ -49,7 +50,7 @@ public static void stopServer() { @Before public void setUp() throws IOException { loggingHelper.reset(); - LoggingServiceV2Settings settings = LoggingServiceV2Settings.newBuilder() + LoggingServiceV2Settings settings = LoggingServiceV2Settings.defaultBuilder() .provideChannelWith(loggingHelper.createChannel(), true) .build(); loggingApi = LoggingServiceV2Api.create(settings); @@ -77,14 +78,14 @@ public void testListLog() { entries.add(LogEntry.newBuilder().setLogName(logName).setTextPayload("foobar").build()); loggingApi.writeLogEntries(logName, resource, Collections.emptyMap(), entries); - Iterable gotEntries = + PageAccessor gotEntries = loggingApi.listLogEntries(Collections.singletonList("my-project"), "", ""); Assert.assertTrue(Iterables.elementsEqual(entries, gotEntries)); } @Test public void testListNoLog() { - Iterable entries = + PageAccessor entries = loggingApi.listLogEntries(Collections.singletonList("my-project"), "", ""); Assert.assertTrue(Iterables.isEmpty(entries)); } @@ -99,7 +100,7 @@ public void testDeleteLog() { loggingApi.deleteLog(logName); - Iterable gotEntries = + PageAccessor gotEntries = loggingApi.listLogEntries(Collections.singletonList("my-project"), "", ""); Assert.assertTrue(Iterables.isEmpty(gotEntries)); } From e824a28645a4843ed3ce33631c1efaba743e6dbb Mon Sep 17 00:00:00 2001 From: Shin Fan Date: Wed, 8 Jun 2016 12:44:57 -0700 Subject: [PATCH 2/5] Update comments --- .../logging/spi/v2/ConfigServiceV2Api.java | 202 +++++++++++++++++- .../logging/spi/v2/LoggingServiceV2Api.java | 177 ++++++++++++++- .../logging/spi/v2/MetricsServiceV2Api.java | 202 +++++++++++++++++- .../cloud/logging/spi/v2/package-info.java | 86 ++++++++ gcloud-java-logging/pom.xml | 6 +- .../logging/spi/v2/ConfigServiceV2Api.java | 202 +++++++++++++++++- .../logging/spi/v2/LoggingServiceV2Api.java | 177 ++++++++++++++- .../logging/spi/v2/MetricsServiceV2Api.java | 202 +++++++++++++++++- .../cloud/logging/spi/v2/package-info.java | 86 ++++++++ pom.xml | 1 + 10 files changed, 1328 insertions(+), 13 deletions(-) create mode 100644 gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/package-info.java create mode 100644 gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/package-info.java diff --git a/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Api.java b/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Api.java index 7c87dda578fe..bc0eec93e22b 100644 --- a/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Api.java +++ b/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Api.java @@ -63,8 +63,8 @@ *
  * 
  * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
- *   String projectName = "";
- *   ListSinksResponse response = configServiceV2Api.listSinks(projectName);
+ *   String formattedProjectName = ConfigServiceV2Api.formatProjectName("[PROJECT]");
+ *   ListSinksResponse response = configServiceV2Api.listSinks(formattedProjectName);
  * }
  * 
  * 
@@ -262,6 +262,16 @@ public void close() throws IOException { /** * Lists sinks. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = ConfigServiceV2Api.formatProjectName("[PROJECT]");
+   *   for (LogSink elements : configServiceV2Api.listSinks(formattedProjectName)) {
+   *     // doThingsWith(elements);
+   *   }
+   * }
+   * 
+ * * * * @@ -279,6 +289,19 @@ public final PageAccessor listSinks(String projectName) { /** * Lists sinks. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = ConfigServiceV2Api.formatProjectName("[PROJECT]");
+   *   ListSinksRequest request = ListSinksRequest.newBuilder()
+   *     .setProjectName(formattedProjectName)
+   *     .build();
+   *   for (LogSink elements : configServiceV2Api.listSinks(request)) {
+   *     // doThingsWith(elements);
+   *   }
+   * }
+   * 
+ * * * * @@ -293,6 +316,21 @@ public final PageAccessor listSinks(ListSinksRequest request) { /** * Lists sinks. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = ConfigServiceV2Api.formatProjectName("[PROJECT]");
+   *   ListSinksRequest request = ListSinksRequest.newBuilder()
+   *     .setProjectName(formattedProjectName)
+   *     .build();
+   *   ListenableFuture<PageAccessor<LogSink>> future = configServiceV2Api.listSinksPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (LogSink elements : future.get()) {
+   *     // doThingsWith(elements);
+   *   }
+   * }
+   * 
+ * * * */ @@ -304,6 +342,28 @@ public final ApiCallable> listSinksPaged /** * Lists sinks. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = ConfigServiceV2Api.formatProjectName("[PROJECT]");
+   *   ListSinksRequest request = ListSinksRequest.newBuilder()
+   *     .setProjectName(formattedProjectName)
+   *     .build();
+   *   while (true) {
+   *     ListSinksResponse response = configServiceV2Api.listSinksCallable().call(request);
+   *     for (LogSink elements : response.getSinksList()) {
+   *       // doThingsWith(elements);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ * * * */ @@ -317,6 +377,14 @@ public final ApiCallable listSinksCallable( /** * Gets a sink. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
+   *   LogSink response = configServiceV2Api.getSink(formattedSinkName);
+   * }
+   * 
+ * * * * @@ -334,6 +402,17 @@ public final LogSink getSink(String sinkName) { /** * Gets a sink. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
+   *   GetSinkRequest request = GetSinkRequest.newBuilder()
+   *     .setSinkName(formattedSinkName)
+   *     .build();
+   *   LogSink response = configServiceV2Api.getSink(request);
+   * }
+   * 
+ * * * * @@ -348,6 +427,19 @@ private LogSink getSink(GetSinkRequest request) { /** * Gets a sink. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
+   *   GetSinkRequest request = GetSinkRequest.newBuilder()
+   *     .setSinkName(formattedSinkName)
+   *     .build();
+   *   ListenableFuture<LogSink> future = configServiceV2Api.getSinkCallable().futureCall(request);
+   *   // Do something
+   *   LogSink response = future.get();
+   * }
+   * 
+ * * * */ @@ -361,6 +453,15 @@ public final ApiCallable getSinkCallable() { /** * Creates a sink. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = ConfigServiceV2Api.formatProjectName("[PROJECT]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   LogSink response = configServiceV2Api.createSink(formattedProjectName, sink);
+   * }
+   * 
+ * * * * @@ -384,6 +485,19 @@ public final LogSink createSink(String projectName, LogSink sink) { /** * Creates a sink. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = ConfigServiceV2Api.formatProjectName("[PROJECT]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   CreateSinkRequest request = CreateSinkRequest.newBuilder()
+   *     .setProjectName(formattedProjectName)
+   *     .setSink(sink)
+   *     .build();
+   *   LogSink response = configServiceV2Api.createSink(request);
+   * }
+   * 
+ * * * * @@ -398,6 +512,21 @@ public LogSink createSink(CreateSinkRequest request) { /** * Creates a sink. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = ConfigServiceV2Api.formatProjectName("[PROJECT]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   CreateSinkRequest request = CreateSinkRequest.newBuilder()
+   *     .setProjectName(formattedProjectName)
+   *     .setSink(sink)
+   *     .build();
+   *   ListenableFuture<LogSink> future = configServiceV2Api.createSinkCallable().futureCall(request);
+   *   // Do something
+   *   LogSink response = future.get();
+   * }
+   * 
+ * * * */ @@ -411,6 +540,15 @@ public final ApiCallable createSinkCallable() { /** * Creates or updates a sink. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   LogSink response = configServiceV2Api.updateSink(formattedSinkName, sink);
+   * }
+   * 
+ * * * * @@ -437,6 +575,19 @@ public final LogSink updateSink(String sinkName, LogSink sink) { /** * Creates or updates a sink. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   UpdateSinkRequest request = UpdateSinkRequest.newBuilder()
+   *     .setSinkName(formattedSinkName)
+   *     .setSink(sink)
+   *     .build();
+   *   LogSink response = configServiceV2Api.updateSink(request);
+   * }
+   * 
+ * * * * @@ -451,6 +602,21 @@ public LogSink updateSink(UpdateSinkRequest request) { /** * Creates or updates a sink. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   UpdateSinkRequest request = UpdateSinkRequest.newBuilder()
+   *     .setSinkName(formattedSinkName)
+   *     .setSink(sink)
+   *     .build();
+   *   ListenableFuture<LogSink> future = configServiceV2Api.updateSinkCallable().futureCall(request);
+   *   // Do something
+   *   LogSink response = future.get();
+   * }
+   * 
+ * * * */ @@ -464,6 +630,14 @@ public final ApiCallable updateSinkCallable() { /** * Deletes a sink. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
+   *   configServiceV2Api.deleteSink(formattedSinkName);
+   * }
+   * 
+ * * * * @@ -481,6 +655,17 @@ public final void deleteSink(String sinkName) { /** * Deletes a sink. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
+   *   DeleteSinkRequest request = DeleteSinkRequest.newBuilder()
+   *     .setSinkName(formattedSinkName)
+   *     .build();
+   *   configServiceV2Api.deleteSink(request);
+   * }
+   * 
+ * * * * @@ -495,6 +680,19 @@ private void deleteSink(DeleteSinkRequest request) { /** * Deletes a sink. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
+   *   DeleteSinkRequest request = DeleteSinkRequest.newBuilder()
+   *     .setSinkName(formattedSinkName)
+   *     .build();
+   *   ListenableFuture<Void> future = configServiceV2Api.deleteSinkCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ * * * */ diff --git a/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Api.java b/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Api.java index abe8820eb463..70960a025987 100644 --- a/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Api.java +++ b/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Api.java @@ -67,8 +67,8 @@ *
  * 
  * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
- *   String logName = "";
- *   loggingServiceV2Api.deleteLog(logName);
+ *   String formattedLogName = LoggingServiceV2Api.formatLogName("[PROJECT]", "[LOG]");
+ *   loggingServiceV2Api.deleteLog(formattedLogName);
  * }
  * 
  * 
@@ -276,6 +276,14 @@ public void close() throws IOException { * Deletes a log and all its log entries. * The log will reappear if it receives new entries. * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   String formattedLogName = LoggingServiceV2Api.formatLogName("[PROJECT]", "[LOG]");
+   *   loggingServiceV2Api.deleteLog(formattedLogName);
+   * }
+   * 
+ * * * * @@ -294,6 +302,17 @@ public final void deleteLog(String logName) { * Deletes a log and all its log entries. * The log will reappear if it receives new entries. * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   String formattedLogName = LoggingServiceV2Api.formatLogName("[PROJECT]", "[LOG]");
+   *   DeleteLogRequest request = DeleteLogRequest.newBuilder()
+   *     .setLogName(formattedLogName)
+   *     .build();
+   *   loggingServiceV2Api.deleteLog(request);
+   * }
+   * 
+ * * * * @@ -309,6 +328,19 @@ private void deleteLog(DeleteLogRequest request) { * Deletes a log and all its log entries. * The log will reappear if it receives new entries. * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   String formattedLogName = LoggingServiceV2Api.formatLogName("[PROJECT]", "[LOG]");
+   *   DeleteLogRequest request = DeleteLogRequest.newBuilder()
+   *     .setLogName(formattedLogName)
+   *     .build();
+   *   ListenableFuture<Void> future = loggingServiceV2Api.deleteLogCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ * * * */ @@ -323,6 +355,17 @@ public final ApiCallable deleteLogCallable() { * Writes log entries to Cloud Logging. * All log entries in Cloud Logging are written by this method. * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   String logName = "";
+   *   MonitoredResource resource = MonitoredResource.newBuilder().build();
+   *   Map<String, String> labels = new HashMap<>();
+   *   List<LogEntry> entries = new ArrayList<>();
+   *   WriteLogEntriesResponse response = loggingServiceV2Api.writeLogEntries(logName, resource, labels, entries);
+   * }
+   * 
+ * * * * @@ -362,6 +405,17 @@ public final WriteLogEntriesResponse writeLogEntries( * Writes log entries to Cloud Logging. * All log entries in Cloud Logging are written by this method. * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   List<LogEntry> entries = new ArrayList<>();
+   *   WriteLogEntriesRequest request = WriteLogEntriesRequest.newBuilder()
+   *     .addAllEntries(entries)
+   *     .build();
+   *   WriteLogEntriesResponse response = loggingServiceV2Api.writeLogEntries(request);
+   * }
+   * 
+ * * * * @@ -377,6 +431,19 @@ public WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest request) { * Writes log entries to Cloud Logging. * All log entries in Cloud Logging are written by this method. * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   List<LogEntry> entries = new ArrayList<>();
+   *   WriteLogEntriesRequest request = WriteLogEntriesRequest.newBuilder()
+   *     .addAllEntries(entries)
+   *     .build();
+   *   ListenableFuture<WriteLogEntriesResponse> future = loggingServiceV2Api.writeLogEntriesCallable().futureCall(request);
+   *   // Do something
+   *   WriteLogEntriesResponse response = future.get();
+   * }
+   * 
+ * * * */ @@ -393,6 +460,18 @@ public WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest request) { * Logging. For ways to export log entries, see * [Exporting Logs](/logging/docs/export). * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   List<String> projectIds = new ArrayList<>();
+   *   String filter = "";
+   *   String orderBy = "";
+   *   for (LogEntry elements : loggingServiceV2Api.listLogEntries(projectIds, filter, orderBy)) {
+   *     // doThingsWith(elements);
+   *   }
+   * }
+   * 
+ * * * * @@ -428,6 +507,19 @@ public final PageAccessor listLogEntries( * Logging. For ways to export log entries, see * [Exporting Logs](/logging/docs/export). * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   List<String> projectIds = new ArrayList<>();
+   *   ListLogEntriesRequest request = ListLogEntriesRequest.newBuilder()
+   *     .addAllProjectIds(projectIds)
+   *     .build();
+   *   for (LogEntry elements : loggingServiceV2Api.listLogEntries(request)) {
+   *     // doThingsWith(elements);
+   *   }
+   * }
+   * 
+ * * * * @@ -444,6 +536,21 @@ public final PageAccessor listLogEntries(ListLogEntriesRequest request * Logging. For ways to export log entries, see * [Exporting Logs](/logging/docs/export). * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   List<String> projectIds = new ArrayList<>();
+   *   ListLogEntriesRequest request = ListLogEntriesRequest.newBuilder()
+   *     .addAllProjectIds(projectIds)
+   *     .build();
+   *   ListenableFuture<PageAccessor<LogEntry>> future = loggingServiceV2Api.listLogEntriesPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (LogEntry elements : future.get()) {
+   *     // doThingsWith(elements);
+   *   }
+   * }
+   * 
+ * * * */ @@ -458,6 +565,28 @@ public final PageAccessor listLogEntries(ListLogEntriesRequest request * Logging. For ways to export log entries, see * [Exporting Logs](/logging/docs/export). * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   List<String> projectIds = new ArrayList<>();
+   *   ListLogEntriesRequest request = ListLogEntriesRequest.newBuilder()
+   *     .addAllProjectIds(projectIds)
+   *     .build();
+   *   while (true) {
+   *     ListLogEntriesResponse response = loggingServiceV2Api.listLogEntriesCallable().call(request);
+   *     for (LogEntry elements : response.getEntriesList()) {
+   *       // doThingsWith(elements);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ * * * */ @@ -471,6 +600,17 @@ public final ApiCallable listLogE /** * Lists monitored resource descriptors that are used by Cloud Logging. * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   ListMonitoredResourceDescriptorsRequest request = ListMonitoredResourceDescriptorsRequest.newBuilder()
+   *     .build();
+   *   for (MonitoredResourceDescriptor elements : loggingServiceV2Api.listMonitoredResourceDescriptors(request)) {
+   *     // doThingsWith(elements);
+   *   }
+   * }
+   * 
+ * * * * @@ -486,6 +626,19 @@ public final PageAccessor listMonitoredResourceDesc /** * Lists monitored resource descriptors that are used by Cloud Logging. * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   ListMonitoredResourceDescriptorsRequest request = ListMonitoredResourceDescriptorsRequest.newBuilder()
+   *     .build();
+   *   ListenableFuture<PageAccessor<MonitoredResourceDescriptor>> future = loggingServiceV2Api.listMonitoredResourceDescriptorsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (MonitoredResourceDescriptor elements : future.get()) {
+   *     // doThingsWith(elements);
+   *   }
+   * }
+   * 
+ * * * */ @@ -499,6 +652,26 @@ public final PageAccessor listMonitoredResourceDesc /** * Lists monitored resource descriptors that are used by Cloud Logging. * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   ListMonitoredResourceDescriptorsRequest request = ListMonitoredResourceDescriptorsRequest.newBuilder()
+   *     .build();
+   *   while (true) {
+   *     ListMonitoredResourceDescriptorsResponse response = loggingServiceV2Api.listMonitoredResourceDescriptorsCallable().call(request);
+   *     for (MonitoredResourceDescriptor elements : response.getResourceDescriptorsList()) {
+   *       // doThingsWith(elements);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ * * * */ diff --git a/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Api.java b/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Api.java index 765197054e52..adb4d1c325cd 100644 --- a/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Api.java +++ b/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Api.java @@ -63,8 +63,8 @@ *
  * 
  * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
- *   String projectName = "";
- *   ListLogMetricsResponse response = metricsServiceV2Api.listLogMetrics(projectName);
+ *   String formattedProjectName = MetricsServiceV2Api.formatProjectName("[PROJECT]");
+ *   ListLogMetricsResponse response = metricsServiceV2Api.listLogMetrics(formattedProjectName);
  * }
  * 
  * 
@@ -264,6 +264,16 @@ public void close() throws IOException { /** * Lists logs-based metrics. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = MetricsServiceV2Api.formatProjectName("[PROJECT]");
+   *   for (LogMetric elements : metricsServiceV2Api.listLogMetrics(formattedProjectName)) {
+   *     // doThingsWith(elements);
+   *   }
+   * }
+   * 
+ * * * * @@ -282,6 +292,19 @@ public final PageAccessor listLogMetrics(String projectName) { /** * Lists logs-based metrics. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = MetricsServiceV2Api.formatProjectName("[PROJECT]");
+   *   ListLogMetricsRequest request = ListLogMetricsRequest.newBuilder()
+   *     .setProjectName(formattedProjectName)
+   *     .build();
+   *   for (LogMetric elements : metricsServiceV2Api.listLogMetrics(request)) {
+   *     // doThingsWith(elements);
+   *   }
+   * }
+   * 
+ * * * * @@ -296,6 +319,21 @@ public final PageAccessor listLogMetrics(ListLogMetricsRequest reques /** * Lists logs-based metrics. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = MetricsServiceV2Api.formatProjectName("[PROJECT]");
+   *   ListLogMetricsRequest request = ListLogMetricsRequest.newBuilder()
+   *     .setProjectName(formattedProjectName)
+   *     .build();
+   *   ListenableFuture<PageAccessor<LogMetric>> future = metricsServiceV2Api.listLogMetricsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (LogMetric elements : future.get()) {
+   *     // doThingsWith(elements);
+   *   }
+   * }
+   * 
+ * * * */ @@ -308,6 +346,28 @@ public final PageAccessor listLogMetrics(ListLogMetricsRequest reques /** * Lists logs-based metrics. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = MetricsServiceV2Api.formatProjectName("[PROJECT]");
+   *   ListLogMetricsRequest request = ListLogMetricsRequest.newBuilder()
+   *     .setProjectName(formattedProjectName)
+   *     .build();
+   *   while (true) {
+   *     ListLogMetricsResponse response = metricsServiceV2Api.listLogMetricsCallable().call(request);
+   *     for (LogMetric elements : response.getMetricsList()) {
+   *       // doThingsWith(elements);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ * * * */ @@ -321,6 +381,14 @@ public final ApiCallable listLogM /** * Gets a logs-based metric. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
+   *   LogMetric response = metricsServiceV2Api.getLogMetric(formattedMetricName);
+   * }
+   * 
+ * * * * @@ -339,6 +407,17 @@ public final LogMetric getLogMetric(String metricName) { /** * Gets a logs-based metric. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
+   *   GetLogMetricRequest request = GetLogMetricRequest.newBuilder()
+   *     .setMetricName(formattedMetricName)
+   *     .build();
+   *   LogMetric response = metricsServiceV2Api.getLogMetric(request);
+   * }
+   * 
+ * * * * @@ -353,6 +432,19 @@ private LogMetric getLogMetric(GetLogMetricRequest request) { /** * Gets a logs-based metric. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
+   *   GetLogMetricRequest request = GetLogMetricRequest.newBuilder()
+   *     .setMetricName(formattedMetricName)
+   *     .build();
+   *   ListenableFuture<LogMetric> future = metricsServiceV2Api.getLogMetricCallable().futureCall(request);
+   *   // Do something
+   *   LogMetric response = future.get();
+   * }
+   * 
+ * * * */ @@ -366,6 +458,15 @@ public final ApiCallable getLogMetricCallable() /** * Creates a logs-based metric. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = MetricsServiceV2Api.formatProjectName("[PROJECT]");
+   *   LogMetric metric = LogMetric.newBuilder().build();
+   *   LogMetric response = metricsServiceV2Api.createLogMetric(formattedProjectName, metric);
+   * }
+   * 
+ * * * * @@ -389,6 +490,19 @@ public final LogMetric createLogMetric(String projectName, LogMetric metric) { /** * Creates a logs-based metric. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = MetricsServiceV2Api.formatProjectName("[PROJECT]");
+   *   LogMetric metric = LogMetric.newBuilder().build();
+   *   CreateLogMetricRequest request = CreateLogMetricRequest.newBuilder()
+   *     .setProjectName(formattedProjectName)
+   *     .setMetric(metric)
+   *     .build();
+   *   LogMetric response = metricsServiceV2Api.createLogMetric(request);
+   * }
+   * 
+ * * * * @@ -403,6 +517,21 @@ public LogMetric createLogMetric(CreateLogMetricRequest request) { /** * Creates a logs-based metric. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = MetricsServiceV2Api.formatProjectName("[PROJECT]");
+   *   LogMetric metric = LogMetric.newBuilder().build();
+   *   CreateLogMetricRequest request = CreateLogMetricRequest.newBuilder()
+   *     .setProjectName(formattedProjectName)
+   *     .setMetric(metric)
+   *     .build();
+   *   ListenableFuture<LogMetric> future = metricsServiceV2Api.createLogMetricCallable().futureCall(request);
+   *   // Do something
+   *   LogMetric response = future.get();
+   * }
+   * 
+ * * * */ @@ -416,6 +545,15 @@ public final ApiCallable createLogMetricCalla /** * Creates or updates a logs-based metric. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
+   *   LogMetric metric = LogMetric.newBuilder().build();
+   *   LogMetric response = metricsServiceV2Api.updateLogMetric(formattedMetricName, metric);
+   * }
+   * 
+ * * * * @@ -442,6 +580,19 @@ public final LogMetric updateLogMetric(String metricName, LogMetric metric) { /** * Creates or updates a logs-based metric. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
+   *   LogMetric metric = LogMetric.newBuilder().build();
+   *   UpdateLogMetricRequest request = UpdateLogMetricRequest.newBuilder()
+   *     .setMetricName(formattedMetricName)
+   *     .setMetric(metric)
+   *     .build();
+   *   LogMetric response = metricsServiceV2Api.updateLogMetric(request);
+   * }
+   * 
+ * * * * @@ -456,6 +607,21 @@ public LogMetric updateLogMetric(UpdateLogMetricRequest request) { /** * Creates or updates a logs-based metric. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
+   *   LogMetric metric = LogMetric.newBuilder().build();
+   *   UpdateLogMetricRequest request = UpdateLogMetricRequest.newBuilder()
+   *     .setMetricName(formattedMetricName)
+   *     .setMetric(metric)
+   *     .build();
+   *   ListenableFuture<LogMetric> future = metricsServiceV2Api.updateLogMetricCallable().futureCall(request);
+   *   // Do something
+   *   LogMetric response = future.get();
+   * }
+   * 
+ * * * */ @@ -469,6 +635,14 @@ public final ApiCallable updateLogMetricCalla /** * Deletes a logs-based metric. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
+   *   metricsServiceV2Api.deleteLogMetric(formattedMetricName);
+   * }
+   * 
+ * * * * @@ -487,6 +661,17 @@ public final void deleteLogMetric(String metricName) { /** * Deletes a logs-based metric. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
+   *   DeleteLogMetricRequest request = DeleteLogMetricRequest.newBuilder()
+   *     .setMetricName(formattedMetricName)
+   *     .build();
+   *   metricsServiceV2Api.deleteLogMetric(request);
+   * }
+   * 
+ * * * * @@ -501,6 +686,19 @@ private void deleteLogMetric(DeleteLogMetricRequest request) { /** * Deletes a logs-based metric. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
+   *   DeleteLogMetricRequest request = DeleteLogMetricRequest.newBuilder()
+   *     .setMetricName(formattedMetricName)
+   *     .build();
+   *   ListenableFuture<Void> future = metricsServiceV2Api.deleteLogMetricCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ * * * */ diff --git a/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/package-info.java b/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/package-info.java new file mode 100644 index 000000000000..81ee3d3fce7e --- /dev/null +++ b/gcloud-java-logging/baseline/src/main/java/com/google/cloud/logging/spi/v2/package-info.java @@ -0,0 +1,86 @@ +/* + * Copyright 2016 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. + */ + +/* + * EDITING INSTRUCTIONS + * This file was automatically generated. For the short term, the process for + * refreshing this file will only be runnable by Google engineers. + * Manual additions are allowed because the refresh process performs + * a 3-way merge in order to preserve those manual additions. In order to not + * break the refresh process, additional documentation should be added between + * "manual edit" demarcations. + * + * Other generated files allow additional edits - see the editing instructions + * in those files for more details. + * + * Happy editing! + */ + +/** + * A client to Google Cloud Logging API. + * + * The interfaces provided are listed below, along with a usage sample + * + * =================== + * LoggingServiceV2Api + * =================== + * + * Service Description: Service for ingesting and querying logs. + * + * Sample for LoggingServiceV2Api: + *
+ * 
+ * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+ *   String formattedLogName = LoggingServiceV2Api.formatLogName("[PROJECT]", "[LOG]");
+ *   loggingServiceV2Api.deleteLog(formattedLogName);
+ * }
+ * 
+ * 
+ * + * ================== + * ConfigServiceV2Api + * ================== + * + * Service Description: + * + * Sample for ConfigServiceV2Api: + *
+ * 
+ * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+ *   String formattedProjectName = ConfigServiceV2Api.formatProjectName("[PROJECT]");
+ *   ListSinksResponse response = configServiceV2Api.listSinks(formattedProjectName);
+ * }
+ * 
+ * 
+ * + * =================== + * MetricsServiceV2Api + * =================== + * + * Service Description: + * + * Sample for MetricsServiceV2Api: + *
+ * 
+ * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+ *   String formattedProjectName = MetricsServiceV2Api.formatProjectName("[PROJECT]");
+ *   ListLogMetricsResponse response = metricsServiceV2Api.listLogMetrics(formattedProjectName);
+ * }
+ * 
+ * 
+ * + * + * + */ +package com.google.cloud.logging.spi.v2; diff --git a/gcloud-java-logging/pom.xml b/gcloud-java-logging/pom.xml index 38ef3f4979a2..c36dd39da092 100644 --- a/gcloud-java-logging/pom.xml +++ b/gcloud-java-logging/pom.xml @@ -7,7 +7,11 @@ com.google.gcloud gcloud-java-logging - 0.0.0 + + com.google.gcloud + gcloud-java-pom + 0.1.4 + jar gcloud-java-logging diff --git a/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Api.java b/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Api.java index 7c87dda578fe..bc0eec93e22b 100644 --- a/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Api.java +++ b/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Api.java @@ -63,8 +63,8 @@ *
  * 
  * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
- *   String projectName = "";
- *   ListSinksResponse response = configServiceV2Api.listSinks(projectName);
+ *   String formattedProjectName = ConfigServiceV2Api.formatProjectName("[PROJECT]");
+ *   ListSinksResponse response = configServiceV2Api.listSinks(formattedProjectName);
  * }
  * 
  * 
@@ -262,6 +262,16 @@ public void close() throws IOException { /** * Lists sinks. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = ConfigServiceV2Api.formatProjectName("[PROJECT]");
+   *   for (LogSink elements : configServiceV2Api.listSinks(formattedProjectName)) {
+   *     // doThingsWith(elements);
+   *   }
+   * }
+   * 
+ * * * * @@ -279,6 +289,19 @@ public final PageAccessor listSinks(String projectName) { /** * Lists sinks. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = ConfigServiceV2Api.formatProjectName("[PROJECT]");
+   *   ListSinksRequest request = ListSinksRequest.newBuilder()
+   *     .setProjectName(formattedProjectName)
+   *     .build();
+   *   for (LogSink elements : configServiceV2Api.listSinks(request)) {
+   *     // doThingsWith(elements);
+   *   }
+   * }
+   * 
+ * * * * @@ -293,6 +316,21 @@ public final PageAccessor listSinks(ListSinksRequest request) { /** * Lists sinks. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = ConfigServiceV2Api.formatProjectName("[PROJECT]");
+   *   ListSinksRequest request = ListSinksRequest.newBuilder()
+   *     .setProjectName(formattedProjectName)
+   *     .build();
+   *   ListenableFuture<PageAccessor<LogSink>> future = configServiceV2Api.listSinksPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (LogSink elements : future.get()) {
+   *     // doThingsWith(elements);
+   *   }
+   * }
+   * 
+ * * * */ @@ -304,6 +342,28 @@ public final ApiCallable> listSinksPaged /** * Lists sinks. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = ConfigServiceV2Api.formatProjectName("[PROJECT]");
+   *   ListSinksRequest request = ListSinksRequest.newBuilder()
+   *     .setProjectName(formattedProjectName)
+   *     .build();
+   *   while (true) {
+   *     ListSinksResponse response = configServiceV2Api.listSinksCallable().call(request);
+   *     for (LogSink elements : response.getSinksList()) {
+   *       // doThingsWith(elements);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ * * * */ @@ -317,6 +377,14 @@ public final ApiCallable listSinksCallable( /** * Gets a sink. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
+   *   LogSink response = configServiceV2Api.getSink(formattedSinkName);
+   * }
+   * 
+ * * * * @@ -334,6 +402,17 @@ public final LogSink getSink(String sinkName) { /** * Gets a sink. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
+   *   GetSinkRequest request = GetSinkRequest.newBuilder()
+   *     .setSinkName(formattedSinkName)
+   *     .build();
+   *   LogSink response = configServiceV2Api.getSink(request);
+   * }
+   * 
+ * * * * @@ -348,6 +427,19 @@ private LogSink getSink(GetSinkRequest request) { /** * Gets a sink. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
+   *   GetSinkRequest request = GetSinkRequest.newBuilder()
+   *     .setSinkName(formattedSinkName)
+   *     .build();
+   *   ListenableFuture<LogSink> future = configServiceV2Api.getSinkCallable().futureCall(request);
+   *   // Do something
+   *   LogSink response = future.get();
+   * }
+   * 
+ * * * */ @@ -361,6 +453,15 @@ public final ApiCallable getSinkCallable() { /** * Creates a sink. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = ConfigServiceV2Api.formatProjectName("[PROJECT]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   LogSink response = configServiceV2Api.createSink(formattedProjectName, sink);
+   * }
+   * 
+ * * * * @@ -384,6 +485,19 @@ public final LogSink createSink(String projectName, LogSink sink) { /** * Creates a sink. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = ConfigServiceV2Api.formatProjectName("[PROJECT]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   CreateSinkRequest request = CreateSinkRequest.newBuilder()
+   *     .setProjectName(formattedProjectName)
+   *     .setSink(sink)
+   *     .build();
+   *   LogSink response = configServiceV2Api.createSink(request);
+   * }
+   * 
+ * * * * @@ -398,6 +512,21 @@ public LogSink createSink(CreateSinkRequest request) { /** * Creates a sink. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = ConfigServiceV2Api.formatProjectName("[PROJECT]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   CreateSinkRequest request = CreateSinkRequest.newBuilder()
+   *     .setProjectName(formattedProjectName)
+   *     .setSink(sink)
+   *     .build();
+   *   ListenableFuture<LogSink> future = configServiceV2Api.createSinkCallable().futureCall(request);
+   *   // Do something
+   *   LogSink response = future.get();
+   * }
+   * 
+ * * * */ @@ -411,6 +540,15 @@ public final ApiCallable createSinkCallable() { /** * Creates or updates a sink. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   LogSink response = configServiceV2Api.updateSink(formattedSinkName, sink);
+   * }
+   * 
+ * * * * @@ -437,6 +575,19 @@ public final LogSink updateSink(String sinkName, LogSink sink) { /** * Creates or updates a sink. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   UpdateSinkRequest request = UpdateSinkRequest.newBuilder()
+   *     .setSinkName(formattedSinkName)
+   *     .setSink(sink)
+   *     .build();
+   *   LogSink response = configServiceV2Api.updateSink(request);
+   * }
+   * 
+ * * * * @@ -451,6 +602,21 @@ public LogSink updateSink(UpdateSinkRequest request) { /** * Creates or updates a sink. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   UpdateSinkRequest request = UpdateSinkRequest.newBuilder()
+   *     .setSinkName(formattedSinkName)
+   *     .setSink(sink)
+   *     .build();
+   *   ListenableFuture<LogSink> future = configServiceV2Api.updateSinkCallable().futureCall(request);
+   *   // Do something
+   *   LogSink response = future.get();
+   * }
+   * 
+ * * * */ @@ -464,6 +630,14 @@ public final ApiCallable updateSinkCallable() { /** * Deletes a sink. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
+   *   configServiceV2Api.deleteSink(formattedSinkName);
+   * }
+   * 
+ * * * * @@ -481,6 +655,17 @@ public final void deleteSink(String sinkName) { /** * Deletes a sink. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
+   *   DeleteSinkRequest request = DeleteSinkRequest.newBuilder()
+   *     .setSinkName(formattedSinkName)
+   *     .build();
+   *   configServiceV2Api.deleteSink(request);
+   * }
+   * 
+ * * * * @@ -495,6 +680,19 @@ private void deleteSink(DeleteSinkRequest request) { /** * Deletes a sink. * + * Sample code: + *

+   * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+   *   String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
+   *   DeleteSinkRequest request = DeleteSinkRequest.newBuilder()
+   *     .setSinkName(formattedSinkName)
+   *     .build();
+   *   ListenableFuture<Void> future = configServiceV2Api.deleteSinkCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ * * * */ diff --git a/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Api.java b/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Api.java index abe8820eb463..70960a025987 100644 --- a/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Api.java +++ b/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Api.java @@ -67,8 +67,8 @@ *
  * 
  * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
- *   String logName = "";
- *   loggingServiceV2Api.deleteLog(logName);
+ *   String formattedLogName = LoggingServiceV2Api.formatLogName("[PROJECT]", "[LOG]");
+ *   loggingServiceV2Api.deleteLog(formattedLogName);
  * }
  * 
  * 
@@ -276,6 +276,14 @@ public void close() throws IOException { * Deletes a log and all its log entries. * The log will reappear if it receives new entries. * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   String formattedLogName = LoggingServiceV2Api.formatLogName("[PROJECT]", "[LOG]");
+   *   loggingServiceV2Api.deleteLog(formattedLogName);
+   * }
+   * 
+ * * * * @@ -294,6 +302,17 @@ public final void deleteLog(String logName) { * Deletes a log and all its log entries. * The log will reappear if it receives new entries. * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   String formattedLogName = LoggingServiceV2Api.formatLogName("[PROJECT]", "[LOG]");
+   *   DeleteLogRequest request = DeleteLogRequest.newBuilder()
+   *     .setLogName(formattedLogName)
+   *     .build();
+   *   loggingServiceV2Api.deleteLog(request);
+   * }
+   * 
+ * * * * @@ -309,6 +328,19 @@ private void deleteLog(DeleteLogRequest request) { * Deletes a log and all its log entries. * The log will reappear if it receives new entries. * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   String formattedLogName = LoggingServiceV2Api.formatLogName("[PROJECT]", "[LOG]");
+   *   DeleteLogRequest request = DeleteLogRequest.newBuilder()
+   *     .setLogName(formattedLogName)
+   *     .build();
+   *   ListenableFuture<Void> future = loggingServiceV2Api.deleteLogCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ * * * */ @@ -323,6 +355,17 @@ public final ApiCallable deleteLogCallable() { * Writes log entries to Cloud Logging. * All log entries in Cloud Logging are written by this method. * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   String logName = "";
+   *   MonitoredResource resource = MonitoredResource.newBuilder().build();
+   *   Map<String, String> labels = new HashMap<>();
+   *   List<LogEntry> entries = new ArrayList<>();
+   *   WriteLogEntriesResponse response = loggingServiceV2Api.writeLogEntries(logName, resource, labels, entries);
+   * }
+   * 
+ * * * * @@ -362,6 +405,17 @@ public final WriteLogEntriesResponse writeLogEntries( * Writes log entries to Cloud Logging. * All log entries in Cloud Logging are written by this method. * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   List<LogEntry> entries = new ArrayList<>();
+   *   WriteLogEntriesRequest request = WriteLogEntriesRequest.newBuilder()
+   *     .addAllEntries(entries)
+   *     .build();
+   *   WriteLogEntriesResponse response = loggingServiceV2Api.writeLogEntries(request);
+   * }
+   * 
+ * * * * @@ -377,6 +431,19 @@ public WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest request) { * Writes log entries to Cloud Logging. * All log entries in Cloud Logging are written by this method. * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   List<LogEntry> entries = new ArrayList<>();
+   *   WriteLogEntriesRequest request = WriteLogEntriesRequest.newBuilder()
+   *     .addAllEntries(entries)
+   *     .build();
+   *   ListenableFuture<WriteLogEntriesResponse> future = loggingServiceV2Api.writeLogEntriesCallable().futureCall(request);
+   *   // Do something
+   *   WriteLogEntriesResponse response = future.get();
+   * }
+   * 
+ * * * */ @@ -393,6 +460,18 @@ public WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest request) { * Logging. For ways to export log entries, see * [Exporting Logs](/logging/docs/export). * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   List<String> projectIds = new ArrayList<>();
+   *   String filter = "";
+   *   String orderBy = "";
+   *   for (LogEntry elements : loggingServiceV2Api.listLogEntries(projectIds, filter, orderBy)) {
+   *     // doThingsWith(elements);
+   *   }
+   * }
+   * 
+ * * * * @@ -428,6 +507,19 @@ public final PageAccessor listLogEntries( * Logging. For ways to export log entries, see * [Exporting Logs](/logging/docs/export). * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   List<String> projectIds = new ArrayList<>();
+   *   ListLogEntriesRequest request = ListLogEntriesRequest.newBuilder()
+   *     .addAllProjectIds(projectIds)
+   *     .build();
+   *   for (LogEntry elements : loggingServiceV2Api.listLogEntries(request)) {
+   *     // doThingsWith(elements);
+   *   }
+   * }
+   * 
+ * * * * @@ -444,6 +536,21 @@ public final PageAccessor listLogEntries(ListLogEntriesRequest request * Logging. For ways to export log entries, see * [Exporting Logs](/logging/docs/export). * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   List<String> projectIds = new ArrayList<>();
+   *   ListLogEntriesRequest request = ListLogEntriesRequest.newBuilder()
+   *     .addAllProjectIds(projectIds)
+   *     .build();
+   *   ListenableFuture<PageAccessor<LogEntry>> future = loggingServiceV2Api.listLogEntriesPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (LogEntry elements : future.get()) {
+   *     // doThingsWith(elements);
+   *   }
+   * }
+   * 
+ * * * */ @@ -458,6 +565,28 @@ public final PageAccessor listLogEntries(ListLogEntriesRequest request * Logging. For ways to export log entries, see * [Exporting Logs](/logging/docs/export). * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   List<String> projectIds = new ArrayList<>();
+   *   ListLogEntriesRequest request = ListLogEntriesRequest.newBuilder()
+   *     .addAllProjectIds(projectIds)
+   *     .build();
+   *   while (true) {
+   *     ListLogEntriesResponse response = loggingServiceV2Api.listLogEntriesCallable().call(request);
+   *     for (LogEntry elements : response.getEntriesList()) {
+   *       // doThingsWith(elements);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ * * * */ @@ -471,6 +600,17 @@ public final ApiCallable listLogE /** * Lists monitored resource descriptors that are used by Cloud Logging. * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   ListMonitoredResourceDescriptorsRequest request = ListMonitoredResourceDescriptorsRequest.newBuilder()
+   *     .build();
+   *   for (MonitoredResourceDescriptor elements : loggingServiceV2Api.listMonitoredResourceDescriptors(request)) {
+   *     // doThingsWith(elements);
+   *   }
+   * }
+   * 
+ * * * * @@ -486,6 +626,19 @@ public final PageAccessor listMonitoredResourceDesc /** * Lists monitored resource descriptors that are used by Cloud Logging. * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   ListMonitoredResourceDescriptorsRequest request = ListMonitoredResourceDescriptorsRequest.newBuilder()
+   *     .build();
+   *   ListenableFuture<PageAccessor<MonitoredResourceDescriptor>> future = loggingServiceV2Api.listMonitoredResourceDescriptorsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (MonitoredResourceDescriptor elements : future.get()) {
+   *     // doThingsWith(elements);
+   *   }
+   * }
+   * 
+ * * * */ @@ -499,6 +652,26 @@ public final PageAccessor listMonitoredResourceDesc /** * Lists monitored resource descriptors that are used by Cloud Logging. * + * Sample code: + *

+   * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+   *   ListMonitoredResourceDescriptorsRequest request = ListMonitoredResourceDescriptorsRequest.newBuilder()
+   *     .build();
+   *   while (true) {
+   *     ListMonitoredResourceDescriptorsResponse response = loggingServiceV2Api.listMonitoredResourceDescriptorsCallable().call(request);
+   *     for (MonitoredResourceDescriptor elements : response.getResourceDescriptorsList()) {
+   *       // doThingsWith(elements);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ * * * */ diff --git a/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Api.java b/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Api.java index 765197054e52..adb4d1c325cd 100644 --- a/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Api.java +++ b/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Api.java @@ -63,8 +63,8 @@ *
  * 
  * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
- *   String projectName = "";
- *   ListLogMetricsResponse response = metricsServiceV2Api.listLogMetrics(projectName);
+ *   String formattedProjectName = MetricsServiceV2Api.formatProjectName("[PROJECT]");
+ *   ListLogMetricsResponse response = metricsServiceV2Api.listLogMetrics(formattedProjectName);
  * }
  * 
  * 
@@ -264,6 +264,16 @@ public void close() throws IOException { /** * Lists logs-based metrics. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = MetricsServiceV2Api.formatProjectName("[PROJECT]");
+   *   for (LogMetric elements : metricsServiceV2Api.listLogMetrics(formattedProjectName)) {
+   *     // doThingsWith(elements);
+   *   }
+   * }
+   * 
+ * * * * @@ -282,6 +292,19 @@ public final PageAccessor listLogMetrics(String projectName) { /** * Lists logs-based metrics. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = MetricsServiceV2Api.formatProjectName("[PROJECT]");
+   *   ListLogMetricsRequest request = ListLogMetricsRequest.newBuilder()
+   *     .setProjectName(formattedProjectName)
+   *     .build();
+   *   for (LogMetric elements : metricsServiceV2Api.listLogMetrics(request)) {
+   *     // doThingsWith(elements);
+   *   }
+   * }
+   * 
+ * * * * @@ -296,6 +319,21 @@ public final PageAccessor listLogMetrics(ListLogMetricsRequest reques /** * Lists logs-based metrics. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = MetricsServiceV2Api.formatProjectName("[PROJECT]");
+   *   ListLogMetricsRequest request = ListLogMetricsRequest.newBuilder()
+   *     .setProjectName(formattedProjectName)
+   *     .build();
+   *   ListenableFuture<PageAccessor<LogMetric>> future = metricsServiceV2Api.listLogMetricsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (LogMetric elements : future.get()) {
+   *     // doThingsWith(elements);
+   *   }
+   * }
+   * 
+ * * * */ @@ -308,6 +346,28 @@ public final PageAccessor listLogMetrics(ListLogMetricsRequest reques /** * Lists logs-based metrics. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = MetricsServiceV2Api.formatProjectName("[PROJECT]");
+   *   ListLogMetricsRequest request = ListLogMetricsRequest.newBuilder()
+   *     .setProjectName(formattedProjectName)
+   *     .build();
+   *   while (true) {
+   *     ListLogMetricsResponse response = metricsServiceV2Api.listLogMetricsCallable().call(request);
+   *     for (LogMetric elements : response.getMetricsList()) {
+   *       // doThingsWith(elements);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ * * * */ @@ -321,6 +381,14 @@ public final ApiCallable listLogM /** * Gets a logs-based metric. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
+   *   LogMetric response = metricsServiceV2Api.getLogMetric(formattedMetricName);
+   * }
+   * 
+ * * * * @@ -339,6 +407,17 @@ public final LogMetric getLogMetric(String metricName) { /** * Gets a logs-based metric. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
+   *   GetLogMetricRequest request = GetLogMetricRequest.newBuilder()
+   *     .setMetricName(formattedMetricName)
+   *     .build();
+   *   LogMetric response = metricsServiceV2Api.getLogMetric(request);
+   * }
+   * 
+ * * * * @@ -353,6 +432,19 @@ private LogMetric getLogMetric(GetLogMetricRequest request) { /** * Gets a logs-based metric. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
+   *   GetLogMetricRequest request = GetLogMetricRequest.newBuilder()
+   *     .setMetricName(formattedMetricName)
+   *     .build();
+   *   ListenableFuture<LogMetric> future = metricsServiceV2Api.getLogMetricCallable().futureCall(request);
+   *   // Do something
+   *   LogMetric response = future.get();
+   * }
+   * 
+ * * * */ @@ -366,6 +458,15 @@ public final ApiCallable getLogMetricCallable() /** * Creates a logs-based metric. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = MetricsServiceV2Api.formatProjectName("[PROJECT]");
+   *   LogMetric metric = LogMetric.newBuilder().build();
+   *   LogMetric response = metricsServiceV2Api.createLogMetric(formattedProjectName, metric);
+   * }
+   * 
+ * * * * @@ -389,6 +490,19 @@ public final LogMetric createLogMetric(String projectName, LogMetric metric) { /** * Creates a logs-based metric. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = MetricsServiceV2Api.formatProjectName("[PROJECT]");
+   *   LogMetric metric = LogMetric.newBuilder().build();
+   *   CreateLogMetricRequest request = CreateLogMetricRequest.newBuilder()
+   *     .setProjectName(formattedProjectName)
+   *     .setMetric(metric)
+   *     .build();
+   *   LogMetric response = metricsServiceV2Api.createLogMetric(request);
+   * }
+   * 
+ * * * * @@ -403,6 +517,21 @@ public LogMetric createLogMetric(CreateLogMetricRequest request) { /** * Creates a logs-based metric. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedProjectName = MetricsServiceV2Api.formatProjectName("[PROJECT]");
+   *   LogMetric metric = LogMetric.newBuilder().build();
+   *   CreateLogMetricRequest request = CreateLogMetricRequest.newBuilder()
+   *     .setProjectName(formattedProjectName)
+   *     .setMetric(metric)
+   *     .build();
+   *   ListenableFuture<LogMetric> future = metricsServiceV2Api.createLogMetricCallable().futureCall(request);
+   *   // Do something
+   *   LogMetric response = future.get();
+   * }
+   * 
+ * * * */ @@ -416,6 +545,15 @@ public final ApiCallable createLogMetricCalla /** * Creates or updates a logs-based metric. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
+   *   LogMetric metric = LogMetric.newBuilder().build();
+   *   LogMetric response = metricsServiceV2Api.updateLogMetric(formattedMetricName, metric);
+   * }
+   * 
+ * * * * @@ -442,6 +580,19 @@ public final LogMetric updateLogMetric(String metricName, LogMetric metric) { /** * Creates or updates a logs-based metric. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
+   *   LogMetric metric = LogMetric.newBuilder().build();
+   *   UpdateLogMetricRequest request = UpdateLogMetricRequest.newBuilder()
+   *     .setMetricName(formattedMetricName)
+   *     .setMetric(metric)
+   *     .build();
+   *   LogMetric response = metricsServiceV2Api.updateLogMetric(request);
+   * }
+   * 
+ * * * * @@ -456,6 +607,21 @@ public LogMetric updateLogMetric(UpdateLogMetricRequest request) { /** * Creates or updates a logs-based metric. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
+   *   LogMetric metric = LogMetric.newBuilder().build();
+   *   UpdateLogMetricRequest request = UpdateLogMetricRequest.newBuilder()
+   *     .setMetricName(formattedMetricName)
+   *     .setMetric(metric)
+   *     .build();
+   *   ListenableFuture<LogMetric> future = metricsServiceV2Api.updateLogMetricCallable().futureCall(request);
+   *   // Do something
+   *   LogMetric response = future.get();
+   * }
+   * 
+ * * * */ @@ -469,6 +635,14 @@ public final ApiCallable updateLogMetricCalla /** * Deletes a logs-based metric. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
+   *   metricsServiceV2Api.deleteLogMetric(formattedMetricName);
+   * }
+   * 
+ * * * * @@ -487,6 +661,17 @@ public final void deleteLogMetric(String metricName) { /** * Deletes a logs-based metric. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
+   *   DeleteLogMetricRequest request = DeleteLogMetricRequest.newBuilder()
+   *     .setMetricName(formattedMetricName)
+   *     .build();
+   *   metricsServiceV2Api.deleteLogMetric(request);
+   * }
+   * 
+ * * * * @@ -501,6 +686,19 @@ private void deleteLogMetric(DeleteLogMetricRequest request) { /** * Deletes a logs-based metric. * + * Sample code: + *

+   * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+   *   String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
+   *   DeleteLogMetricRequest request = DeleteLogMetricRequest.newBuilder()
+   *     .setMetricName(formattedMetricName)
+   *     .build();
+   *   ListenableFuture<Void> future = metricsServiceV2Api.deleteLogMetricCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ * * * */ diff --git a/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/package-info.java b/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/package-info.java new file mode 100644 index 000000000000..81ee3d3fce7e --- /dev/null +++ b/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/package-info.java @@ -0,0 +1,86 @@ +/* + * Copyright 2016 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. + */ + +/* + * EDITING INSTRUCTIONS + * This file was automatically generated. For the short term, the process for + * refreshing this file will only be runnable by Google engineers. + * Manual additions are allowed because the refresh process performs + * a 3-way merge in order to preserve those manual additions. In order to not + * break the refresh process, additional documentation should be added between + * "manual edit" demarcations. + * + * Other generated files allow additional edits - see the editing instructions + * in those files for more details. + * + * Happy editing! + */ + +/** + * A client to Google Cloud Logging API. + * + * The interfaces provided are listed below, along with a usage sample + * + * =================== + * LoggingServiceV2Api + * =================== + * + * Service Description: Service for ingesting and querying logs. + * + * Sample for LoggingServiceV2Api: + *
+ * 
+ * try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.createWithDefaults()) {
+ *   String formattedLogName = LoggingServiceV2Api.formatLogName("[PROJECT]", "[LOG]");
+ *   loggingServiceV2Api.deleteLog(formattedLogName);
+ * }
+ * 
+ * 
+ * + * ================== + * ConfigServiceV2Api + * ================== + * + * Service Description: + * + * Sample for ConfigServiceV2Api: + *
+ * 
+ * try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.createWithDefaults()) {
+ *   String formattedProjectName = ConfigServiceV2Api.formatProjectName("[PROJECT]");
+ *   ListSinksResponse response = configServiceV2Api.listSinks(formattedProjectName);
+ * }
+ * 
+ * 
+ * + * =================== + * MetricsServiceV2Api + * =================== + * + * Service Description: + * + * Sample for MetricsServiceV2Api: + *
+ * 
+ * try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.createWithDefaults()) {
+ *   String formattedProjectName = MetricsServiceV2Api.formatProjectName("[PROJECT]");
+ *   ListLogMetricsResponse response = metricsServiceV2Api.listLogMetrics(formattedProjectName);
+ * }
+ * 
+ * 
+ * + * + * + */ +package com.google.cloud.logging.spi.v2; diff --git a/pom.xml b/pom.xml index 3cfa57b45c96..48165c9ba952 100644 --- a/pom.xml +++ b/pom.xml @@ -100,6 +100,7 @@ gcloud-java-datastore gcloud-java-examples gcloud-java-pubsub + gcloud-java-logging gcloud-java-resourcemanager gcloud-java-storage From 53c0f24d5a929b731845e6a6f4aa7c98067752ec Mon Sep 17 00:00:00 2001 From: Shin Fan Date: Wed, 8 Jun 2016 17:16:00 -0700 Subject: [PATCH 3/5] Update grpc dependencies. --- gcloud-java-logging/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcloud-java-logging/pom.xml b/gcloud-java-logging/pom.xml index c36dd39da092..02b004b681d7 100644 --- a/gcloud-java-logging/pom.xml +++ b/gcloud-java-logging/pom.xml @@ -25,12 +25,12 @@ com.google.api.grpc grpc-logging-type - 0.0.1 + 0.0.2 com.google.api.grpc grpc-logging-v2 - 0.0.1 + 0.0.2 io.grpc From 2c9b46e64f53c190f7b6bf1032c2c37d3421b533 Mon Sep 17 00:00:00 2001 From: Shin Fan Date: Wed, 8 Jun 2016 17:27:44 -0700 Subject: [PATCH 4/5] Update local logging implemenration. --- gcloud-java-logging/.classpath | 32 +++++++++++++++++++ .../spi/v2/testing/LocalLoggingImpl.java | 18 ----------- 2 files changed, 32 insertions(+), 18 deletions(-) create mode 100644 gcloud-java-logging/.classpath diff --git a/gcloud-java-logging/.classpath b/gcloud-java-logging/.classpath new file mode 100644 index 000000000000..19d2611e3109 --- /dev/null +++ b/gcloud-java-logging/.classpath @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/testing/LocalLoggingImpl.java b/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/testing/LocalLoggingImpl.java index 142c48b248e0..81e09944f935 100644 --- a/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/testing/LocalLoggingImpl.java +++ b/gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/testing/LocalLoggingImpl.java @@ -21,8 +21,6 @@ import com.google.logging.v2.ListMonitoredResourceDescriptorsResponse; import com.google.logging.v2.LogEntry; import com.google.logging.v2.LoggingServiceV2Grpc; -import com.google.logging.v2.ReadLogEntriesRequest; -import com.google.logging.v2.ReadLogEntriesResponse; import com.google.logging.v2.WriteLogEntriesRequest; import com.google.logging.v2.WriteLogEntriesResponse; import com.google.protobuf.ByteString; @@ -77,22 +75,6 @@ public void listLogEntries( responseObserver.onCompleted(); } - @Override - public void readLogEntries( - ReadLogEntriesRequest request, StreamObserver responseObserver) { - List entries = new ArrayList<>(); - for (ByteString proj : request.getProjectIdsList().asByteStringList()) { - String prefix = "projects/" + proj.toStringUtf8() + "/"; - for (Map.Entry> entry : logs.entrySet()) { - if (entry.getKey().startsWith(prefix)) { - entries.addAll(entry.getValue()); - } - } - } - responseObserver.onNext(ReadLogEntriesResponse.newBuilder().addAllEntries(entries).build()); - responseObserver.onCompleted(); - } - @Override public void listMonitoredResourceDescriptors( ListMonitoredResourceDescriptorsRequest request, From 1fe17bb38c1336184d882b3eec0b57be09fad546 Mon Sep 17 00:00:00 2001 From: Shin Fan Date: Thu, 9 Jun 2016 14:52:40 -0700 Subject: [PATCH 5/5] Remove gax related files and .classpath --- .../main/java/com/google/api/AuthProto.java | 107 - .../java/com/google/api/AuthProvider.java | 871 -- .../com/google/api/AuthProviderOrBuilder.java | 89 - .../java/com/google/api/AuthRequirement.java | 699 -- .../google/api/AuthRequirementOrBuilder.java | 65 - .../java/com/google/api/Authentication.java | 1205 --- .../google/api/AuthenticationOrBuilder.java | 97 - .../com/google/api/AuthenticationRule.java | 1234 --- .../api/AuthenticationRuleOrBuilder.java | 107 - .../src/main/java/com/google/api/Control.java | 507 -- .../java/com/google/api/ControlOrBuilder.java | 29 - .../java/com/google/api/ControlProto.java | 50 - .../java/com/google/api/LabelDescriptor.java | 864 -- .../google/api/LabelDescriptorOrBuilder.java | 62 - .../main/java/com/google/api/LabelProto.java | 53 - .../java/com/google/api/LogDescriptor.java | 1304 --- .../google/api/LogDescriptorOrBuilder.java | 127 - .../main/java/com/google/api/LogProto.java | 55 - .../src/main/java/com/google/api/Logging.java | 2176 ----- .../java/com/google/api/LoggingOrBuilder.java | 127 - .../java/com/google/api/LoggingProto.java | 72 - .../java/com/google/api/MetricDescriptor.java | 2450 ------ .../google/api/MetricDescriptorOrBuilder.java | 301 - .../main/java/com/google/api/MetricProto.java | 63 - .../com/google/api/MonitoredResource.java | 670 -- .../api/MonitoredResourceDescriptor.java | 1278 --- .../MonitoredResourceDescriptorOrBuilder.java | 123 - .../api/MonitoredResourceOrBuilder.java | 45 - .../google/api/MonitoredResourceProto.java | 82 - .../main/java/com/google/api/Monitoring.java | 2192 ----- .../com/google/api/MonitoringOrBuilder.java | 127 - .../java/com/google/api/MonitoringProto.java | 72 - .../com/google/api/OAuthRequirements.java | 532 -- .../api/OAuthRequirementsOrBuilder.java | 35 - .../src/main/java/com/google/api/Service.java | 7113 ----------------- .../google/api/ServiceControlAccessProto.java | 42 - .../java/com/google/api/ServiceOrBuilder.java | 817 -- .../java/com/google/api/ServiceProto.java | 126 - .../src/main/java/com/google/api/Usage.java | 2088 ----- .../java/com/google/api/UsageOrBuilder.java | 266 - .../main/java/com/google/api/UsageProto.java | 69 - .../main/java/com/google/api/UsageRule.java | 600 -- .../com/google/api/UsageRuleOrBuilder.java | 40 - .../main/java/com/google/protobuf/Any.java | 810 -- .../com/google/protobuf/AnyOrBuilder.java | 74 - .../java/com/google/protobuf/AnyProto.java | 52 - .../main/java/com/google/protobuf/Api.java | 2474 ------ .../com/google/protobuf/ApiOrBuilder.java | 266 - .../java/com/google/protobuf/ApiProto.java | 91 - .../java/com/google/protobuf/BoolValue.java | 428 - .../google/protobuf/BoolValueOrBuilder.java | 18 - .../java/com/google/protobuf/BytesValue.java | 430 - .../google/protobuf/BytesValueOrBuilder.java | 18 - .../java/com/google/protobuf/DoubleValue.java | 430 - .../google/protobuf/DoubleValueOrBuilder.java | 18 - .../java/com/google/protobuf/Duration.java | 586 -- .../google/protobuf/DurationOrBuilder.java | 33 - .../com/google/protobuf/DurationProto.java | 52 - .../main/java/com/google/protobuf/Empty.java | 362 - .../com/google/protobuf/EmptyOrBuilder.java | 9 - .../java/com/google/protobuf/EmptyProto.java | 51 - .../main/java/com/google/protobuf/Enum.java | 1719 ---- .../com/google/protobuf/EnumOrBuilder.java | 157 - .../java/com/google/protobuf/EnumValue.java | 1019 --- .../google/protobuf/EnumValueOrBuilder.java | 80 - .../main/java/com/google/protobuf/Field.java | 2413 ------ .../java/com/google/protobuf/FieldMask.java | 763 -- .../google/protobuf/FieldMaskOrBuilder.java | 44 - .../com/google/protobuf/FieldMaskProto.java | 52 - .../com/google/protobuf/FieldOrBuilder.java | 189 - .../java/com/google/protobuf/FloatValue.java | 430 - .../google/protobuf/FloatValueOrBuilder.java | 18 - .../java/com/google/protobuf/Int32Value.java | 427 - .../google/protobuf/Int32ValueOrBuilder.java | 18 - .../java/com/google/protobuf/Int64Value.java | 428 - .../google/protobuf/Int64ValueOrBuilder.java | 18 - .../java/com/google/protobuf/ListValue.java | 789 -- .../google/protobuf/ListValueOrBuilder.java | 53 - .../main/java/com/google/protobuf/Method.java | 1516 ---- .../com/google/protobuf/MethodOrBuilder.java | 142 - .../main/java/com/google/protobuf/Mixin.java | 790 -- .../com/google/protobuf/MixinOrBuilder.java | 47 - .../java/com/google/protobuf/NullValue.java | 103 - .../main/java/com/google/protobuf/Option.java | 737 -- .../com/google/protobuf/OptionOrBuilder.java | 52 - .../com/google/protobuf/SourceContext.java | 515 -- .../protobuf/SourceContextOrBuilder.java | 29 - .../google/protobuf/SourceContextProto.java | 52 - .../java/com/google/protobuf/StringValue.java | 508 -- .../google/protobuf/StringValueOrBuilder.java | 27 - .../main/java/com/google/protobuf/Struct.java | 530 -- .../com/google/protobuf/StructOrBuilder.java | 19 - .../java/com/google/protobuf/StructProto.java | 95 - .../main/java/com/google/protobuf/Syntax.java | 118 - .../java/com/google/protobuf/Timestamp.java | 620 -- .../google/protobuf/TimestampOrBuilder.java | 32 - .../com/google/protobuf/TimestampProto.java | 52 - .../main/java/com/google/protobuf/Type.java | 1941 ----- .../com/google/protobuf/TypeOrBuilder.java | 192 - .../java/com/google/protobuf/TypeProto.java | 134 - .../java/com/google/protobuf/UInt32Value.java | 427 - .../google/protobuf/UInt32ValueOrBuilder.java | 18 - .../java/com/google/protobuf/UInt64Value.java | 428 - .../google/protobuf/UInt64ValueOrBuilder.java | 18 - .../main/java/com/google/protobuf/Value.java | 1361 ---- .../com/google/protobuf/ValueOrBuilder.java | 98 - .../com/google/protobuf/WrappersProto.java | 146 - .../java/com/google/api/AnnotationsProto.java | 222 - .../test/java/com/google/api/AuthProto.java | 107 - .../java/com/google/api/AuthProvider.java | 871 -- .../com/google/api/AuthProviderOrBuilder.java | 89 - .../java/com/google/api/AuthRequirement.java | 699 -- .../google/api/AuthRequirementOrBuilder.java | 65 - .../java/com/google/api/Authentication.java | 1205 --- .../google/api/AuthenticationOrBuilder.java | 97 - .../com/google/api/AuthenticationRule.java | 1234 --- .../api/AuthenticationRuleOrBuilder.java | 107 - .../src/test/java/com/google/api/Context.java | 779 -- .../java/com/google/api/ContextOrBuilder.java | 53 - .../java/com/google/api/ContextProto.java | 64 - .../test/java/com/google/api/ContextRule.java | 922 --- .../com/google/api/ContextRuleOrBuilder.java | 99 - .../src/test/java/com/google/api/Control.java | 507 -- .../java/com/google/api/ControlOrBuilder.java | 29 - .../java/com/google/api/ControlProto.java | 50 - .../test/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/test/java/com/google/api/Http.java | 759 -- .../java/com/google/api/HttpOrBuilder.java | 53 - .../test/java/com/google/api/HttpProto.java | 106 - .../test/java/com/google/api/HttpRule.java | 3069 ------- .../com/google/api/HttpRuleOrBuilder.java | 276 - .../java/com/google/api/LabelDescriptor.java | 864 -- .../google/api/LabelDescriptorOrBuilder.java | 62 - .../test/java/com/google/api/LabelProto.java | 53 - .../java/com/google/api/LogDescriptor.java | 1304 --- .../google/api/LogDescriptorOrBuilder.java | 127 - .../test/java/com/google/api/LogProto.java | 55 - .../src/test/java/com/google/api/Logging.java | 2176 ----- .../java/com/google/api/LoggingOrBuilder.java | 127 - .../java/com/google/api/LoggingProto.java | 72 - .../java/com/google/api/MediaDownload.java | 399 - .../google/api/MediaDownloadOrBuilder.java | 18 - .../test/java/com/google/api/MediaUpload.java | 399 - .../com/google/api/MediaUploadOrBuilder.java | 18 - .../java/com/google/api/MetricDescriptor.java | 2450 ------ .../google/api/MetricDescriptorOrBuilder.java | 301 - .../test/java/com/google/api/MetricProto.java | 63 - .../com/google/api/MonitoredResource.java | 670 -- .../api/MonitoredResourceDescriptor.java | 1278 --- .../MonitoredResourceDescriptorOrBuilder.java | 123 - .../api/MonitoredResourceOrBuilder.java | 45 - .../google/api/MonitoredResourceProto.java | 82 - .../test/java/com/google/api/Monitoring.java | 2192 ----- .../com/google/api/MonitoringOrBuilder.java | 127 - .../java/com/google/api/MonitoringProto.java | 72 - .../com/google/api/OAuthRequirements.java | 532 -- .../api/OAuthRequirementsOrBuilder.java | 35 - .../src/test/java/com/google/api/Page.java | 1176 --- .../java/com/google/api/PageOrBuilder.java | 120 - .../src/test/java/com/google/api/Service.java | 7113 ----------------- .../google/api/ServiceControlAccessProto.java | 42 - .../java/com/google/api/ServiceOrBuilder.java | 817 -- .../java/com/google/api/ServiceProto.java | 126 - .../src/test/java/com/google/api/Usage.java | 2088 ----- .../java/com/google/api/UsageOrBuilder.java | 266 - .../test/java/com/google/api/UsageProto.java | 69 - .../test/java/com/google/api/UsageRule.java | 600 -- .../com/google/api/UsageRuleOrBuilder.java | 40 - .../test/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/OperationsProto.java | 146 - .../test/java/com/google/protobuf/Any.java | 810 -- .../com/google/protobuf/AnyOrBuilder.java | 74 - .../java/com/google/protobuf/AnyProto.java | 52 - .../test/java/com/google/protobuf/Api.java | 2474 ------ .../com/google/protobuf/ApiOrBuilder.java | 266 - .../java/com/google/protobuf/ApiProto.java | 91 - .../java/com/google/protobuf/BoolValue.java | 428 - .../google/protobuf/BoolValueOrBuilder.java | 18 - .../java/com/google/protobuf/BytesValue.java | 430 - .../google/protobuf/BytesValueOrBuilder.java | 18 - .../java/com/google/protobuf/DoubleValue.java | 430 - .../google/protobuf/DoubleValueOrBuilder.java | 18 - .../java/com/google/protobuf/Duration.java | 586 -- .../google/protobuf/DurationOrBuilder.java | 33 - .../com/google/protobuf/DurationProto.java | 52 - .../test/java/com/google/protobuf/Empty.java | 362 - .../com/google/protobuf/EmptyOrBuilder.java | 9 - .../java/com/google/protobuf/EmptyProto.java | 51 - .../test/java/com/google/protobuf/Enum.java | 1719 ---- .../com/google/protobuf/EnumOrBuilder.java | 157 - .../java/com/google/protobuf/EnumValue.java | 1019 --- .../google/protobuf/EnumValueOrBuilder.java | 80 - .../test/java/com/google/protobuf/Field.java | 2413 ------ .../java/com/google/protobuf/FieldMask.java | 763 -- .../google/protobuf/FieldMaskOrBuilder.java | 44 - .../com/google/protobuf/FieldMaskProto.java | 52 - .../com/google/protobuf/FieldOrBuilder.java | 189 - .../java/com/google/protobuf/FloatValue.java | 430 - .../google/protobuf/FloatValueOrBuilder.java | 18 - .../java/com/google/protobuf/Int32Value.java | 427 - .../google/protobuf/Int32ValueOrBuilder.java | 18 - .../java/com/google/protobuf/Int64Value.java | 428 - .../google/protobuf/Int64ValueOrBuilder.java | 18 - .../java/com/google/protobuf/ListValue.java | 789 -- .../google/protobuf/ListValueOrBuilder.java | 53 - .../test/java/com/google/protobuf/Method.java | 1516 ---- .../com/google/protobuf/MethodOrBuilder.java | 142 - .../test/java/com/google/protobuf/Mixin.java | 790 -- .../com/google/protobuf/MixinOrBuilder.java | 47 - .../java/com/google/protobuf/NullValue.java | 103 - .../test/java/com/google/protobuf/Option.java | 737 -- .../com/google/protobuf/OptionOrBuilder.java | 52 - .../com/google/protobuf/SourceContext.java | 515 -- .../protobuf/SourceContextOrBuilder.java | 29 - .../google/protobuf/SourceContextProto.java | 52 - .../java/com/google/protobuf/StringValue.java | 508 -- .../google/protobuf/StringValueOrBuilder.java | 27 - .../test/java/com/google/protobuf/Struct.java | 530 -- .../com/google/protobuf/StructOrBuilder.java | 19 - .../java/com/google/protobuf/StructProto.java | 95 - .../test/java/com/google/protobuf/Syntax.java | 118 - .../java/com/google/protobuf/Timestamp.java | 620 -- .../google/protobuf/TimestampOrBuilder.java | 32 - .../com/google/protobuf/TimestampProto.java | 52 - .../test/java/com/google/protobuf/Type.java | 1941 ----- .../com/google/protobuf/TypeOrBuilder.java | 192 - .../java/com/google/protobuf/TypeProto.java | 134 - .../java/com/google/protobuf/UInt32Value.java | 427 - .../google/protobuf/UInt32ValueOrBuilder.java | 18 - .../java/com/google/protobuf/UInt64Value.java | 428 - .../google/protobuf/UInt64ValueOrBuilder.java | 18 - .../test/java/com/google/protobuf/Value.java | 1361 ---- .../com/google/protobuf/ValueOrBuilder.java | 98 - .../com/google/protobuf/WrappersProto.java | 146 - .../test/java/com/google/rpc/BadRequest.java | 1437 ---- .../com/google/rpc/BadRequestOrBuilder.java | 53 - .../src/test/java/com/google/rpc/Code.java | 543 -- .../test/java/com/google/rpc/CodeProto.java | 46 - .../test/java/com/google/rpc/DebugInfo.java | 697 -- .../com/google/rpc/DebugInfoOrBuilder.java | 62 - .../com/google/rpc/ErrorDetailsProto.java | 167 - .../src/test/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 - .../test/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 - .../test/java/com/google/rpc/RetryInfo.java | 565 -- .../com/google/rpc/RetryInfoOrBuilder.java | 34 - .../src/test/java/com/google/rpc/Status.java | 1092 --- .../java/com/google/rpc/StatusOrBuilder.java | 89 - .../test/java/com/google/rpc/StatusProto.java | 54 - .../src/test/java/com/google/type/Color.java | 1047 --- .../java/com/google/type/ColorOrBuilder.java | 85 - .../test/java/com/google/type/ColorProto.java | 55 - .../src/test/java/com/google/type/Date.java | 593 -- .../java/com/google/type/DateOrBuilder.java | 38 - .../test/java/com/google/type/DateProto.java | 51 - .../test/java/com/google/type/DayOfWeek.java | 220 - .../java/com/google/type/DayOfWeekProto.java | 42 - .../src/test/java/com/google/type/LatLng.java | 513 -- .../java/com/google/type/LatLngOrBuilder.java | 27 - .../java/com/google/type/LatLngProto.java | 51 - .../src/test/java/com/google/type/Money.java | 640 -- .../java/com/google/type/MoneyOrBuilder.java | 51 - .../test/java/com/google/type/MoneyProto.java | 51 - .../test/java/com/google/type/TimeOfDay.java | 659 -- .../com/google/type/TimeOfDayOrBuilder.java | 47 - .../java/com/google/type/TimeOfDayProto.java | 52 - .../test/java/io/gapi/gax/protobuf/Test.java | 2113 ----- gcloud-java-logging/.classpath | 32 - 300 files changed, 146796 deletions(-) delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/AuthProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/AuthProvider.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/AuthProviderOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/AuthRequirement.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/AuthRequirementOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/Authentication.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/AuthenticationOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/AuthenticationRule.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/AuthenticationRuleOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/Control.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/ControlOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/ControlProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/LabelDescriptor.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/LabelDescriptorOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/LabelProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/LogDescriptor.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/LogDescriptorOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/LogProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/Logging.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/LoggingOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/LoggingProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/MetricDescriptor.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/MetricDescriptorOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/MetricProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResource.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceDescriptor.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceDescriptorOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/Monitoring.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/MonitoringOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/MonitoringProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/OAuthRequirements.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/OAuthRequirementsOrBuilder.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/ServiceControlAccessProto.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/Usage.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/UsageOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/UsageProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/UsageRule.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/UsageRuleOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/Any.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/AnyOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/AnyProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/Api.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/ApiOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/ApiProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/BoolValue.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/BoolValueOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/BytesValue.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/BytesValueOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/DoubleValue.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/DoubleValueOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/Duration.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/DurationOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/DurationProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/Empty.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/EmptyOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/EmptyProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/Enum.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/EnumOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/EnumValue.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/EnumValueOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/Field.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldMask.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldMaskOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldMaskProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/FloatValue.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/FloatValueOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int32Value.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int32ValueOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int64Value.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int64ValueOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/ListValue.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/ListValueOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/Method.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/MethodOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/Mixin.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/MixinOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/NullValue.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/Option.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/OptionOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/SourceContext.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/SourceContextOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/SourceContextProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/StringValue.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/StringValueOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/Struct.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/StructOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/StructProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/Syntax.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/Timestamp.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/TimestampOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/TimestampProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/Type.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/TypeOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/TypeProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/UInt32Value.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/UInt32ValueOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/UInt64Value.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/UInt64ValueOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/Value.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/ValueOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/protobuf/WrappersProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/AnnotationsProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/AuthProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/AuthProvider.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/AuthProviderOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/AuthRequirement.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/AuthRequirementOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/Authentication.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/AuthenticationOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/AuthenticationRule.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/AuthenticationRuleOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/Context.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/ContextOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/ContextProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/ContextRule.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/ContextRuleOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/Control.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/ControlOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/ControlProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/CustomError.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/CustomErrorOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/CustomErrorRule.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/CustomErrorRuleOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/CustomHttpPattern.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/CustomHttpPatternOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/Documentation.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/DocumentationOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/DocumentationProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/DocumentationRule.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/DocumentationRuleOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/ErrorFormatProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/Http.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/HttpOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/HttpProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/HttpRule.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/HttpRuleOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/LabelDescriptor.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/LabelDescriptorOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/LabelProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/LogDescriptor.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/LogDescriptorOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/LogProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/Logging.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/LoggingOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/LoggingProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/MediaDownload.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/MediaDownloadOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/MediaUpload.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/MediaUploadOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/MetricDescriptor.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/MetricDescriptorOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/MetricProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/MonitoredResource.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/MonitoredResourceDescriptor.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/MonitoredResourceDescriptorOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/MonitoredResourceOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/MonitoredResourceProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/Monitoring.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/MonitoringOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/MonitoringProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/OAuthRequirements.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/OAuthRequirementsOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/Page.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/PageOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/Service.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/ServiceControlAccessProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/ServiceOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/ServiceProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/Usage.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/UsageOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/UsageProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/UsageRule.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/UsageRuleOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/Visibility.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/VisibilityOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/VisibilityProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/VisibilityRule.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/api/VisibilityRuleOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/longrunning/CancelOperationRequest.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/longrunning/CancelOperationRequestOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/longrunning/DeleteOperationRequest.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/longrunning/DeleteOperationRequestOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/longrunning/GetOperationRequest.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/longrunning/GetOperationRequestOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/longrunning/ListOperationsRequest.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/longrunning/ListOperationsRequestOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/longrunning/ListOperationsResponse.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/longrunning/ListOperationsResponseOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/longrunning/Operation.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/longrunning/OperationOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/longrunning/OperationsProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/Any.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/AnyOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/AnyProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/Api.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/ApiOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/ApiProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/BoolValue.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/BoolValueOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/BytesValue.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/BytesValueOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/DoubleValue.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/DoubleValueOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/Duration.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/DurationOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/DurationProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/Empty.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/EmptyOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/EmptyProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/Enum.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/EnumOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/EnumValue.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/EnumValueOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/Field.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/FieldMask.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/FieldMaskOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/FieldMaskProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/FieldOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/FloatValue.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/FloatValueOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/Int32Value.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/Int32ValueOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/Int64Value.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/Int64ValueOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/ListValue.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/ListValueOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/Method.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/MethodOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/Mixin.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/MixinOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/NullValue.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/Option.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/OptionOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/SourceContext.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/SourceContextOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/SourceContextProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/StringValue.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/StringValueOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/Struct.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/StructOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/StructProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/Syntax.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/Timestamp.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/TimestampOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/TimestampProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/Type.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/TypeOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/TypeProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/UInt32Value.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/UInt32ValueOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/UInt64Value.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/UInt64ValueOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/Value.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/ValueOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/protobuf/WrappersProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/rpc/BadRequest.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/rpc/BadRequestOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/rpc/Code.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/rpc/CodeProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/rpc/DebugInfo.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/rpc/DebugInfoOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/rpc/ErrorDetailsProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/rpc/Help.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/rpc/HelpOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/rpc/QuotaFailure.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/rpc/QuotaFailureOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/rpc/RequestInfo.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/rpc/RequestInfoOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/rpc/ResourceInfo.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/rpc/ResourceInfoOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/rpc/RetryInfo.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/rpc/RetryInfoOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/rpc/Status.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/rpc/StatusOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/rpc/StatusProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/type/Color.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/type/ColorOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/type/ColorProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/type/Date.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/type/DateOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/type/DateProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/type/DayOfWeek.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/type/DayOfWeekProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/type/LatLng.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/type/LatLngOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/type/LatLngProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/type/Money.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/type/MoneyOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/type/MoneyProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/type/TimeOfDay.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/type/TimeOfDayOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/test/java/com/google/type/TimeOfDayProto.java delete mode 100644 gcloud-java-gax/generated/src/test/java/io/gapi/gax/protobuf/Test.java delete mode 100644 gcloud-java-logging/.classpath diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/AuthProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/AuthProto.java deleted file mode 100644 index bc11666bab4c..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/AuthProto.java +++ /dev/null @@ -1,107 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/auth.proto - -package com.google.api; - -public final class AuthProto { - private AuthProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_Authentication_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_Authentication_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_AuthenticationRule_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_AuthenticationRule_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_AuthProvider_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_AuthProvider_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_OAuthRequirements_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_OAuthRequirements_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_AuthRequirement_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_AuthRequirement_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/auth.proto\022\ngoogle.api\032\034goo" + - "gle/api/annotations.proto\"l\n\016Authenticat" + - "ion\022-\n\005rules\030\003 \003(\0132\036.google.api.Authenti" + - "cationRule\022+\n\tproviders\030\004 \003(\0132\030.google.a" + - "pi.AuthProvider\"\251\001\n\022AuthenticationRule\022\020" + - "\n\010selector\030\001 \001(\t\022,\n\005oauth\030\002 \001(\0132\035.google" + - ".api.OAuthRequirements\022 \n\030allow_without_" + - "credential\030\005 \001(\010\0221\n\014requirements\030\007 \003(\0132\033" + - ".google.api.AuthRequirement\"<\n\014AuthProvi" + - "der\022\n\n\002id\030\001 \001(\t\022\016\n\006issuer\030\002 \001(\t\022\020\n\010jwks_", - "uri\030\003 \001(\t\"-\n\021OAuthRequirements\022\030\n\020canoni" + - "cal_scopes\030\001 \001(\t\"9\n\017AuthRequirement\022\023\n\013p" + - "rovider_id\030\001 \001(\t\022\021\n\taudiences\030\002 \001(\tB\035\n\016c" + - "om.google.apiB\tAuthProtoP\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(), - }, assigner); - internal_static_google_api_Authentication_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_api_Authentication_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_Authentication_descriptor, - new java.lang.String[] { "Rules", "Providers", }); - internal_static_google_api_AuthenticationRule_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_api_AuthenticationRule_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_AuthenticationRule_descriptor, - new java.lang.String[] { "Selector", "Oauth", "AllowWithoutCredential", "Requirements", }); - internal_static_google_api_AuthProvider_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_api_AuthProvider_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_AuthProvider_descriptor, - new java.lang.String[] { "Id", "Issuer", "JwksUri", }); - internal_static_google_api_OAuthRequirements_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_api_OAuthRequirements_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_OAuthRequirements_descriptor, - new java.lang.String[] { "CanonicalScopes", }); - internal_static_google_api_AuthRequirement_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_api_AuthRequirement_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_AuthRequirement_descriptor, - new java.lang.String[] { "ProviderId", "Audiences", }); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/AuthProvider.java b/gcloud-java-gax/generated/src/main/java/com/google/api/AuthProvider.java deleted file mode 100644 index b51cf09e550d..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/AuthProvider.java +++ /dev/null @@ -1,871 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/auth.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.AuthProvider} - * - *
- * Configuration for an anthentication provider, including support for
- * [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
- * 
- */ -public final class AuthProvider extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.AuthProvider) - AuthProviderOrBuilder { - // Use AuthProvider.newBuilder() to construct. - private AuthProvider(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private AuthProvider() { - id_ = ""; - issuer_ = ""; - jwksUri_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private AuthProvider( - 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(); - - id_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - issuer_ = s; - break; - } - case 26: { - String s = input.readStringRequireUtf8(); - - jwksUri_ = 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.AuthProto.internal_static_google_api_AuthProvider_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.AuthProto.internal_static_google_api_AuthProvider_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.AuthProvider.class, com.google.api.AuthProvider.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - private volatile java.lang.Object id_; - /** - * optional string id = 1; - * - *
-   * The unique identifier of the auth provider. It will be referred to by
-   * `AuthRequirement.provider_id`.
-   * Example: "bookstore_auth".
-   * 
- */ - public java.lang.String getId() { - java.lang.Object ref = id_; - 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(); - id_ = s; - return s; - } - } - /** - * optional string id = 1; - * - *
-   * The unique identifier of the auth provider. It will be referred to by
-   * `AuthRequirement.provider_id`.
-   * Example: "bookstore_auth".
-   * 
- */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ISSUER_FIELD_NUMBER = 2; - private volatile java.lang.Object issuer_; - /** - * optional string issuer = 2; - * - *
-   * Identifies the principal that issued the JWT. See
-   * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
-   * Usually a URL or an email address.
-   * Example: https://securetoken.google.com
-   * Example: 1234567-compute@developer.gserviceaccount.com
-   * 
- */ - public java.lang.String getIssuer() { - java.lang.Object ref = issuer_; - 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(); - issuer_ = s; - return s; - } - } - /** - * optional string issuer = 2; - * - *
-   * Identifies the principal that issued the JWT. See
-   * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
-   * Usually a URL or an email address.
-   * Example: https://securetoken.google.com
-   * Example: 1234567-compute@developer.gserviceaccount.com
-   * 
- */ - public com.google.protobuf.ByteString - getIssuerBytes() { - java.lang.Object ref = issuer_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - issuer_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int JWKS_URI_FIELD_NUMBER = 3; - private volatile java.lang.Object jwksUri_; - /** - * optional string jwks_uri = 3; - * - *
-   * URL of the provider's public key set to validate signature of the JWT. See
-   * [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
-   * Optional if the key set document:
-   *  - can be retrieved from
-   *    [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
-   *    of the issuer.
-   *  - can be inferred from the email domain of the issuer (e.g. a Google service account).
-   * Example: https://www.googleapis.com/oauth2/v1/certs
-   * 
- */ - public java.lang.String getJwksUri() { - java.lang.Object ref = jwksUri_; - 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(); - jwksUri_ = s; - return s; - } - } - /** - * optional string jwks_uri = 3; - * - *
-   * URL of the provider's public key set to validate signature of the JWT. See
-   * [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
-   * Optional if the key set document:
-   *  - can be retrieved from
-   *    [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
-   *    of the issuer.
-   *  - can be inferred from the email domain of the issuer (e.g. a Google service account).
-   * Example: https://www.googleapis.com/oauth2/v1/certs
-   * 
- */ - public com.google.protobuf.ByteString - getJwksUriBytes() { - java.lang.Object ref = jwksUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - jwksUri_ = 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 (!getIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); - } - if (!getIssuerBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, issuer_); - } - if (!getJwksUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, jwksUri_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); - } - if (!getIssuerBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, issuer_); - } - if (!getJwksUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, jwksUri_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.AuthProvider parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.AuthProvider 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.AuthProvider parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.AuthProvider parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.AuthProvider parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.AuthProvider parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.AuthProvider parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.AuthProvider parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.AuthProvider parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.AuthProvider 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.AuthProvider 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.AuthProvider} - * - *
-   * Configuration for an anthentication provider, including support for
-   * [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.AuthProvider) - com.google.api.AuthProviderOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.AuthProto.internal_static_google_api_AuthProvider_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.AuthProto.internal_static_google_api_AuthProvider_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.AuthProvider.class, com.google.api.AuthProvider.Builder.class); - } - - // Construct using com.google.api.AuthProvider.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(); - id_ = ""; - - issuer_ = ""; - - jwksUri_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.AuthProto.internal_static_google_api_AuthProvider_descriptor; - } - - public com.google.api.AuthProvider getDefaultInstanceForType() { - return com.google.api.AuthProvider.getDefaultInstance(); - } - - public com.google.api.AuthProvider build() { - com.google.api.AuthProvider result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.AuthProvider buildPartial() { - com.google.api.AuthProvider result = new com.google.api.AuthProvider(this); - result.id_ = id_; - result.issuer_ = issuer_; - result.jwksUri_ = jwksUri_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.AuthProvider) { - return mergeFrom((com.google.api.AuthProvider)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.AuthProvider other) { - if (other == com.google.api.AuthProvider.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - onChanged(); - } - if (!other.getIssuer().isEmpty()) { - issuer_ = other.issuer_; - onChanged(); - } - if (!other.getJwksUri().isEmpty()) { - jwksUri_ = other.jwksUri_; - 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.AuthProvider parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.AuthProvider) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object id_ = ""; - /** - * optional string id = 1; - * - *
-     * The unique identifier of the auth provider. It will be referred to by
-     * `AuthRequirement.provider_id`.
-     * Example: "bookstore_auth".
-     * 
- */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string id = 1; - * - *
-     * The unique identifier of the auth provider. It will be referred to by
-     * `AuthRequirement.provider_id`.
-     * Example: "bookstore_auth".
-     * 
- */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string id = 1; - * - *
-     * The unique identifier of the auth provider. It will be referred to by
-     * `AuthRequirement.provider_id`.
-     * Example: "bookstore_auth".
-     * 
- */ - public Builder setId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - id_ = value; - onChanged(); - return this; - } - /** - * optional string id = 1; - * - *
-     * The unique identifier of the auth provider. It will be referred to by
-     * `AuthRequirement.provider_id`.
-     * Example: "bookstore_auth".
-     * 
- */ - public Builder clearId() { - - id_ = getDefaultInstance().getId(); - onChanged(); - return this; - } - /** - * optional string id = 1; - * - *
-     * The unique identifier of the auth provider. It will be referred to by
-     * `AuthRequirement.provider_id`.
-     * Example: "bookstore_auth".
-     * 
- */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - id_ = value; - onChanged(); - return this; - } - - private java.lang.Object issuer_ = ""; - /** - * optional string issuer = 2; - * - *
-     * Identifies the principal that issued the JWT. See
-     * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
-     * Usually a URL or an email address.
-     * Example: https://securetoken.google.com
-     * Example: 1234567-compute@developer.gserviceaccount.com
-     * 
- */ - public java.lang.String getIssuer() { - java.lang.Object ref = issuer_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - issuer_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string issuer = 2; - * - *
-     * Identifies the principal that issued the JWT. See
-     * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
-     * Usually a URL or an email address.
-     * Example: https://securetoken.google.com
-     * Example: 1234567-compute@developer.gserviceaccount.com
-     * 
- */ - public com.google.protobuf.ByteString - getIssuerBytes() { - java.lang.Object ref = issuer_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - issuer_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string issuer = 2; - * - *
-     * Identifies the principal that issued the JWT. See
-     * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
-     * Usually a URL or an email address.
-     * Example: https://securetoken.google.com
-     * Example: 1234567-compute@developer.gserviceaccount.com
-     * 
- */ - public Builder setIssuer( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - issuer_ = value; - onChanged(); - return this; - } - /** - * optional string issuer = 2; - * - *
-     * Identifies the principal that issued the JWT. See
-     * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
-     * Usually a URL or an email address.
-     * Example: https://securetoken.google.com
-     * Example: 1234567-compute@developer.gserviceaccount.com
-     * 
- */ - public Builder clearIssuer() { - - issuer_ = getDefaultInstance().getIssuer(); - onChanged(); - return this; - } - /** - * optional string issuer = 2; - * - *
-     * Identifies the principal that issued the JWT. See
-     * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
-     * Usually a URL or an email address.
-     * Example: https://securetoken.google.com
-     * Example: 1234567-compute@developer.gserviceaccount.com
-     * 
- */ - public Builder setIssuerBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - issuer_ = value; - onChanged(); - return this; - } - - private java.lang.Object jwksUri_ = ""; - /** - * optional string jwks_uri = 3; - * - *
-     * URL of the provider's public key set to validate signature of the JWT. See
-     * [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
-     * Optional if the key set document:
-     *  - can be retrieved from
-     *    [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
-     *    of the issuer.
-     *  - can be inferred from the email domain of the issuer (e.g. a Google service account).
-     * Example: https://www.googleapis.com/oauth2/v1/certs
-     * 
- */ - public java.lang.String getJwksUri() { - java.lang.Object ref = jwksUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jwksUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string jwks_uri = 3; - * - *
-     * URL of the provider's public key set to validate signature of the JWT. See
-     * [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
-     * Optional if the key set document:
-     *  - can be retrieved from
-     *    [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
-     *    of the issuer.
-     *  - can be inferred from the email domain of the issuer (e.g. a Google service account).
-     * Example: https://www.googleapis.com/oauth2/v1/certs
-     * 
- */ - public com.google.protobuf.ByteString - getJwksUriBytes() { - java.lang.Object ref = jwksUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - jwksUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string jwks_uri = 3; - * - *
-     * URL of the provider's public key set to validate signature of the JWT. See
-     * [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
-     * Optional if the key set document:
-     *  - can be retrieved from
-     *    [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
-     *    of the issuer.
-     *  - can be inferred from the email domain of the issuer (e.g. a Google service account).
-     * Example: https://www.googleapis.com/oauth2/v1/certs
-     * 
- */ - public Builder setJwksUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - jwksUri_ = value; - onChanged(); - return this; - } - /** - * optional string jwks_uri = 3; - * - *
-     * URL of the provider's public key set to validate signature of the JWT. See
-     * [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
-     * Optional if the key set document:
-     *  - can be retrieved from
-     *    [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
-     *    of the issuer.
-     *  - can be inferred from the email domain of the issuer (e.g. a Google service account).
-     * Example: https://www.googleapis.com/oauth2/v1/certs
-     * 
- */ - public Builder clearJwksUri() { - - jwksUri_ = getDefaultInstance().getJwksUri(); - onChanged(); - return this; - } - /** - * optional string jwks_uri = 3; - * - *
-     * URL of the provider's public key set to validate signature of the JWT. See
-     * [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
-     * Optional if the key set document:
-     *  - can be retrieved from
-     *    [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
-     *    of the issuer.
-     *  - can be inferred from the email domain of the issuer (e.g. a Google service account).
-     * Example: https://www.googleapis.com/oauth2/v1/certs
-     * 
- */ - public Builder setJwksUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - jwksUri_ = 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.AuthProvider) - } - - // @@protoc_insertion_point(class_scope:google.api.AuthProvider) - private static final com.google.api.AuthProvider DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.AuthProvider(); - } - - public static com.google.api.AuthProvider getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public AuthProvider parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new AuthProvider(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.AuthProvider getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/AuthProviderOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/AuthProviderOrBuilder.java deleted file mode 100644 index d608c53c1181..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/AuthProviderOrBuilder.java +++ /dev/null @@ -1,89 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/auth.proto - -package com.google.api; - -public interface AuthProviderOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.AuthProvider) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string id = 1; - * - *
-   * The unique identifier of the auth provider. It will be referred to by
-   * `AuthRequirement.provider_id`.
-   * Example: "bookstore_auth".
-   * 
- */ - java.lang.String getId(); - /** - * optional string id = 1; - * - *
-   * The unique identifier of the auth provider. It will be referred to by
-   * `AuthRequirement.provider_id`.
-   * Example: "bookstore_auth".
-   * 
- */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - * optional string issuer = 2; - * - *
-   * Identifies the principal that issued the JWT. See
-   * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
-   * Usually a URL or an email address.
-   * Example: https://securetoken.google.com
-   * Example: 1234567-compute@developer.gserviceaccount.com
-   * 
- */ - java.lang.String getIssuer(); - /** - * optional string issuer = 2; - * - *
-   * Identifies the principal that issued the JWT. See
-   * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
-   * Usually a URL or an email address.
-   * Example: https://securetoken.google.com
-   * Example: 1234567-compute@developer.gserviceaccount.com
-   * 
- */ - com.google.protobuf.ByteString - getIssuerBytes(); - - /** - * optional string jwks_uri = 3; - * - *
-   * URL of the provider's public key set to validate signature of the JWT. See
-   * [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
-   * Optional if the key set document:
-   *  - can be retrieved from
-   *    [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
-   *    of the issuer.
-   *  - can be inferred from the email domain of the issuer (e.g. a Google service account).
-   * Example: https://www.googleapis.com/oauth2/v1/certs
-   * 
- */ - java.lang.String getJwksUri(); - /** - * optional string jwks_uri = 3; - * - *
-   * URL of the provider's public key set to validate signature of the JWT. See
-   * [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
-   * Optional if the key set document:
-   *  - can be retrieved from
-   *    [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
-   *    of the issuer.
-   *  - can be inferred from the email domain of the issuer (e.g. a Google service account).
-   * Example: https://www.googleapis.com/oauth2/v1/certs
-   * 
- */ - com.google.protobuf.ByteString - getJwksUriBytes(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/AuthRequirement.java b/gcloud-java-gax/generated/src/main/java/com/google/api/AuthRequirement.java deleted file mode 100644 index e83a3f49df98..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/AuthRequirement.java +++ /dev/null @@ -1,699 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/auth.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.AuthRequirement} - * - *
- * User-defined authentication requirements, including support for
- * [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
- * 
- */ -public final class AuthRequirement extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.AuthRequirement) - AuthRequirementOrBuilder { - // Use AuthRequirement.newBuilder() to construct. - private AuthRequirement(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private AuthRequirement() { - providerId_ = ""; - audiences_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private AuthRequirement( - 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(); - - providerId_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - audiences_ = 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.AuthProto.internal_static_google_api_AuthRequirement_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.AuthProto.internal_static_google_api_AuthRequirement_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.AuthRequirement.class, com.google.api.AuthRequirement.Builder.class); - } - - public static final int PROVIDER_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object providerId_; - /** - * optional string provider_id = 1; - * - *
-   * [id][AuthProvider.id] from authentication provider.
-   * Example:
-   *     provider_id: bookstore_auth
-   * 
- */ - public java.lang.String getProviderId() { - java.lang.Object ref = providerId_; - 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(); - providerId_ = s; - return s; - } - } - /** - * optional string provider_id = 1; - * - *
-   * [id][AuthProvider.id] from authentication provider.
-   * Example:
-   *     provider_id: bookstore_auth
-   * 
- */ - public com.google.protobuf.ByteString - getProviderIdBytes() { - java.lang.Object ref = providerId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - providerId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AUDIENCES_FIELD_NUMBER = 2; - private volatile java.lang.Object audiences_; - /** - * optional string audiences = 2; - * - *
-   * The list of JWT
-   * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
-   * that are allowed to access. A JWT containing any of these audiences will
-   * be accepted. When this setting is absent, only JWTs with audience
-   * "https://[Service_name][Service.name]/[API_name][google.protobuf.Api.name]"
-   * will be accepted.
-   * Example:
-   *     audiences: bookstore_android.apps.googleusercontent.com,
-   *                bookstore_web.apps.googleusercontent.com
-   * 
- */ - public java.lang.String getAudiences() { - java.lang.Object ref = audiences_; - 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(); - audiences_ = s; - return s; - } - } - /** - * optional string audiences = 2; - * - *
-   * The list of JWT
-   * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
-   * that are allowed to access. A JWT containing any of these audiences will
-   * be accepted. When this setting is absent, only JWTs with audience
-   * "https://[Service_name][Service.name]/[API_name][google.protobuf.Api.name]"
-   * will be accepted.
-   * Example:
-   *     audiences: bookstore_android.apps.googleusercontent.com,
-   *                bookstore_web.apps.googleusercontent.com
-   * 
- */ - public com.google.protobuf.ByteString - getAudiencesBytes() { - java.lang.Object ref = audiences_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - audiences_ = 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 (!getProviderIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, providerId_); - } - if (!getAudiencesBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, audiences_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getProviderIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, providerId_); - } - if (!getAudiencesBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, audiences_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.AuthRequirement parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.AuthRequirement 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.AuthRequirement parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.AuthRequirement parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.AuthRequirement parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.AuthRequirement parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.AuthRequirement parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.AuthRequirement parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.AuthRequirement parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.AuthRequirement 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.AuthRequirement 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.AuthRequirement} - * - *
-   * User-defined authentication requirements, including support for
-   * [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.AuthRequirement) - com.google.api.AuthRequirementOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.AuthProto.internal_static_google_api_AuthRequirement_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.AuthProto.internal_static_google_api_AuthRequirement_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.AuthRequirement.class, com.google.api.AuthRequirement.Builder.class); - } - - // Construct using com.google.api.AuthRequirement.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(); - providerId_ = ""; - - audiences_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.AuthProto.internal_static_google_api_AuthRequirement_descriptor; - } - - public com.google.api.AuthRequirement getDefaultInstanceForType() { - return com.google.api.AuthRequirement.getDefaultInstance(); - } - - public com.google.api.AuthRequirement build() { - com.google.api.AuthRequirement result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.AuthRequirement buildPartial() { - com.google.api.AuthRequirement result = new com.google.api.AuthRequirement(this); - result.providerId_ = providerId_; - result.audiences_ = audiences_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.AuthRequirement) { - return mergeFrom((com.google.api.AuthRequirement)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.AuthRequirement other) { - if (other == com.google.api.AuthRequirement.getDefaultInstance()) return this; - if (!other.getProviderId().isEmpty()) { - providerId_ = other.providerId_; - onChanged(); - } - if (!other.getAudiences().isEmpty()) { - audiences_ = other.audiences_; - 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.AuthRequirement parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.AuthRequirement) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object providerId_ = ""; - /** - * optional string provider_id = 1; - * - *
-     * [id][AuthProvider.id] from authentication provider.
-     * Example:
-     *     provider_id: bookstore_auth
-     * 
- */ - public java.lang.String getProviderId() { - java.lang.Object ref = providerId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - providerId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string provider_id = 1; - * - *
-     * [id][AuthProvider.id] from authentication provider.
-     * Example:
-     *     provider_id: bookstore_auth
-     * 
- */ - public com.google.protobuf.ByteString - getProviderIdBytes() { - java.lang.Object ref = providerId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - providerId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string provider_id = 1; - * - *
-     * [id][AuthProvider.id] from authentication provider.
-     * Example:
-     *     provider_id: bookstore_auth
-     * 
- */ - public Builder setProviderId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - providerId_ = value; - onChanged(); - return this; - } - /** - * optional string provider_id = 1; - * - *
-     * [id][AuthProvider.id] from authentication provider.
-     * Example:
-     *     provider_id: bookstore_auth
-     * 
- */ - public Builder clearProviderId() { - - providerId_ = getDefaultInstance().getProviderId(); - onChanged(); - return this; - } - /** - * optional string provider_id = 1; - * - *
-     * [id][AuthProvider.id] from authentication provider.
-     * Example:
-     *     provider_id: bookstore_auth
-     * 
- */ - public Builder setProviderIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - providerId_ = value; - onChanged(); - return this; - } - - private java.lang.Object audiences_ = ""; - /** - * optional string audiences = 2; - * - *
-     * The list of JWT
-     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
-     * that are allowed to access. A JWT containing any of these audiences will
-     * be accepted. When this setting is absent, only JWTs with audience
-     * "https://[Service_name][Service.name]/[API_name][google.protobuf.Api.name]"
-     * will be accepted.
-     * Example:
-     *     audiences: bookstore_android.apps.googleusercontent.com,
-     *                bookstore_web.apps.googleusercontent.com
-     * 
- */ - public java.lang.String getAudiences() { - java.lang.Object ref = audiences_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - audiences_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string audiences = 2; - * - *
-     * The list of JWT
-     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
-     * that are allowed to access. A JWT containing any of these audiences will
-     * be accepted. When this setting is absent, only JWTs with audience
-     * "https://[Service_name][Service.name]/[API_name][google.protobuf.Api.name]"
-     * will be accepted.
-     * Example:
-     *     audiences: bookstore_android.apps.googleusercontent.com,
-     *                bookstore_web.apps.googleusercontent.com
-     * 
- */ - public com.google.protobuf.ByteString - getAudiencesBytes() { - java.lang.Object ref = audiences_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - audiences_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string audiences = 2; - * - *
-     * The list of JWT
-     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
-     * that are allowed to access. A JWT containing any of these audiences will
-     * be accepted. When this setting is absent, only JWTs with audience
-     * "https://[Service_name][Service.name]/[API_name][google.protobuf.Api.name]"
-     * will be accepted.
-     * Example:
-     *     audiences: bookstore_android.apps.googleusercontent.com,
-     *                bookstore_web.apps.googleusercontent.com
-     * 
- */ - public Builder setAudiences( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - audiences_ = value; - onChanged(); - return this; - } - /** - * optional string audiences = 2; - * - *
-     * The list of JWT
-     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
-     * that are allowed to access. A JWT containing any of these audiences will
-     * be accepted. When this setting is absent, only JWTs with audience
-     * "https://[Service_name][Service.name]/[API_name][google.protobuf.Api.name]"
-     * will be accepted.
-     * Example:
-     *     audiences: bookstore_android.apps.googleusercontent.com,
-     *                bookstore_web.apps.googleusercontent.com
-     * 
- */ - public Builder clearAudiences() { - - audiences_ = getDefaultInstance().getAudiences(); - onChanged(); - return this; - } - /** - * optional string audiences = 2; - * - *
-     * The list of JWT
-     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
-     * that are allowed to access. A JWT containing any of these audiences will
-     * be accepted. When this setting is absent, only JWTs with audience
-     * "https://[Service_name][Service.name]/[API_name][google.protobuf.Api.name]"
-     * will be accepted.
-     * Example:
-     *     audiences: bookstore_android.apps.googleusercontent.com,
-     *                bookstore_web.apps.googleusercontent.com
-     * 
- */ - public Builder setAudiencesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - audiences_ = 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.AuthRequirement) - } - - // @@protoc_insertion_point(class_scope:google.api.AuthRequirement) - private static final com.google.api.AuthRequirement DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.AuthRequirement(); - } - - public static com.google.api.AuthRequirement getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public AuthRequirement parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new AuthRequirement(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.AuthRequirement getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/AuthRequirementOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/AuthRequirementOrBuilder.java deleted file mode 100644 index 3d6a2b19f76d..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/AuthRequirementOrBuilder.java +++ /dev/null @@ -1,65 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/auth.proto - -package com.google.api; - -public interface AuthRequirementOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.AuthRequirement) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string provider_id = 1; - * - *
-   * [id][AuthProvider.id] from authentication provider.
-   * Example:
-   *     provider_id: bookstore_auth
-   * 
- */ - java.lang.String getProviderId(); - /** - * optional string provider_id = 1; - * - *
-   * [id][AuthProvider.id] from authentication provider.
-   * Example:
-   *     provider_id: bookstore_auth
-   * 
- */ - com.google.protobuf.ByteString - getProviderIdBytes(); - - /** - * optional string audiences = 2; - * - *
-   * The list of JWT
-   * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
-   * that are allowed to access. A JWT containing any of these audiences will
-   * be accepted. When this setting is absent, only JWTs with audience
-   * "https://[Service_name][Service.name]/[API_name][google.protobuf.Api.name]"
-   * will be accepted.
-   * Example:
-   *     audiences: bookstore_android.apps.googleusercontent.com,
-   *                bookstore_web.apps.googleusercontent.com
-   * 
- */ - java.lang.String getAudiences(); - /** - * optional string audiences = 2; - * - *
-   * The list of JWT
-   * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
-   * that are allowed to access. A JWT containing any of these audiences will
-   * be accepted. When this setting is absent, only JWTs with audience
-   * "https://[Service_name][Service.name]/[API_name][google.protobuf.Api.name]"
-   * will be accepted.
-   * Example:
-   *     audiences: bookstore_android.apps.googleusercontent.com,
-   *                bookstore_web.apps.googleusercontent.com
-   * 
- */ - com.google.protobuf.ByteString - getAudiencesBytes(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/Authentication.java b/gcloud-java-gax/generated/src/main/java/com/google/api/Authentication.java deleted file mode 100644 index 5a575e19ca89..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/Authentication.java +++ /dev/null @@ -1,1205 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/auth.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.Authentication} - * - *
- * (== page authentication ==)
- * `Authentication` defines the authentication configuration for an API.
- * Example for an API targeted for external use:
- *     name: calendar.googleapis.com
- *     authentication:
- *       rules:
- *       - selector: "*"
- *         oauth:
- *           canonical_scopes: https://www.googleapis.com/auth/calendar
- *       - selector: google.calendar.Delegate
- *         oauth:
- *           canonical_scopes: https://www.googleapis.com/auth/calendar.read
- * 
- */ -public final class Authentication extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.Authentication) - AuthenticationOrBuilder { - // Use Authentication.newBuilder() to construct. - private Authentication(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Authentication() { - rules_ = java.util.Collections.emptyList(); - providers_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Authentication( - 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 26: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - rules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - rules_.add(input.readMessage(com.google.api.AuthenticationRule.parser(), extensionRegistry)); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - providers_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - providers_.add(input.readMessage(com.google.api.AuthProvider.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_); - } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - providers_ = java.util.Collections.unmodifiableList(providers_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.AuthProto.internal_static_google_api_Authentication_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.AuthProto.internal_static_google_api_Authentication_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Authentication.class, com.google.api.Authentication.Builder.class); - } - - public static final int RULES_FIELD_NUMBER = 3; - private java.util.List rules_; - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-   * Individual rules for authentication.
-   * 
- */ - public java.util.List getRulesList() { - return rules_; - } - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-   * Individual rules for authentication.
-   * 
- */ - public java.util.List - getRulesOrBuilderList() { - return rules_; - } - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-   * Individual rules for authentication.
-   * 
- */ - public int getRulesCount() { - return rules_.size(); - } - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-   * Individual rules for authentication.
-   * 
- */ - public com.google.api.AuthenticationRule getRules(int index) { - return rules_.get(index); - } - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-   * Individual rules for authentication.
-   * 
- */ - public com.google.api.AuthenticationRuleOrBuilder getRulesOrBuilder( - int index) { - return rules_.get(index); - } - - public static final int PROVIDERS_FIELD_NUMBER = 4; - private java.util.List providers_; - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-   * Defines a set of authentication providers that a service supports.
-   * 
- */ - public java.util.List getProvidersList() { - return providers_; - } - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-   * Defines a set of authentication providers that a service supports.
-   * 
- */ - public java.util.List - getProvidersOrBuilderList() { - return providers_; - } - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-   * Defines a set of authentication providers that a service supports.
-   * 
- */ - public int getProvidersCount() { - return providers_.size(); - } - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-   * Defines a set of authentication providers that a service supports.
-   * 
- */ - public com.google.api.AuthProvider getProviders(int index) { - return providers_.get(index); - } - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-   * Defines a set of authentication providers that a service supports.
-   * 
- */ - public com.google.api.AuthProviderOrBuilder getProvidersOrBuilder( - int index) { - return providers_.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(3, rules_.get(i)); - } - for (int i = 0; i < providers_.size(); i++) { - output.writeMessage(4, providers_.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(3, rules_.get(i)); - } - for (int i = 0; i < providers_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, providers_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.Authentication parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Authentication 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.Authentication parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Authentication parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.Authentication parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Authentication parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.Authentication parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.Authentication parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.Authentication parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Authentication 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.Authentication 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.Authentication} - * - *
-   * (== page authentication ==)
-   * `Authentication` defines the authentication configuration for an API.
-   * Example for an API targeted for external use:
-   *     name: calendar.googleapis.com
-   *     authentication:
-   *       rules:
-   *       - selector: "*"
-   *         oauth:
-   *           canonical_scopes: https://www.googleapis.com/auth/calendar
-   *       - selector: google.calendar.Delegate
-   *         oauth:
-   *           canonical_scopes: https://www.googleapis.com/auth/calendar.read
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.Authentication) - com.google.api.AuthenticationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.AuthProto.internal_static_google_api_Authentication_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.AuthProto.internal_static_google_api_Authentication_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Authentication.class, com.google.api.Authentication.Builder.class); - } - - // Construct using com.google.api.Authentication.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(); - getProvidersFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (rulesBuilder_ == null) { - rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - rulesBuilder_.clear(); - } - if (providersBuilder_ == null) { - providers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - providersBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.AuthProto.internal_static_google_api_Authentication_descriptor; - } - - public com.google.api.Authentication getDefaultInstanceForType() { - return com.google.api.Authentication.getDefaultInstance(); - } - - public com.google.api.Authentication build() { - com.google.api.Authentication result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.Authentication buildPartial() { - com.google.api.Authentication result = new com.google.api.Authentication(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 (providersBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - providers_ = java.util.Collections.unmodifiableList(providers_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.providers_ = providers_; - } else { - result.providers_ = providersBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.Authentication) { - return mergeFrom((com.google.api.Authentication)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.Authentication other) { - if (other == com.google.api.Authentication.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 (providersBuilder_ == null) { - if (!other.providers_.isEmpty()) { - if (providers_.isEmpty()) { - providers_ = other.providers_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureProvidersIsMutable(); - providers_.addAll(other.providers_); - } - onChanged(); - } - } else { - if (!other.providers_.isEmpty()) { - if (providersBuilder_.isEmpty()) { - providersBuilder_.dispose(); - providersBuilder_ = null; - providers_ = other.providers_; - bitField0_ = (bitField0_ & ~0x00000002); - providersBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getProvidersFieldBuilder() : null; - } else { - providersBuilder_.addAllMessages(other.providers_); - } - } - } - 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.Authentication parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.Authentication) 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.AuthenticationRule, com.google.api.AuthenticationRule.Builder, com.google.api.AuthenticationRuleOrBuilder> rulesBuilder_; - - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-     * Individual rules for authentication.
-     * 
- */ - public java.util.List getRulesList() { - if (rulesBuilder_ == null) { - return java.util.Collections.unmodifiableList(rules_); - } else { - return rulesBuilder_.getMessageList(); - } - } - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-     * Individual rules for authentication.
-     * 
- */ - public int getRulesCount() { - if (rulesBuilder_ == null) { - return rules_.size(); - } else { - return rulesBuilder_.getCount(); - } - } - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-     * Individual rules for authentication.
-     * 
- */ - public com.google.api.AuthenticationRule getRules(int index) { - if (rulesBuilder_ == null) { - return rules_.get(index); - } else { - return rulesBuilder_.getMessage(index); - } - } - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-     * Individual rules for authentication.
-     * 
- */ - public Builder setRules( - int index, com.google.api.AuthenticationRule 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.AuthenticationRule rules = 3; - * - *
-     * Individual rules for authentication.
-     * 
- */ - public Builder setRules( - int index, com.google.api.AuthenticationRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.set(index, builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-     * Individual rules for authentication.
-     * 
- */ - public Builder addRules(com.google.api.AuthenticationRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.add(value); - onChanged(); - } else { - rulesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-     * Individual rules for authentication.
-     * 
- */ - public Builder addRules( - int index, com.google.api.AuthenticationRule 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.AuthenticationRule rules = 3; - * - *
-     * Individual rules for authentication.
-     * 
- */ - public Builder addRules( - com.google.api.AuthenticationRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-     * Individual rules for authentication.
-     * 
- */ - public Builder addRules( - int index, com.google.api.AuthenticationRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(index, builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-     * Individual rules for authentication.
-     * 
- */ - 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.AuthenticationRule rules = 3; - * - *
-     * Individual rules for authentication.
-     * 
- */ - public Builder clearRules() { - if (rulesBuilder_ == null) { - rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - rulesBuilder_.clear(); - } - return this; - } - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-     * Individual rules for authentication.
-     * 
- */ - public Builder removeRules(int index) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.remove(index); - onChanged(); - } else { - rulesBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-     * Individual rules for authentication.
-     * 
- */ - public com.google.api.AuthenticationRule.Builder getRulesBuilder( - int index) { - return getRulesFieldBuilder().getBuilder(index); - } - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-     * Individual rules for authentication.
-     * 
- */ - public com.google.api.AuthenticationRuleOrBuilder getRulesOrBuilder( - int index) { - if (rulesBuilder_ == null) { - return rules_.get(index); } else { - return rulesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-     * Individual rules for authentication.
-     * 
- */ - public java.util.List - getRulesOrBuilderList() { - if (rulesBuilder_ != null) { - return rulesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(rules_); - } - } - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-     * Individual rules for authentication.
-     * 
- */ - public com.google.api.AuthenticationRule.Builder addRulesBuilder() { - return getRulesFieldBuilder().addBuilder( - com.google.api.AuthenticationRule.getDefaultInstance()); - } - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-     * Individual rules for authentication.
-     * 
- */ - public com.google.api.AuthenticationRule.Builder addRulesBuilder( - int index) { - return getRulesFieldBuilder().addBuilder( - index, com.google.api.AuthenticationRule.getDefaultInstance()); - } - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-     * Individual rules for authentication.
-     * 
- */ - public java.util.List - getRulesBuilderList() { - return getRulesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.AuthenticationRule, com.google.api.AuthenticationRule.Builder, com.google.api.AuthenticationRuleOrBuilder> - getRulesFieldBuilder() { - if (rulesBuilder_ == null) { - rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.api.AuthenticationRule, com.google.api.AuthenticationRule.Builder, com.google.api.AuthenticationRuleOrBuilder>( - rules_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - rules_ = null; - } - return rulesBuilder_; - } - - private java.util.List providers_ = - java.util.Collections.emptyList(); - private void ensureProvidersIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - providers_ = new java.util.ArrayList(providers_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.AuthProvider, com.google.api.AuthProvider.Builder, com.google.api.AuthProviderOrBuilder> providersBuilder_; - - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-     * Defines a set of authentication providers that a service supports.
-     * 
- */ - public java.util.List getProvidersList() { - if (providersBuilder_ == null) { - return java.util.Collections.unmodifiableList(providers_); - } else { - return providersBuilder_.getMessageList(); - } - } - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-     * Defines a set of authentication providers that a service supports.
-     * 
- */ - public int getProvidersCount() { - if (providersBuilder_ == null) { - return providers_.size(); - } else { - return providersBuilder_.getCount(); - } - } - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-     * Defines a set of authentication providers that a service supports.
-     * 
- */ - public com.google.api.AuthProvider getProviders(int index) { - if (providersBuilder_ == null) { - return providers_.get(index); - } else { - return providersBuilder_.getMessage(index); - } - } - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-     * Defines a set of authentication providers that a service supports.
-     * 
- */ - public Builder setProviders( - int index, com.google.api.AuthProvider value) { - if (providersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProvidersIsMutable(); - providers_.set(index, value); - onChanged(); - } else { - providersBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-     * Defines a set of authentication providers that a service supports.
-     * 
- */ - public Builder setProviders( - int index, com.google.api.AuthProvider.Builder builderForValue) { - if (providersBuilder_ == null) { - ensureProvidersIsMutable(); - providers_.set(index, builderForValue.build()); - onChanged(); - } else { - providersBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-     * Defines a set of authentication providers that a service supports.
-     * 
- */ - public Builder addProviders(com.google.api.AuthProvider value) { - if (providersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProvidersIsMutable(); - providers_.add(value); - onChanged(); - } else { - providersBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-     * Defines a set of authentication providers that a service supports.
-     * 
- */ - public Builder addProviders( - int index, com.google.api.AuthProvider value) { - if (providersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProvidersIsMutable(); - providers_.add(index, value); - onChanged(); - } else { - providersBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-     * Defines a set of authentication providers that a service supports.
-     * 
- */ - public Builder addProviders( - com.google.api.AuthProvider.Builder builderForValue) { - if (providersBuilder_ == null) { - ensureProvidersIsMutable(); - providers_.add(builderForValue.build()); - onChanged(); - } else { - providersBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-     * Defines a set of authentication providers that a service supports.
-     * 
- */ - public Builder addProviders( - int index, com.google.api.AuthProvider.Builder builderForValue) { - if (providersBuilder_ == null) { - ensureProvidersIsMutable(); - providers_.add(index, builderForValue.build()); - onChanged(); - } else { - providersBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-     * Defines a set of authentication providers that a service supports.
-     * 
- */ - public Builder addAllProviders( - java.lang.Iterable values) { - if (providersBuilder_ == null) { - ensureProvidersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, providers_); - onChanged(); - } else { - providersBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-     * Defines a set of authentication providers that a service supports.
-     * 
- */ - public Builder clearProviders() { - if (providersBuilder_ == null) { - providers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - providersBuilder_.clear(); - } - return this; - } - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-     * Defines a set of authentication providers that a service supports.
-     * 
- */ - public Builder removeProviders(int index) { - if (providersBuilder_ == null) { - ensureProvidersIsMutable(); - providers_.remove(index); - onChanged(); - } else { - providersBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-     * Defines a set of authentication providers that a service supports.
-     * 
- */ - public com.google.api.AuthProvider.Builder getProvidersBuilder( - int index) { - return getProvidersFieldBuilder().getBuilder(index); - } - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-     * Defines a set of authentication providers that a service supports.
-     * 
- */ - public com.google.api.AuthProviderOrBuilder getProvidersOrBuilder( - int index) { - if (providersBuilder_ == null) { - return providers_.get(index); } else { - return providersBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-     * Defines a set of authentication providers that a service supports.
-     * 
- */ - public java.util.List - getProvidersOrBuilderList() { - if (providersBuilder_ != null) { - return providersBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(providers_); - } - } - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-     * Defines a set of authentication providers that a service supports.
-     * 
- */ - public com.google.api.AuthProvider.Builder addProvidersBuilder() { - return getProvidersFieldBuilder().addBuilder( - com.google.api.AuthProvider.getDefaultInstance()); - } - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-     * Defines a set of authentication providers that a service supports.
-     * 
- */ - public com.google.api.AuthProvider.Builder addProvidersBuilder( - int index) { - return getProvidersFieldBuilder().addBuilder( - index, com.google.api.AuthProvider.getDefaultInstance()); - } - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-     * Defines a set of authentication providers that a service supports.
-     * 
- */ - public java.util.List - getProvidersBuilderList() { - return getProvidersFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.AuthProvider, com.google.api.AuthProvider.Builder, com.google.api.AuthProviderOrBuilder> - getProvidersFieldBuilder() { - if (providersBuilder_ == null) { - providersBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.api.AuthProvider, com.google.api.AuthProvider.Builder, com.google.api.AuthProviderOrBuilder>( - providers_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - providers_ = null; - } - return providersBuilder_; - } - 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.Authentication) - } - - // @@protoc_insertion_point(class_scope:google.api.Authentication) - private static final com.google.api.Authentication DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.Authentication(); - } - - public static com.google.api.Authentication getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Authentication parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Authentication(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.Authentication getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/AuthenticationOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/AuthenticationOrBuilder.java deleted file mode 100644 index 03bf8c77f326..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/AuthenticationOrBuilder.java +++ /dev/null @@ -1,97 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/auth.proto - -package com.google.api; - -public interface AuthenticationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.Authentication) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-   * Individual rules for authentication.
-   * 
- */ - java.util.List - getRulesList(); - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-   * Individual rules for authentication.
-   * 
- */ - com.google.api.AuthenticationRule getRules(int index); - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-   * Individual rules for authentication.
-   * 
- */ - int getRulesCount(); - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-   * Individual rules for authentication.
-   * 
- */ - java.util.List - getRulesOrBuilderList(); - /** - * repeated .google.api.AuthenticationRule rules = 3; - * - *
-   * Individual rules for authentication.
-   * 
- */ - com.google.api.AuthenticationRuleOrBuilder getRulesOrBuilder( - int index); - - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-   * Defines a set of authentication providers that a service supports.
-   * 
- */ - java.util.List - getProvidersList(); - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-   * Defines a set of authentication providers that a service supports.
-   * 
- */ - com.google.api.AuthProvider getProviders(int index); - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-   * Defines a set of authentication providers that a service supports.
-   * 
- */ - int getProvidersCount(); - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-   * Defines a set of authentication providers that a service supports.
-   * 
- */ - java.util.List - getProvidersOrBuilderList(); - /** - * repeated .google.api.AuthProvider providers = 4; - * - *
-   * Defines a set of authentication providers that a service supports.
-   * 
- */ - com.google.api.AuthProviderOrBuilder getProvidersOrBuilder( - int index); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/AuthenticationRule.java b/gcloud-java-gax/generated/src/main/java/com/google/api/AuthenticationRule.java deleted file mode 100644 index 93bd30b82a2a..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/AuthenticationRule.java +++ /dev/null @@ -1,1234 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/auth.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.AuthenticationRule} - * - *
- * Authentication rules for the service.
- * By default, if a method has any authentication requirements, every request
- * must include a valid credential matching one of the requirements.
- * It's an error to include more than one kind of credential in a single
- * request.
- * If a method doesn't have any auth requirements, request credentials will be
- * ignored.
- * (--GOOGLE_INTERNAL:
- * If a method doesn't have any matching auth rules, One Platform auth isn't
- * enforced. Instead, ESF acts as a stubby proxy. Any side channel credentials
- * will be forwarded to the application without verification. If
- * --enable_esf_delegation=true and --rpc_proxy_whitelist allows it, the API
- * backend will also be sent the client's LOAS role. See
- * wiki/Main/StubbyDelegation for more information.
- * --)
- * 
- */ -public final class AuthenticationRule extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.AuthenticationRule) - AuthenticationRuleOrBuilder { - // Use AuthenticationRule.newBuilder() to construct. - private AuthenticationRule(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private AuthenticationRule() { - selector_ = ""; - allowWithoutCredential_ = false; - requirements_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private AuthenticationRule( - 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: { - com.google.api.OAuthRequirements.Builder subBuilder = null; - if (oauth_ != null) { - subBuilder = oauth_.toBuilder(); - } - oauth_ = input.readMessage(com.google.api.OAuthRequirements.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(oauth_); - oauth_ = subBuilder.buildPartial(); - } - - break; - } - case 40: { - - allowWithoutCredential_ = input.readBool(); - break; - } - case 58: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - requirements_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - requirements_.add(input.readMessage(com.google.api.AuthRequirement.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_ & 0x00000008) == 0x00000008)) { - requirements_ = java.util.Collections.unmodifiableList(requirements_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.AuthProto.internal_static_google_api_AuthenticationRule_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.AuthProto.internal_static_google_api_AuthenticationRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.AuthenticationRule.class, com.google.api.AuthenticationRule.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 OAUTH_FIELD_NUMBER = 2; - private com.google.api.OAuthRequirements oauth_; - /** - * optional .google.api.OAuthRequirements oauth = 2; - * - *
-   * The requirements for OAuth credentials.
-   * 
- */ - public boolean hasOauth() { - return oauth_ != null; - } - /** - * optional .google.api.OAuthRequirements oauth = 2; - * - *
-   * The requirements for OAuth credentials.
-   * 
- */ - public com.google.api.OAuthRequirements getOauth() { - return oauth_ == null ? com.google.api.OAuthRequirements.getDefaultInstance() : oauth_; - } - /** - * optional .google.api.OAuthRequirements oauth = 2; - * - *
-   * The requirements for OAuth credentials.
-   * 
- */ - public com.google.api.OAuthRequirementsOrBuilder getOauthOrBuilder() { - return getOauth(); - } - - public static final int ALLOW_WITHOUT_CREDENTIAL_FIELD_NUMBER = 5; - private boolean allowWithoutCredential_; - /** - * optional bool allow_without_credential = 5; - * - *
-   * Whether to allow requests without a credential.
-   * 
- */ - public boolean getAllowWithoutCredential() { - return allowWithoutCredential_; - } - - public static final int REQUIREMENTS_FIELD_NUMBER = 7; - private java.util.List requirements_; - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-   * Requirements for additional authentication providers.
-   * 
- */ - public java.util.List getRequirementsList() { - return requirements_; - } - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-   * Requirements for additional authentication providers.
-   * 
- */ - public java.util.List - getRequirementsOrBuilderList() { - return requirements_; - } - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-   * Requirements for additional authentication providers.
-   * 
- */ - public int getRequirementsCount() { - return requirements_.size(); - } - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-   * Requirements for additional authentication providers.
-   * 
- */ - public com.google.api.AuthRequirement getRequirements(int index) { - return requirements_.get(index); - } - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-   * Requirements for additional authentication providers.
-   * 
- */ - public com.google.api.AuthRequirementOrBuilder getRequirementsOrBuilder( - int index) { - return requirements_.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 (oauth_ != null) { - output.writeMessage(2, getOauth()); - } - if (allowWithoutCredential_ != false) { - output.writeBool(5, allowWithoutCredential_); - } - for (int i = 0; i < requirements_.size(); i++) { - output.writeMessage(7, requirements_.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 (oauth_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getOauth()); - } - if (allowWithoutCredential_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, allowWithoutCredential_); - } - for (int i = 0; i < requirements_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, requirements_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.AuthenticationRule parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.AuthenticationRule 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.AuthenticationRule parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.AuthenticationRule parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.AuthenticationRule parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.AuthenticationRule parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.AuthenticationRule parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.AuthenticationRule parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.AuthenticationRule parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.AuthenticationRule 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.AuthenticationRule 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.AuthenticationRule} - * - *
-   * Authentication rules for the service.
-   * By default, if a method has any authentication requirements, every request
-   * must include a valid credential matching one of the requirements.
-   * It's an error to include more than one kind of credential in a single
-   * request.
-   * If a method doesn't have any auth requirements, request credentials will be
-   * ignored.
-   * (--GOOGLE_INTERNAL:
-   * If a method doesn't have any matching auth rules, One Platform auth isn't
-   * enforced. Instead, ESF acts as a stubby proxy. Any side channel credentials
-   * will be forwarded to the application without verification. If
-   * --enable_esf_delegation=true and --rpc_proxy_whitelist allows it, the API
-   * backend will also be sent the client's LOAS role. See
-   * wiki/Main/StubbyDelegation for more information.
-   * --)
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.AuthenticationRule) - com.google.api.AuthenticationRuleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.AuthProto.internal_static_google_api_AuthenticationRule_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.AuthProto.internal_static_google_api_AuthenticationRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.AuthenticationRule.class, com.google.api.AuthenticationRule.Builder.class); - } - - // Construct using com.google.api.AuthenticationRule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getRequirementsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - selector_ = ""; - - if (oauthBuilder_ == null) { - oauth_ = null; - } else { - oauth_ = null; - oauthBuilder_ = null; - } - allowWithoutCredential_ = false; - - if (requirementsBuilder_ == null) { - requirements_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - requirementsBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.AuthProto.internal_static_google_api_AuthenticationRule_descriptor; - } - - public com.google.api.AuthenticationRule getDefaultInstanceForType() { - return com.google.api.AuthenticationRule.getDefaultInstance(); - } - - public com.google.api.AuthenticationRule build() { - com.google.api.AuthenticationRule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.AuthenticationRule buildPartial() { - com.google.api.AuthenticationRule result = new com.google.api.AuthenticationRule(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.selector_ = selector_; - if (oauthBuilder_ == null) { - result.oauth_ = oauth_; - } else { - result.oauth_ = oauthBuilder_.build(); - } - result.allowWithoutCredential_ = allowWithoutCredential_; - if (requirementsBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { - requirements_ = java.util.Collections.unmodifiableList(requirements_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.requirements_ = requirements_; - } else { - result.requirements_ = requirementsBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.AuthenticationRule) { - return mergeFrom((com.google.api.AuthenticationRule)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.AuthenticationRule other) { - if (other == com.google.api.AuthenticationRule.getDefaultInstance()) return this; - if (!other.getSelector().isEmpty()) { - selector_ = other.selector_; - onChanged(); - } - if (other.hasOauth()) { - mergeOauth(other.getOauth()); - } - if (other.getAllowWithoutCredential() != false) { - setAllowWithoutCredential(other.getAllowWithoutCredential()); - } - if (requirementsBuilder_ == null) { - if (!other.requirements_.isEmpty()) { - if (requirements_.isEmpty()) { - requirements_ = other.requirements_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureRequirementsIsMutable(); - requirements_.addAll(other.requirements_); - } - onChanged(); - } - } else { - if (!other.requirements_.isEmpty()) { - if (requirementsBuilder_.isEmpty()) { - requirementsBuilder_.dispose(); - requirementsBuilder_ = null; - requirements_ = other.requirements_; - bitField0_ = (bitField0_ & ~0x00000008); - requirementsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getRequirementsFieldBuilder() : null; - } else { - requirementsBuilder_.addAllMessages(other.requirements_); - } - } - } - 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.AuthenticationRule parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.AuthenticationRule) 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.api.OAuthRequirements oauth_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.api.OAuthRequirements, com.google.api.OAuthRequirements.Builder, com.google.api.OAuthRequirementsOrBuilder> oauthBuilder_; - /** - * optional .google.api.OAuthRequirements oauth = 2; - * - *
-     * The requirements for OAuth credentials.
-     * 
- */ - public boolean hasOauth() { - return oauthBuilder_ != null || oauth_ != null; - } - /** - * optional .google.api.OAuthRequirements oauth = 2; - * - *
-     * The requirements for OAuth credentials.
-     * 
- */ - public com.google.api.OAuthRequirements getOauth() { - if (oauthBuilder_ == null) { - return oauth_ == null ? com.google.api.OAuthRequirements.getDefaultInstance() : oauth_; - } else { - return oauthBuilder_.getMessage(); - } - } - /** - * optional .google.api.OAuthRequirements oauth = 2; - * - *
-     * The requirements for OAuth credentials.
-     * 
- */ - public Builder setOauth(com.google.api.OAuthRequirements value) { - if (oauthBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - oauth_ = value; - onChanged(); - } else { - oauthBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.api.OAuthRequirements oauth = 2; - * - *
-     * The requirements for OAuth credentials.
-     * 
- */ - public Builder setOauth( - com.google.api.OAuthRequirements.Builder builderForValue) { - if (oauthBuilder_ == null) { - oauth_ = builderForValue.build(); - onChanged(); - } else { - oauthBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.api.OAuthRequirements oauth = 2; - * - *
-     * The requirements for OAuth credentials.
-     * 
- */ - public Builder mergeOauth(com.google.api.OAuthRequirements value) { - if (oauthBuilder_ == null) { - if (oauth_ != null) { - oauth_ = - com.google.api.OAuthRequirements.newBuilder(oauth_).mergeFrom(value).buildPartial(); - } else { - oauth_ = value; - } - onChanged(); - } else { - oauthBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.api.OAuthRequirements oauth = 2; - * - *
-     * The requirements for OAuth credentials.
-     * 
- */ - public Builder clearOauth() { - if (oauthBuilder_ == null) { - oauth_ = null; - onChanged(); - } else { - oauth_ = null; - oauthBuilder_ = null; - } - - return this; - } - /** - * optional .google.api.OAuthRequirements oauth = 2; - * - *
-     * The requirements for OAuth credentials.
-     * 
- */ - public com.google.api.OAuthRequirements.Builder getOauthBuilder() { - - onChanged(); - return getOauthFieldBuilder().getBuilder(); - } - /** - * optional .google.api.OAuthRequirements oauth = 2; - * - *
-     * The requirements for OAuth credentials.
-     * 
- */ - public com.google.api.OAuthRequirementsOrBuilder getOauthOrBuilder() { - if (oauthBuilder_ != null) { - return oauthBuilder_.getMessageOrBuilder(); - } else { - return oauth_ == null ? - com.google.api.OAuthRequirements.getDefaultInstance() : oauth_; - } - } - /** - * optional .google.api.OAuthRequirements oauth = 2; - * - *
-     * The requirements for OAuth credentials.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.api.OAuthRequirements, com.google.api.OAuthRequirements.Builder, com.google.api.OAuthRequirementsOrBuilder> - getOauthFieldBuilder() { - if (oauthBuilder_ == null) { - oauthBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.api.OAuthRequirements, com.google.api.OAuthRequirements.Builder, com.google.api.OAuthRequirementsOrBuilder>( - getOauth(), - getParentForChildren(), - isClean()); - oauth_ = null; - } - return oauthBuilder_; - } - - private boolean allowWithoutCredential_ ; - /** - * optional bool allow_without_credential = 5; - * - *
-     * Whether to allow requests without a credential.
-     * 
- */ - public boolean getAllowWithoutCredential() { - return allowWithoutCredential_; - } - /** - * optional bool allow_without_credential = 5; - * - *
-     * Whether to allow requests without a credential.
-     * 
- */ - public Builder setAllowWithoutCredential(boolean value) { - - allowWithoutCredential_ = value; - onChanged(); - return this; - } - /** - * optional bool allow_without_credential = 5; - * - *
-     * Whether to allow requests without a credential.
-     * 
- */ - public Builder clearAllowWithoutCredential() { - - allowWithoutCredential_ = false; - onChanged(); - return this; - } - - private java.util.List requirements_ = - java.util.Collections.emptyList(); - private void ensureRequirementsIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - requirements_ = new java.util.ArrayList(requirements_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.AuthRequirement, com.google.api.AuthRequirement.Builder, com.google.api.AuthRequirementOrBuilder> requirementsBuilder_; - - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-     * Requirements for additional authentication providers.
-     * 
- */ - public java.util.List getRequirementsList() { - if (requirementsBuilder_ == null) { - return java.util.Collections.unmodifiableList(requirements_); - } else { - return requirementsBuilder_.getMessageList(); - } - } - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-     * Requirements for additional authentication providers.
-     * 
- */ - public int getRequirementsCount() { - if (requirementsBuilder_ == null) { - return requirements_.size(); - } else { - return requirementsBuilder_.getCount(); - } - } - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-     * Requirements for additional authentication providers.
-     * 
- */ - public com.google.api.AuthRequirement getRequirements(int index) { - if (requirementsBuilder_ == null) { - return requirements_.get(index); - } else { - return requirementsBuilder_.getMessage(index); - } - } - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-     * Requirements for additional authentication providers.
-     * 
- */ - public Builder setRequirements( - int index, com.google.api.AuthRequirement value) { - if (requirementsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequirementsIsMutable(); - requirements_.set(index, value); - onChanged(); - } else { - requirementsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-     * Requirements for additional authentication providers.
-     * 
- */ - public Builder setRequirements( - int index, com.google.api.AuthRequirement.Builder builderForValue) { - if (requirementsBuilder_ == null) { - ensureRequirementsIsMutable(); - requirements_.set(index, builderForValue.build()); - onChanged(); - } else { - requirementsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-     * Requirements for additional authentication providers.
-     * 
- */ - public Builder addRequirements(com.google.api.AuthRequirement value) { - if (requirementsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequirementsIsMutable(); - requirements_.add(value); - onChanged(); - } else { - requirementsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-     * Requirements for additional authentication providers.
-     * 
- */ - public Builder addRequirements( - int index, com.google.api.AuthRequirement value) { - if (requirementsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequirementsIsMutable(); - requirements_.add(index, value); - onChanged(); - } else { - requirementsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-     * Requirements for additional authentication providers.
-     * 
- */ - public Builder addRequirements( - com.google.api.AuthRequirement.Builder builderForValue) { - if (requirementsBuilder_ == null) { - ensureRequirementsIsMutable(); - requirements_.add(builderForValue.build()); - onChanged(); - } else { - requirementsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-     * Requirements for additional authentication providers.
-     * 
- */ - public Builder addRequirements( - int index, com.google.api.AuthRequirement.Builder builderForValue) { - if (requirementsBuilder_ == null) { - ensureRequirementsIsMutable(); - requirements_.add(index, builderForValue.build()); - onChanged(); - } else { - requirementsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-     * Requirements for additional authentication providers.
-     * 
- */ - public Builder addAllRequirements( - java.lang.Iterable values) { - if (requirementsBuilder_ == null) { - ensureRequirementsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, requirements_); - onChanged(); - } else { - requirementsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-     * Requirements for additional authentication providers.
-     * 
- */ - public Builder clearRequirements() { - if (requirementsBuilder_ == null) { - requirements_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - requirementsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-     * Requirements for additional authentication providers.
-     * 
- */ - public Builder removeRequirements(int index) { - if (requirementsBuilder_ == null) { - ensureRequirementsIsMutable(); - requirements_.remove(index); - onChanged(); - } else { - requirementsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-     * Requirements for additional authentication providers.
-     * 
- */ - public com.google.api.AuthRequirement.Builder getRequirementsBuilder( - int index) { - return getRequirementsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-     * Requirements for additional authentication providers.
-     * 
- */ - public com.google.api.AuthRequirementOrBuilder getRequirementsOrBuilder( - int index) { - if (requirementsBuilder_ == null) { - return requirements_.get(index); } else { - return requirementsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-     * Requirements for additional authentication providers.
-     * 
- */ - public java.util.List - getRequirementsOrBuilderList() { - if (requirementsBuilder_ != null) { - return requirementsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(requirements_); - } - } - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-     * Requirements for additional authentication providers.
-     * 
- */ - public com.google.api.AuthRequirement.Builder addRequirementsBuilder() { - return getRequirementsFieldBuilder().addBuilder( - com.google.api.AuthRequirement.getDefaultInstance()); - } - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-     * Requirements for additional authentication providers.
-     * 
- */ - public com.google.api.AuthRequirement.Builder addRequirementsBuilder( - int index) { - return getRequirementsFieldBuilder().addBuilder( - index, com.google.api.AuthRequirement.getDefaultInstance()); - } - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-     * Requirements for additional authentication providers.
-     * 
- */ - public java.util.List - getRequirementsBuilderList() { - return getRequirementsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.AuthRequirement, com.google.api.AuthRequirement.Builder, com.google.api.AuthRequirementOrBuilder> - getRequirementsFieldBuilder() { - if (requirementsBuilder_ == null) { - requirementsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.api.AuthRequirement, com.google.api.AuthRequirement.Builder, com.google.api.AuthRequirementOrBuilder>( - requirements_, - ((bitField0_ & 0x00000008) == 0x00000008), - getParentForChildren(), - isClean()); - requirements_ = null; - } - return requirementsBuilder_; - } - 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.AuthenticationRule) - } - - // @@protoc_insertion_point(class_scope:google.api.AuthenticationRule) - private static final com.google.api.AuthenticationRule DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.AuthenticationRule(); - } - - public static com.google.api.AuthenticationRule getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public AuthenticationRule parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new AuthenticationRule(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.AuthenticationRule getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/AuthenticationRuleOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/AuthenticationRuleOrBuilder.java deleted file mode 100644 index 166fa3f2c585..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/AuthenticationRuleOrBuilder.java +++ /dev/null @@ -1,107 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/auth.proto - -package com.google.api; - -public interface AuthenticationRuleOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.AuthenticationRule) - 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(); - - /** - * optional .google.api.OAuthRequirements oauth = 2; - * - *
-   * The requirements for OAuth credentials.
-   * 
- */ - boolean hasOauth(); - /** - * optional .google.api.OAuthRequirements oauth = 2; - * - *
-   * The requirements for OAuth credentials.
-   * 
- */ - com.google.api.OAuthRequirements getOauth(); - /** - * optional .google.api.OAuthRequirements oauth = 2; - * - *
-   * The requirements for OAuth credentials.
-   * 
- */ - com.google.api.OAuthRequirementsOrBuilder getOauthOrBuilder(); - - /** - * optional bool allow_without_credential = 5; - * - *
-   * Whether to allow requests without a credential.
-   * 
- */ - boolean getAllowWithoutCredential(); - - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-   * Requirements for additional authentication providers.
-   * 
- */ - java.util.List - getRequirementsList(); - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-   * Requirements for additional authentication providers.
-   * 
- */ - com.google.api.AuthRequirement getRequirements(int index); - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-   * Requirements for additional authentication providers.
-   * 
- */ - int getRequirementsCount(); - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-   * Requirements for additional authentication providers.
-   * 
- */ - java.util.List - getRequirementsOrBuilderList(); - /** - * repeated .google.api.AuthRequirement requirements = 7; - * - *
-   * Requirements for additional authentication providers.
-   * 
- */ - com.google.api.AuthRequirementOrBuilder getRequirementsOrBuilder( - int index); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/Control.java b/gcloud-java-gax/generated/src/main/java/com/google/api/Control.java deleted file mode 100644 index e09a286a278e..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/Control.java +++ /dev/null @@ -1,507 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/control.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.Control} - * - *
- * Selects and configures the service controller used by the service.  The
- * service controller handles features like abuse, quota, billing, logging,
- * monitoring, etc.
- * Example:
- *     control:
- *       environment: usagemanager.googleprod.com
- * Supported Usage Manager environments:
- * * `usagemanager.googleprod.com`
- * * `staging-usagemanager.googleprod.com`
- * Supported Service Control environments:
- * * `servicecontrol.googleapis.com`
- * * `staging-servicecontrol.sandbox.googleapis.com`
- * * `testgaia-servicecontrol.sandbox.googleapis.com`
- * 
- */ -public final class Control extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.Control) - ControlOrBuilder { - // Use Control.newBuilder() to construct. - private Control(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Control() { - environment_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Control( - 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(); - - environment_ = 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.ControlProto.internal_static_google_api_Control_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.ControlProto.internal_static_google_api_Control_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Control.class, com.google.api.Control.Builder.class); - } - - public static final int ENVIRONMENT_FIELD_NUMBER = 1; - private volatile java.lang.Object environment_; - /** - * optional string environment = 1; - * - *
-   * The service control environment to use. If empty, no control plane
-   * feature (like quota and billing) will be enabled.
-   * 
- */ - public java.lang.String getEnvironment() { - java.lang.Object ref = environment_; - 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(); - environment_ = s; - return s; - } - } - /** - * optional string environment = 1; - * - *
-   * The service control environment to use. If empty, no control plane
-   * feature (like quota and billing) will be enabled.
-   * 
- */ - public com.google.protobuf.ByteString - getEnvironmentBytes() { - java.lang.Object ref = environment_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - environment_ = 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 (!getEnvironmentBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, environment_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getEnvironmentBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, environment_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.Control parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Control 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.Control parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Control parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.Control parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Control parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.Control parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.Control parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.Control parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Control 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.Control 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.Control} - * - *
-   * Selects and configures the service controller used by the service.  The
-   * service controller handles features like abuse, quota, billing, logging,
-   * monitoring, etc.
-   * Example:
-   *     control:
-   *       environment: usagemanager.googleprod.com
-   * Supported Usage Manager environments:
-   * * `usagemanager.googleprod.com`
-   * * `staging-usagemanager.googleprod.com`
-   * Supported Service Control environments:
-   * * `servicecontrol.googleapis.com`
-   * * `staging-servicecontrol.sandbox.googleapis.com`
-   * * `testgaia-servicecontrol.sandbox.googleapis.com`
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.Control) - com.google.api.ControlOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.ControlProto.internal_static_google_api_Control_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.ControlProto.internal_static_google_api_Control_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Control.class, com.google.api.Control.Builder.class); - } - - // Construct using com.google.api.Control.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(); - environment_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.ControlProto.internal_static_google_api_Control_descriptor; - } - - public com.google.api.Control getDefaultInstanceForType() { - return com.google.api.Control.getDefaultInstance(); - } - - public com.google.api.Control build() { - com.google.api.Control result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.Control buildPartial() { - com.google.api.Control result = new com.google.api.Control(this); - result.environment_ = environment_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.Control) { - return mergeFrom((com.google.api.Control)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.Control other) { - if (other == com.google.api.Control.getDefaultInstance()) return this; - if (!other.getEnvironment().isEmpty()) { - environment_ = other.environment_; - 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.Control parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.Control) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object environment_ = ""; - /** - * optional string environment = 1; - * - *
-     * The service control environment to use. If empty, no control plane
-     * feature (like quota and billing) will be enabled.
-     * 
- */ - public java.lang.String getEnvironment() { - java.lang.Object ref = environment_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - environment_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string environment = 1; - * - *
-     * The service control environment to use. If empty, no control plane
-     * feature (like quota and billing) will be enabled.
-     * 
- */ - public com.google.protobuf.ByteString - getEnvironmentBytes() { - java.lang.Object ref = environment_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - environment_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string environment = 1; - * - *
-     * The service control environment to use. If empty, no control plane
-     * feature (like quota and billing) will be enabled.
-     * 
- */ - public Builder setEnvironment( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - environment_ = value; - onChanged(); - return this; - } - /** - * optional string environment = 1; - * - *
-     * The service control environment to use. If empty, no control plane
-     * feature (like quota and billing) will be enabled.
-     * 
- */ - public Builder clearEnvironment() { - - environment_ = getDefaultInstance().getEnvironment(); - onChanged(); - return this; - } - /** - * optional string environment = 1; - * - *
-     * The service control environment to use. If empty, no control plane
-     * feature (like quota and billing) will be enabled.
-     * 
- */ - public Builder setEnvironmentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - environment_ = 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.Control) - } - - // @@protoc_insertion_point(class_scope:google.api.Control) - private static final com.google.api.Control DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.Control(); - } - - public static com.google.api.Control getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Control parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Control(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.Control getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/ControlOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/ControlOrBuilder.java deleted file mode 100644 index 3454d017d232..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/ControlOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/control.proto - -package com.google.api; - -public interface ControlOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.Control) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string environment = 1; - * - *
-   * The service control environment to use. If empty, no control plane
-   * feature (like quota and billing) will be enabled.
-   * 
- */ - java.lang.String getEnvironment(); - /** - * optional string environment = 1; - * - *
-   * The service control environment to use. If empty, no control plane
-   * feature (like quota and billing) will be enabled.
-   * 
- */ - com.google.protobuf.ByteString - getEnvironmentBytes(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/ControlProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/ControlProto.java deleted file mode 100644 index 1409a6f04169..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/ControlProto.java +++ /dev/null @@ -1,50 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/control.proto - -package com.google.api; - -public final class ControlProto { - private ControlProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_Control_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_Control_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/control.proto\022\ngoogle.api\"\036" + - "\n\007Control\022\023\n\013environment\030\001 \001(\tB \n\016com.go" + - "ogle.apiB\014ControlProtoP\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_Control_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_api_Control_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_Control_descriptor, - new java.lang.String[] { "Environment", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/LabelDescriptor.java b/gcloud-java-gax/generated/src/main/java/com/google/api/LabelDescriptor.java deleted file mode 100644 index 8a760cc4815c..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/LabelDescriptor.java +++ /dev/null @@ -1,864 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/label.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.LabelDescriptor} - * - *
- * A description of a label. For details, see [this document](go/api-label).
- * 
- */ -public final class LabelDescriptor extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.LabelDescriptor) - LabelDescriptorOrBuilder { - // Use LabelDescriptor.newBuilder() to construct. - private LabelDescriptor(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private LabelDescriptor() { - key_ = ""; - valueType_ = 0; - description_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private LabelDescriptor( - 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(); - - key_ = s; - break; - } - case 16: { - int rawValue = input.readEnum(); - - valueType_ = rawValue; - break; - } - case 26: { - 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.LabelProto.internal_static_google_api_LabelDescriptor_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.LabelProto.internal_static_google_api_LabelDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.LabelDescriptor.class, com.google.api.LabelDescriptor.Builder.class); - } - - /** - * Protobuf enum {@code google.api.LabelDescriptor.ValueType} - * - *
-   * Value types that can be used as label values.
-   * 
- */ - public enum ValueType - implements com.google.protobuf.ProtocolMessageEnum { - /** - * STRING = 0; - * - *
-     * A variable-length string. This is the default.
-     * 
- */ - STRING(0, 0), - /** - * BOOL = 1; - * - *
-     * Boolean; true or false.
-     * 
- */ - BOOL(1, 1), - /** - * INT64 = 2; - * - *
-     * A 64-bit signed integer.
-     * 
- */ - INT64(2, 2), - UNRECOGNIZED(-1, -1), - ; - - /** - * STRING = 0; - * - *
-     * A variable-length string. This is the default.
-     * 
- */ - public static final int STRING_VALUE = 0; - /** - * BOOL = 1; - * - *
-     * Boolean; true or false.
-     * 
- */ - public static final int BOOL_VALUE = 1; - /** - * INT64 = 2; - * - *
-     * A 64-bit signed integer.
-     * 
- */ - public static final int INT64_VALUE = 2; - - - 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 ValueType valueOf(int value) { - switch (value) { - case 0: return STRING; - case 1: return BOOL; - case 2: return INT64; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ValueType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ValueType findValueByNumber(int number) { - return ValueType.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.api.LabelDescriptor.getDescriptor().getEnumTypes().get(0); - } - - private static final ValueType[] VALUES = values(); - - public static ValueType 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 ValueType(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.api.LabelDescriptor.ValueType) - } - - public static final int KEY_FIELD_NUMBER = 1; - private volatile java.lang.Object key_; - /** - * optional string key = 1; - * - *
-   * The label key. Details are described [here](go/api-label#label_keys).
-   * 
- */ - public java.lang.String getKey() { - java.lang.Object ref = key_; - 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(); - key_ = s; - return s; - } - } - /** - * optional string key = 1; - * - *
-   * The label key. Details are described [here](go/api-label#label_keys).
-   * 
- */ - public com.google.protobuf.ByteString - getKeyBytes() { - java.lang.Object ref = key_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - key_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VALUE_TYPE_FIELD_NUMBER = 2; - private int valueType_; - /** - * optional .google.api.LabelDescriptor.ValueType value_type = 2; - * - *
-   * The type of data that can be assigned to the label.
-   * 
- */ - public int getValueTypeValue() { - return valueType_; - } - /** - * optional .google.api.LabelDescriptor.ValueType value_type = 2; - * - *
-   * The type of data that can be assigned to the label.
-   * 
- */ - public com.google.api.LabelDescriptor.ValueType getValueType() { - com.google.api.LabelDescriptor.ValueType result = com.google.api.LabelDescriptor.ValueType.valueOf(valueType_); - return result == null ? com.google.api.LabelDescriptor.ValueType.UNRECOGNIZED : result; - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - * optional string description = 3; - * - *
-   * A human-readable description for the label.
-   * 
- */ - 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 = 3; - * - *
-   * A human-readable description for the label.
-   * 
- */ - 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 (!getKeyBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, key_); - } - if (valueType_ != com.google.api.LabelDescriptor.ValueType.STRING.getNumber()) { - output.writeEnum(2, valueType_); - } - if (!getDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, description_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getKeyBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, key_); - } - if (valueType_ != com.google.api.LabelDescriptor.ValueType.STRING.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, valueType_); - } - if (!getDescriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.LabelDescriptor parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.LabelDescriptor 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.LabelDescriptor parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.LabelDescriptor parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.LabelDescriptor parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.LabelDescriptor parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.LabelDescriptor parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.LabelDescriptor parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.LabelDescriptor parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.LabelDescriptor 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.LabelDescriptor 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.LabelDescriptor} - * - *
-   * A description of a label. For details, see [this document](go/api-label).
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.LabelDescriptor) - com.google.api.LabelDescriptorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.LabelProto.internal_static_google_api_LabelDescriptor_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.LabelProto.internal_static_google_api_LabelDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.LabelDescriptor.class, com.google.api.LabelDescriptor.Builder.class); - } - - // Construct using com.google.api.LabelDescriptor.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(); - key_ = ""; - - valueType_ = 0; - - description_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.LabelProto.internal_static_google_api_LabelDescriptor_descriptor; - } - - public com.google.api.LabelDescriptor getDefaultInstanceForType() { - return com.google.api.LabelDescriptor.getDefaultInstance(); - } - - public com.google.api.LabelDescriptor build() { - com.google.api.LabelDescriptor result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.LabelDescriptor buildPartial() { - com.google.api.LabelDescriptor result = new com.google.api.LabelDescriptor(this); - result.key_ = key_; - result.valueType_ = valueType_; - result.description_ = description_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.LabelDescriptor) { - return mergeFrom((com.google.api.LabelDescriptor)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.LabelDescriptor other) { - if (other == com.google.api.LabelDescriptor.getDefaultInstance()) return this; - if (!other.getKey().isEmpty()) { - key_ = other.key_; - onChanged(); - } - if (other.valueType_ != 0) { - setValueTypeValue(other.getValueTypeValue()); - } - 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.LabelDescriptor parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.LabelDescriptor) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object key_ = ""; - /** - * optional string key = 1; - * - *
-     * The label key. Details are described [here](go/api-label#label_keys).
-     * 
- */ - public java.lang.String getKey() { - java.lang.Object ref = key_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - key_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string key = 1; - * - *
-     * The label key. Details are described [here](go/api-label#label_keys).
-     * 
- */ - public com.google.protobuf.ByteString - getKeyBytes() { - java.lang.Object ref = key_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - key_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string key = 1; - * - *
-     * The label key. Details are described [here](go/api-label#label_keys).
-     * 
- */ - public Builder setKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - key_ = value; - onChanged(); - return this; - } - /** - * optional string key = 1; - * - *
-     * The label key. Details are described [here](go/api-label#label_keys).
-     * 
- */ - public Builder clearKey() { - - key_ = getDefaultInstance().getKey(); - onChanged(); - return this; - } - /** - * optional string key = 1; - * - *
-     * The label key. Details are described [here](go/api-label#label_keys).
-     * 
- */ - public Builder setKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - key_ = value; - onChanged(); - return this; - } - - private int valueType_ = 0; - /** - * optional .google.api.LabelDescriptor.ValueType value_type = 2; - * - *
-     * The type of data that can be assigned to the label.
-     * 
- */ - public int getValueTypeValue() { - return valueType_; - } - /** - * optional .google.api.LabelDescriptor.ValueType value_type = 2; - * - *
-     * The type of data that can be assigned to the label.
-     * 
- */ - public Builder setValueTypeValue(int value) { - valueType_ = value; - onChanged(); - return this; - } - /** - * optional .google.api.LabelDescriptor.ValueType value_type = 2; - * - *
-     * The type of data that can be assigned to the label.
-     * 
- */ - public com.google.api.LabelDescriptor.ValueType getValueType() { - com.google.api.LabelDescriptor.ValueType result = com.google.api.LabelDescriptor.ValueType.valueOf(valueType_); - return result == null ? com.google.api.LabelDescriptor.ValueType.UNRECOGNIZED : result; - } - /** - * optional .google.api.LabelDescriptor.ValueType value_type = 2; - * - *
-     * The type of data that can be assigned to the label.
-     * 
- */ - public Builder setValueType(com.google.api.LabelDescriptor.ValueType value) { - if (value == null) { - throw new NullPointerException(); - } - - valueType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .google.api.LabelDescriptor.ValueType value_type = 2; - * - *
-     * The type of data that can be assigned to the label.
-     * 
- */ - public Builder clearValueType() { - - valueType_ = 0; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * optional string description = 3; - * - *
-     * A human-readable description for the label.
-     * 
- */ - 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 = 3; - * - *
-     * A human-readable description for the label.
-     * 
- */ - 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 = 3; - * - *
-     * A human-readable description for the label.
-     * 
- */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * optional string description = 3; - * - *
-     * A human-readable description for the label.
-     * 
- */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * optional string description = 3; - * - *
-     * A human-readable description for the label.
-     * 
- */ - 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.LabelDescriptor) - } - - // @@protoc_insertion_point(class_scope:google.api.LabelDescriptor) - private static final com.google.api.LabelDescriptor DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.LabelDescriptor(); - } - - public static com.google.api.LabelDescriptor getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public LabelDescriptor parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new LabelDescriptor(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.LabelDescriptor getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/LabelDescriptorOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/LabelDescriptorOrBuilder.java deleted file mode 100644 index 9ccfcbb24c33..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/LabelDescriptorOrBuilder.java +++ /dev/null @@ -1,62 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/label.proto - -package com.google.api; - -public interface LabelDescriptorOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.LabelDescriptor) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string key = 1; - * - *
-   * The label key. Details are described [here](go/api-label#label_keys).
-   * 
- */ - java.lang.String getKey(); - /** - * optional string key = 1; - * - *
-   * The label key. Details are described [here](go/api-label#label_keys).
-   * 
- */ - com.google.protobuf.ByteString - getKeyBytes(); - - /** - * optional .google.api.LabelDescriptor.ValueType value_type = 2; - * - *
-   * The type of data that can be assigned to the label.
-   * 
- */ - int getValueTypeValue(); - /** - * optional .google.api.LabelDescriptor.ValueType value_type = 2; - * - *
-   * The type of data that can be assigned to the label.
-   * 
- */ - com.google.api.LabelDescriptor.ValueType getValueType(); - - /** - * optional string description = 3; - * - *
-   * A human-readable description for the label.
-   * 
- */ - java.lang.String getDescription(); - /** - * optional string description = 3; - * - *
-   * A human-readable description for the label.
-   * 
- */ - com.google.protobuf.ByteString - getDescriptionBytes(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/LabelProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/LabelProto.java deleted file mode 100644 index b7a2276a25b9..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/LabelProto.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/label.proto - -package com.google.api; - -public final class LabelProto { - private LabelProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_LabelDescriptor_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_LabelDescriptor_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/label.proto\022\ngoogle.api\"\234\001\n" + - "\017LabelDescriptor\022\013\n\003key\030\001 \001(\t\0229\n\nvalue_t" + - "ype\030\002 \001(\0162%.google.api.LabelDescriptor.V" + - "alueType\022\023\n\013description\030\003 \001(\t\",\n\tValueTy" + - "pe\022\n\n\006STRING\020\000\022\010\n\004BOOL\020\001\022\t\n\005INT64\020\002B\036\n\016c" + - "om.google.apiB\nLabelProtoP\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_LabelDescriptor_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_api_LabelDescriptor_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_LabelDescriptor_descriptor, - new java.lang.String[] { "Key", "ValueType", "Description", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/LogDescriptor.java b/gcloud-java-gax/generated/src/main/java/com/google/api/LogDescriptor.java deleted file mode 100644 index 075036cb7859..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/LogDescriptor.java +++ /dev/null @@ -1,1304 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/log.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.LogDescriptor} - * - *
- * A description of a log type. Example in YAML format:
- *     - name: library.googleapis.com/activity_history
- *       description: The history of borrowing and returning library items.
- *       display_name: Activity
- *       labels:
- *       - key: /customer_id
- *         description: Identifier of a library customer
- * 
- */ -public final class LogDescriptor extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.LogDescriptor) - LogDescriptorOrBuilder { - // Use LogDescriptor.newBuilder() to construct. - private LogDescriptor(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private LogDescriptor() { - name_ = ""; - labels_ = java.util.Collections.emptyList(); - description_ = ""; - displayName_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private LogDescriptor( - 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: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - labels_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - labels_.add(input.readMessage(com.google.api.LabelDescriptor.parser(), extensionRegistry)); - break; - } - case 26: { - String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 34: { - String s = input.readStringRequireUtf8(); - - displayName_ = 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)) { - labels_ = java.util.Collections.unmodifiableList(labels_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.LogProto.internal_static_google_api_LogDescriptor_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.LogProto.internal_static_google_api_LogDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.LogDescriptor.class, com.google.api.LogDescriptor.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 log. It must be less than 512 characters long and can
-   * include the following characters: upper- and lower-case alphanumeric
-   * characters [A-Za-z0-9], and punctuation characters including
-   * slash, underscore, hyphen, period [/_-.].
-   * 
- */ - 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 log. It must be less than 512 characters long and can
-   * include the following characters: upper- and lower-case alphanumeric
-   * characters [A-Za-z0-9], and punctuation characters including
-   * slash, underscore, hyphen, period [/_-.].
-   * 
- */ - 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 LABELS_FIELD_NUMBER = 2; - private java.util.List labels_; - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-   * The set of labels that are available to describe a specific log entry.
-   * Runtime requests that contain labels not specified here are
-   * considered invalid.
-   * 
- */ - public java.util.List getLabelsList() { - return labels_; - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-   * The set of labels that are available to describe a specific log entry.
-   * Runtime requests that contain labels not specified here are
-   * considered invalid.
-   * 
- */ - public java.util.List - getLabelsOrBuilderList() { - return labels_; - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-   * The set of labels that are available to describe a specific log entry.
-   * Runtime requests that contain labels not specified here are
-   * considered invalid.
-   * 
- */ - public int getLabelsCount() { - return labels_.size(); - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-   * The set of labels that are available to describe a specific log entry.
-   * Runtime requests that contain labels not specified here are
-   * considered invalid.
-   * 
- */ - public com.google.api.LabelDescriptor getLabels(int index) { - return labels_.get(index); - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-   * The set of labels that are available to describe a specific log entry.
-   * Runtime requests that contain labels not specified here are
-   * considered invalid.
-   * 
- */ - public com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder( - int index) { - return labels_.get(index); - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - * optional string description = 3; - * - *
-   * A human-readable description of this log. This information appears in
-   * the documentation and can contain details.
-   * 
- */ - 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 = 3; - * - *
-   * A human-readable description of this log. This information appears in
-   * the documentation and can contain details.
-   * 
- */ - 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 DISPLAY_NAME_FIELD_NUMBER = 4; - private volatile java.lang.Object displayName_; - /** - * optional string display_name = 4; - * - *
-   * The human-readable name for this log. This information appears on
-   * the user interface and should be concise.
-   * 
- */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - * optional string display_name = 4; - * - *
-   * The human-readable name for this log. This information appears on
-   * the user interface and should be concise.
-   * 
- */ - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - 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_); - } - for (int i = 0; i < labels_.size(); i++) { - output.writeMessage(2, labels_.get(i)); - } - if (!getDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, description_); - } - if (!getDisplayNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, displayName_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - for (int i = 0; i < labels_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, labels_.get(i)); - } - if (!getDescriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_); - } - if (!getDisplayNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, displayName_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.LogDescriptor parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.LogDescriptor 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.LogDescriptor parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.LogDescriptor parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.LogDescriptor parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.LogDescriptor parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.LogDescriptor parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.LogDescriptor parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.LogDescriptor parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.LogDescriptor 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.LogDescriptor 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.LogDescriptor} - * - *
-   * A description of a log type. Example in YAML format:
-   *     - name: library.googleapis.com/activity_history
-   *       description: The history of borrowing and returning library items.
-   *       display_name: Activity
-   *       labels:
-   *       - key: /customer_id
-   *         description: Identifier of a library customer
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.LogDescriptor) - com.google.api.LogDescriptorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.LogProto.internal_static_google_api_LogDescriptor_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.LogProto.internal_static_google_api_LogDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.LogDescriptor.class, com.google.api.LogDescriptor.Builder.class); - } - - // Construct using com.google.api.LogDescriptor.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getLabelsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - if (labelsBuilder_ == null) { - labels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - labelsBuilder_.clear(); - } - description_ = ""; - - displayName_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.LogProto.internal_static_google_api_LogDescriptor_descriptor; - } - - public com.google.api.LogDescriptor getDefaultInstanceForType() { - return com.google.api.LogDescriptor.getDefaultInstance(); - } - - public com.google.api.LogDescriptor build() { - com.google.api.LogDescriptor result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.LogDescriptor buildPartial() { - com.google.api.LogDescriptor result = new com.google.api.LogDescriptor(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.name_ = name_; - if (labelsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - labels_ = java.util.Collections.unmodifiableList(labels_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.labels_ = labels_; - } else { - result.labels_ = labelsBuilder_.build(); - } - result.description_ = description_; - result.displayName_ = displayName_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.LogDescriptor) { - return mergeFrom((com.google.api.LogDescriptor)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.LogDescriptor other) { - if (other == com.google.api.LogDescriptor.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (labelsBuilder_ == null) { - if (!other.labels_.isEmpty()) { - if (labels_.isEmpty()) { - labels_ = other.labels_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureLabelsIsMutable(); - labels_.addAll(other.labels_); - } - onChanged(); - } - } else { - if (!other.labels_.isEmpty()) { - if (labelsBuilder_.isEmpty()) { - labelsBuilder_.dispose(); - labelsBuilder_ = null; - labels_ = other.labels_; - bitField0_ = (bitField0_ & ~0x00000002); - labelsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getLabelsFieldBuilder() : null; - } else { - labelsBuilder_.addAllMessages(other.labels_); - } - } - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - 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.LogDescriptor parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.LogDescriptor) 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 log. It must be less than 512 characters long and can
-     * include the following characters: upper- and lower-case alphanumeric
-     * characters [A-Za-z0-9], and punctuation characters including
-     * slash, underscore, hyphen, period [/_-.].
-     * 
- */ - 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 log. It must be less than 512 characters long and can
-     * include the following characters: upper- and lower-case alphanumeric
-     * characters [A-Za-z0-9], and punctuation characters including
-     * slash, underscore, hyphen, period [/_-.].
-     * 
- */ - 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 log. It must be less than 512 characters long and can
-     * include the following characters: upper- and lower-case alphanumeric
-     * characters [A-Za-z0-9], and punctuation characters including
-     * slash, underscore, hyphen, period [/_-.].
-     * 
- */ - 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 log. It must be less than 512 characters long and can
-     * include the following characters: upper- and lower-case alphanumeric
-     * characters [A-Za-z0-9], and punctuation characters including
-     * slash, underscore, hyphen, period [/_-.].
-     * 
- */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The name of the log. It must be less than 512 characters long and can
-     * include the following characters: upper- and lower-case alphanumeric
-     * characters [A-Za-z0-9], and punctuation characters including
-     * slash, underscore, hyphen, period [/_-.].
-     * 
- */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.util.List labels_ = - java.util.Collections.emptyList(); - private void ensureLabelsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - labels_ = new java.util.ArrayList(labels_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.LabelDescriptor, com.google.api.LabelDescriptor.Builder, com.google.api.LabelDescriptorOrBuilder> labelsBuilder_; - - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that are available to describe a specific log entry.
-     * Runtime requests that contain labels not specified here are
-     * considered invalid.
-     * 
- */ - public java.util.List getLabelsList() { - if (labelsBuilder_ == null) { - return java.util.Collections.unmodifiableList(labels_); - } else { - return labelsBuilder_.getMessageList(); - } - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that are available to describe a specific log entry.
-     * Runtime requests that contain labels not specified here are
-     * considered invalid.
-     * 
- */ - public int getLabelsCount() { - if (labelsBuilder_ == null) { - return labels_.size(); - } else { - return labelsBuilder_.getCount(); - } - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that are available to describe a specific log entry.
-     * Runtime requests that contain labels not specified here are
-     * considered invalid.
-     * 
- */ - public com.google.api.LabelDescriptor getLabels(int index) { - if (labelsBuilder_ == null) { - return labels_.get(index); - } else { - return labelsBuilder_.getMessage(index); - } - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that are available to describe a specific log entry.
-     * Runtime requests that contain labels not specified here are
-     * considered invalid.
-     * 
- */ - public Builder setLabels( - int index, com.google.api.LabelDescriptor value) { - if (labelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelsIsMutable(); - labels_.set(index, value); - onChanged(); - } else { - labelsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that are available to describe a specific log entry.
-     * Runtime requests that contain labels not specified here are
-     * considered invalid.
-     * 
- */ - public Builder setLabels( - int index, com.google.api.LabelDescriptor.Builder builderForValue) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - labels_.set(index, builderForValue.build()); - onChanged(); - } else { - labelsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that are available to describe a specific log entry.
-     * Runtime requests that contain labels not specified here are
-     * considered invalid.
-     * 
- */ - public Builder addLabels(com.google.api.LabelDescriptor value) { - if (labelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelsIsMutable(); - labels_.add(value); - onChanged(); - } else { - labelsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that are available to describe a specific log entry.
-     * Runtime requests that contain labels not specified here are
-     * considered invalid.
-     * 
- */ - public Builder addLabels( - int index, com.google.api.LabelDescriptor value) { - if (labelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelsIsMutable(); - labels_.add(index, value); - onChanged(); - } else { - labelsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that are available to describe a specific log entry.
-     * Runtime requests that contain labels not specified here are
-     * considered invalid.
-     * 
- */ - public Builder addLabels( - com.google.api.LabelDescriptor.Builder builderForValue) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - labels_.add(builderForValue.build()); - onChanged(); - } else { - labelsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that are available to describe a specific log entry.
-     * Runtime requests that contain labels not specified here are
-     * considered invalid.
-     * 
- */ - public Builder addLabels( - int index, com.google.api.LabelDescriptor.Builder builderForValue) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - labels_.add(index, builderForValue.build()); - onChanged(); - } else { - labelsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that are available to describe a specific log entry.
-     * Runtime requests that contain labels not specified here are
-     * considered invalid.
-     * 
- */ - public Builder addAllLabels( - java.lang.Iterable values) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, labels_); - onChanged(); - } else { - labelsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that are available to describe a specific log entry.
-     * Runtime requests that contain labels not specified here are
-     * considered invalid.
-     * 
- */ - public Builder clearLabels() { - if (labelsBuilder_ == null) { - labels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - labelsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that are available to describe a specific log entry.
-     * Runtime requests that contain labels not specified here are
-     * considered invalid.
-     * 
- */ - public Builder removeLabels(int index) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - labels_.remove(index); - onChanged(); - } else { - labelsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that are available to describe a specific log entry.
-     * Runtime requests that contain labels not specified here are
-     * considered invalid.
-     * 
- */ - public com.google.api.LabelDescriptor.Builder getLabelsBuilder( - int index) { - return getLabelsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that are available to describe a specific log entry.
-     * Runtime requests that contain labels not specified here are
-     * considered invalid.
-     * 
- */ - public com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder( - int index) { - if (labelsBuilder_ == null) { - return labels_.get(index); } else { - return labelsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that are available to describe a specific log entry.
-     * Runtime requests that contain labels not specified here are
-     * considered invalid.
-     * 
- */ - public java.util.List - getLabelsOrBuilderList() { - if (labelsBuilder_ != null) { - return labelsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(labels_); - } - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that are available to describe a specific log entry.
-     * Runtime requests that contain labels not specified here are
-     * considered invalid.
-     * 
- */ - public com.google.api.LabelDescriptor.Builder addLabelsBuilder() { - return getLabelsFieldBuilder().addBuilder( - com.google.api.LabelDescriptor.getDefaultInstance()); - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that are available to describe a specific log entry.
-     * Runtime requests that contain labels not specified here are
-     * considered invalid.
-     * 
- */ - public com.google.api.LabelDescriptor.Builder addLabelsBuilder( - int index) { - return getLabelsFieldBuilder().addBuilder( - index, com.google.api.LabelDescriptor.getDefaultInstance()); - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that are available to describe a specific log entry.
-     * Runtime requests that contain labels not specified here are
-     * considered invalid.
-     * 
- */ - public java.util.List - getLabelsBuilderList() { - return getLabelsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.LabelDescriptor, com.google.api.LabelDescriptor.Builder, com.google.api.LabelDescriptorOrBuilder> - getLabelsFieldBuilder() { - if (labelsBuilder_ == null) { - labelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.api.LabelDescriptor, com.google.api.LabelDescriptor.Builder, com.google.api.LabelDescriptorOrBuilder>( - labels_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - labels_ = null; - } - return labelsBuilder_; - } - - private java.lang.Object description_ = ""; - /** - * optional string description = 3; - * - *
-     * A human-readable description of this log. This information appears in
-     * the documentation and can contain details.
-     * 
- */ - 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 = 3; - * - *
-     * A human-readable description of this log. This information appears in
-     * the documentation and can contain details.
-     * 
- */ - 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 = 3; - * - *
-     * A human-readable description of this log. This information appears in
-     * the documentation and can contain details.
-     * 
- */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * optional string description = 3; - * - *
-     * A human-readable description of this log. This information appears in
-     * the documentation and can contain details.
-     * 
- */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * optional string description = 3; - * - *
-     * A human-readable description of this log. This information appears in
-     * the documentation and can contain details.
-     * 
- */ - 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 displayName_ = ""; - /** - * optional string display_name = 4; - * - *
-     * The human-readable name for this log. This information appears on
-     * the user interface and should be concise.
-     * 
- */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string display_name = 4; - * - *
-     * The human-readable name for this log. This information appears on
-     * the user interface and should be concise.
-     * 
- */ - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string display_name = 4; - * - *
-     * The human-readable name for this log. This information appears on
-     * the user interface and should be concise.
-     * 
- */ - public Builder setDisplayName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - displayName_ = value; - onChanged(); - return this; - } - /** - * optional string display_name = 4; - * - *
-     * The human-readable name for this log. This information appears on
-     * the user interface and should be concise.
-     * 
- */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - * optional string display_name = 4; - * - *
-     * The human-readable name for this log. This information appears on
-     * the user interface and should be concise.
-     * 
- */ - public Builder setDisplayNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - displayName_ = 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.LogDescriptor) - } - - // @@protoc_insertion_point(class_scope:google.api.LogDescriptor) - private static final com.google.api.LogDescriptor DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.LogDescriptor(); - } - - public static com.google.api.LogDescriptor getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public LogDescriptor parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new LogDescriptor(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.LogDescriptor getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/LogDescriptorOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/LogDescriptorOrBuilder.java deleted file mode 100644 index cfa2c501cf17..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/LogDescriptorOrBuilder.java +++ /dev/null @@ -1,127 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/log.proto - -package com.google.api; - -public interface LogDescriptorOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.LogDescriptor) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string name = 1; - * - *
-   * The name of the log. It must be less than 512 characters long and can
-   * include the following characters: upper- and lower-case alphanumeric
-   * characters [A-Za-z0-9], and punctuation characters including
-   * slash, underscore, hyphen, period [/_-.].
-   * 
- */ - java.lang.String getName(); - /** - * optional string name = 1; - * - *
-   * The name of the log. It must be less than 512 characters long and can
-   * include the following characters: upper- and lower-case alphanumeric
-   * characters [A-Za-z0-9], and punctuation characters including
-   * slash, underscore, hyphen, period [/_-.].
-   * 
- */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-   * The set of labels that are available to describe a specific log entry.
-   * Runtime requests that contain labels not specified here are
-   * considered invalid.
-   * 
- */ - java.util.List - getLabelsList(); - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-   * The set of labels that are available to describe a specific log entry.
-   * Runtime requests that contain labels not specified here are
-   * considered invalid.
-   * 
- */ - com.google.api.LabelDescriptor getLabels(int index); - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-   * The set of labels that are available to describe a specific log entry.
-   * Runtime requests that contain labels not specified here are
-   * considered invalid.
-   * 
- */ - int getLabelsCount(); - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-   * The set of labels that are available to describe a specific log entry.
-   * Runtime requests that contain labels not specified here are
-   * considered invalid.
-   * 
- */ - java.util.List - getLabelsOrBuilderList(); - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-   * The set of labels that are available to describe a specific log entry.
-   * Runtime requests that contain labels not specified here are
-   * considered invalid.
-   * 
- */ - com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder( - int index); - - /** - * optional string description = 3; - * - *
-   * A human-readable description of this log. This information appears in
-   * the documentation and can contain details.
-   * 
- */ - java.lang.String getDescription(); - /** - * optional string description = 3; - * - *
-   * A human-readable description of this log. This information appears in
-   * the documentation and can contain details.
-   * 
- */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - * optional string display_name = 4; - * - *
-   * The human-readable name for this log. This information appears on
-   * the user interface and should be concise.
-   * 
- */ - java.lang.String getDisplayName(); - /** - * optional string display_name = 4; - * - *
-   * The human-readable name for this log. This information appears on
-   * the user interface and should be concise.
-   * 
- */ - com.google.protobuf.ByteString - getDisplayNameBytes(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/LogProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/LogProto.java deleted file mode 100644 index 747ad84d3e13..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/LogProto.java +++ /dev/null @@ -1,55 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/log.proto - -package com.google.api; - -public final class LogProto { - private LogProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_LogDescriptor_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_LogDescriptor_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\024google/api/log.proto\022\ngoogle.api\032\026goog" + - "le/api/label.proto\"u\n\rLogDescriptor\022\014\n\004n" + - "ame\030\001 \001(\t\022+\n\006labels\030\002 \003(\0132\033.google.api.L" + - "abelDescriptor\022\023\n\013description\030\003 \001(\t\022\024\n\014d" + - "isplay_name\030\004 \001(\tB\034\n\016com.google.apiB\010Log" + - "ProtoP\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.LabelProto.getDescriptor(), - }, assigner); - internal_static_google_api_LogDescriptor_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_api_LogDescriptor_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_LogDescriptor_descriptor, - new java.lang.String[] { "Name", "Labels", "Description", "DisplayName", }); - com.google.api.LabelProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/Logging.java b/gcloud-java-gax/generated/src/main/java/com/google/api/Logging.java deleted file mode 100644 index c07fa28b7cc4..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/Logging.java +++ /dev/null @@ -1,2176 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/logging.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.Logging} - * - *
- * Logging configuration of the service.
- * The following example shows how to configure logs to be sent to the
- * producer and consumer projects. In the example,
- * the `library.googleapis.com/activity_history` log is
- * sent to both the producer and consumer projects, whereas
- * the `library.googleapis.com/purchase_history` log is only sent to the
- * producer project:
- *     monitored_resources:
- *     - type: library.googleapis.com/branch
- *       labels:
- *       - key: /city
- *         description: The city where the library branch is located in.
- *       - key: /name
- *         description: The name of the branch.
- *     logs:
- *     - name: library.googleapis.com/activity_history
- *       labels:
- *       - key: /customer_id
- *     - name: library.googleapis.com/purchase_history
- *     logging:
- *       producer_destinations:
- *       - monitored_resource: library.googleapis.com/branch
- *         logs:
- *         - library.googleapis.com/activity_history
- *         - library.googleapis.com/purchase_history
- *       consumer_destinations:
- *       - monitored_resource: library.googleapis.com/branch
- *         logs:
- *         - library.googleapis.com/activity_history
- * (-- GOOGLE_INTERNAL:
- * This example shows how to configure a log to be sent to the consumer project,
- * and skip fine grained ACL check since the service is a trusted
- * Google service:
- *     logging:
- *       consumer_destination:
- *         logs:
- *         - library.googleapis.com/activity_history
- *         acl:
- *           model: SKIP
- * --)
- * 
- */ -public final class Logging extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.Logging) - LoggingOrBuilder { - // Use Logging.newBuilder() to construct. - private Logging(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Logging() { - producerDestinations_ = java.util.Collections.emptyList(); - consumerDestinations_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Logging( - 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)) { - producerDestinations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - producerDestinations_.add(input.readMessage(com.google.api.Logging.LoggingDestination.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - consumerDestinations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - consumerDestinations_.add(input.readMessage(com.google.api.Logging.LoggingDestination.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)) { - producerDestinations_ = java.util.Collections.unmodifiableList(producerDestinations_); - } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - consumerDestinations_ = java.util.Collections.unmodifiableList(consumerDestinations_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.LoggingProto.internal_static_google_api_Logging_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.LoggingProto.internal_static_google_api_Logging_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Logging.class, com.google.api.Logging.Builder.class); - } - - public interface LoggingDestinationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.Logging.LoggingDestination) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string monitored_resource = 3; - * - *
-     * The monitored resource type. The type must be defined in
-     * [Service.monitored_resources][] section.
-     * 
- */ - java.lang.String getMonitoredResource(); - /** - * optional string monitored_resource = 3; - * - *
-     * The monitored resource type. The type must be defined in
-     * [Service.monitored_resources][] section.
-     * 
- */ - com.google.protobuf.ByteString - getMonitoredResourceBytes(); - - /** - * repeated string logs = 1; - * - *
-     * Names of the logs to be sent to this destination. Each name must
-     * be defined in the [Service.logs][] section.
-     * 
- */ - com.google.protobuf.ProtocolStringList - getLogsList(); - /** - * repeated string logs = 1; - * - *
-     * Names of the logs to be sent to this destination. Each name must
-     * be defined in the [Service.logs][] section.
-     * 
- */ - int getLogsCount(); - /** - * repeated string logs = 1; - * - *
-     * Names of the logs to be sent to this destination. Each name must
-     * be defined in the [Service.logs][] section.
-     * 
- */ - java.lang.String getLogs(int index); - /** - * repeated string logs = 1; - * - *
-     * Names of the logs to be sent to this destination. Each name must
-     * be defined in the [Service.logs][] section.
-     * 
- */ - com.google.protobuf.ByteString - getLogsBytes(int index); - } - /** - * Protobuf type {@code google.api.Logging.LoggingDestination} - * - *
-   * Configuration of a specific logging destination (the producer project
-   * or the consumer project).
-   * 
- */ - public static final class LoggingDestination extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.Logging.LoggingDestination) - LoggingDestinationOrBuilder { - // Use LoggingDestination.newBuilder() to construct. - private LoggingDestination(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private LoggingDestination() { - monitoredResource_ = ""; - logs_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private LoggingDestination( - 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_ & 0x00000002) == 0x00000002)) { - logs_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - logs_.add(s); - break; - } - case 26: { - String s = input.readStringRequireUtf8(); - - monitoredResource_ = 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)) { - logs_ = logs_.getUnmodifiableView(); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.LoggingProto.internal_static_google_api_Logging_LoggingDestination_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.LoggingProto.internal_static_google_api_Logging_LoggingDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Logging.LoggingDestination.class, com.google.api.Logging.LoggingDestination.Builder.class); - } - - private int bitField0_; - public static final int MONITORED_RESOURCE_FIELD_NUMBER = 3; - private volatile java.lang.Object monitoredResource_; - /** - * optional string monitored_resource = 3; - * - *
-     * The monitored resource type. The type must be defined in
-     * [Service.monitored_resources][] section.
-     * 
- */ - public java.lang.String getMonitoredResource() { - java.lang.Object ref = monitoredResource_; - 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(); - monitoredResource_ = s; - return s; - } - } - /** - * optional string monitored_resource = 3; - * - *
-     * The monitored resource type. The type must be defined in
-     * [Service.monitored_resources][] section.
-     * 
- */ - public com.google.protobuf.ByteString - getMonitoredResourceBytes() { - java.lang.Object ref = monitoredResource_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - monitoredResource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOGS_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList logs_; - /** - * repeated string logs = 1; - * - *
-     * Names of the logs to be sent to this destination. Each name must
-     * be defined in the [Service.logs][] section.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getLogsList() { - return logs_; - } - /** - * repeated string logs = 1; - * - *
-     * Names of the logs to be sent to this destination. Each name must
-     * be defined in the [Service.logs][] section.
-     * 
- */ - public int getLogsCount() { - return logs_.size(); - } - /** - * repeated string logs = 1; - * - *
-     * Names of the logs to be sent to this destination. Each name must
-     * be defined in the [Service.logs][] section.
-     * 
- */ - public java.lang.String getLogs(int index) { - return logs_.get(index); - } - /** - * repeated string logs = 1; - * - *
-     * Names of the logs to be sent to this destination. Each name must
-     * be defined in the [Service.logs][] section.
-     * 
- */ - public com.google.protobuf.ByteString - getLogsBytes(int index) { - return logs_.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 < logs_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, logs_.getRaw(i)); - } - if (!getMonitoredResourceBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, monitoredResource_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < logs_.size(); i++) { - dataSize += computeStringSizeNoTag(logs_.getRaw(i)); - } - size += dataSize; - size += 1 * getLogsList().size(); - } - if (!getMonitoredResourceBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, monitoredResource_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.Logging.LoggingDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Logging.LoggingDestination 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.Logging.LoggingDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Logging.LoggingDestination parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.Logging.LoggingDestination parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Logging.LoggingDestination parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.Logging.LoggingDestination parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.Logging.LoggingDestination parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.Logging.LoggingDestination parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Logging.LoggingDestination 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.Logging.LoggingDestination 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.Logging.LoggingDestination} - * - *
-     * Configuration of a specific logging destination (the producer project
-     * or the consumer project).
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.Logging.LoggingDestination) - com.google.api.Logging.LoggingDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.LoggingProto.internal_static_google_api_Logging_LoggingDestination_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.LoggingProto.internal_static_google_api_Logging_LoggingDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Logging.LoggingDestination.class, com.google.api.Logging.LoggingDestination.Builder.class); - } - - // Construct using com.google.api.Logging.LoggingDestination.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(); - monitoredResource_ = ""; - - logs_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.LoggingProto.internal_static_google_api_Logging_LoggingDestination_descriptor; - } - - public com.google.api.Logging.LoggingDestination getDefaultInstanceForType() { - return com.google.api.Logging.LoggingDestination.getDefaultInstance(); - } - - public com.google.api.Logging.LoggingDestination build() { - com.google.api.Logging.LoggingDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.Logging.LoggingDestination buildPartial() { - com.google.api.Logging.LoggingDestination result = new com.google.api.Logging.LoggingDestination(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.monitoredResource_ = monitoredResource_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - logs_ = logs_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.logs_ = logs_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.Logging.LoggingDestination) { - return mergeFrom((com.google.api.Logging.LoggingDestination)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.Logging.LoggingDestination other) { - if (other == com.google.api.Logging.LoggingDestination.getDefaultInstance()) return this; - if (!other.getMonitoredResource().isEmpty()) { - monitoredResource_ = other.monitoredResource_; - onChanged(); - } - if (!other.logs_.isEmpty()) { - if (logs_.isEmpty()) { - logs_ = other.logs_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureLogsIsMutable(); - logs_.addAll(other.logs_); - } - 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.Logging.LoggingDestination parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.Logging.LoggingDestination) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object monitoredResource_ = ""; - /** - * optional string monitored_resource = 3; - * - *
-       * The monitored resource type. The type must be defined in
-       * [Service.monitored_resources][] section.
-       * 
- */ - public java.lang.String getMonitoredResource() { - java.lang.Object ref = monitoredResource_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - monitoredResource_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string monitored_resource = 3; - * - *
-       * The monitored resource type. The type must be defined in
-       * [Service.monitored_resources][] section.
-       * 
- */ - public com.google.protobuf.ByteString - getMonitoredResourceBytes() { - java.lang.Object ref = monitoredResource_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - monitoredResource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string monitored_resource = 3; - * - *
-       * The monitored resource type. The type must be defined in
-       * [Service.monitored_resources][] section.
-       * 
- */ - public Builder setMonitoredResource( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - monitoredResource_ = value; - onChanged(); - return this; - } - /** - * optional string monitored_resource = 3; - * - *
-       * The monitored resource type. The type must be defined in
-       * [Service.monitored_resources][] section.
-       * 
- */ - public Builder clearMonitoredResource() { - - monitoredResource_ = getDefaultInstance().getMonitoredResource(); - onChanged(); - return this; - } - /** - * optional string monitored_resource = 3; - * - *
-       * The monitored resource type. The type must be defined in
-       * [Service.monitored_resources][] section.
-       * 
- */ - public Builder setMonitoredResourceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - monitoredResource_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList logs_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureLogsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - logs_ = new com.google.protobuf.LazyStringArrayList(logs_); - bitField0_ |= 0x00000002; - } - } - /** - * repeated string logs = 1; - * - *
-       * Names of the logs to be sent to this destination. Each name must
-       * be defined in the [Service.logs][] section.
-       * 
- */ - public com.google.protobuf.ProtocolStringList - getLogsList() { - return logs_.getUnmodifiableView(); - } - /** - * repeated string logs = 1; - * - *
-       * Names of the logs to be sent to this destination. Each name must
-       * be defined in the [Service.logs][] section.
-       * 
- */ - public int getLogsCount() { - return logs_.size(); - } - /** - * repeated string logs = 1; - * - *
-       * Names of the logs to be sent to this destination. Each name must
-       * be defined in the [Service.logs][] section.
-       * 
- */ - public java.lang.String getLogs(int index) { - return logs_.get(index); - } - /** - * repeated string logs = 1; - * - *
-       * Names of the logs to be sent to this destination. Each name must
-       * be defined in the [Service.logs][] section.
-       * 
- */ - public com.google.protobuf.ByteString - getLogsBytes(int index) { - return logs_.getByteString(index); - } - /** - * repeated string logs = 1; - * - *
-       * Names of the logs to be sent to this destination. Each name must
-       * be defined in the [Service.logs][] section.
-       * 
- */ - public Builder setLogs( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureLogsIsMutable(); - logs_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string logs = 1; - * - *
-       * Names of the logs to be sent to this destination. Each name must
-       * be defined in the [Service.logs][] section.
-       * 
- */ - public Builder addLogs( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureLogsIsMutable(); - logs_.add(value); - onChanged(); - return this; - } - /** - * repeated string logs = 1; - * - *
-       * Names of the logs to be sent to this destination. Each name must
-       * be defined in the [Service.logs][] section.
-       * 
- */ - public Builder addAllLogs( - java.lang.Iterable values) { - ensureLogsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, logs_); - onChanged(); - return this; - } - /** - * repeated string logs = 1; - * - *
-       * Names of the logs to be sent to this destination. Each name must
-       * be defined in the [Service.logs][] section.
-       * 
- */ - public Builder clearLogs() { - logs_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * repeated string logs = 1; - * - *
-       * Names of the logs to be sent to this destination. Each name must
-       * be defined in the [Service.logs][] section.
-       * 
- */ - public Builder addLogsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureLogsIsMutable(); - logs_.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.Logging.LoggingDestination) - } - - // @@protoc_insertion_point(class_scope:google.api.Logging.LoggingDestination) - private static final com.google.api.Logging.LoggingDestination DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.Logging.LoggingDestination(); - } - - public static com.google.api.Logging.LoggingDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public LoggingDestination parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new LoggingDestination(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.Logging.LoggingDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int PRODUCER_DESTINATIONS_FIELD_NUMBER = 1; - private java.util.List producerDestinations_; - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-   * Logging configurations for sending logs to the producer project.
-   * There can be multiple producer destinations, each one must have a
-   * different monitored resource type. A log can be used in at most
-   * one producer destination.
-   * 
- */ - public java.util.List getProducerDestinationsList() { - return producerDestinations_; - } - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-   * Logging configurations for sending logs to the producer project.
-   * There can be multiple producer destinations, each one must have a
-   * different monitored resource type. A log can be used in at most
-   * one producer destination.
-   * 
- */ - public java.util.List - getProducerDestinationsOrBuilderList() { - return producerDestinations_; - } - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-   * Logging configurations for sending logs to the producer project.
-   * There can be multiple producer destinations, each one must have a
-   * different monitored resource type. A log can be used in at most
-   * one producer destination.
-   * 
- */ - public int getProducerDestinationsCount() { - return producerDestinations_.size(); - } - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-   * Logging configurations for sending logs to the producer project.
-   * There can be multiple producer destinations, each one must have a
-   * different monitored resource type. A log can be used in at most
-   * one producer destination.
-   * 
- */ - public com.google.api.Logging.LoggingDestination getProducerDestinations(int index) { - return producerDestinations_.get(index); - } - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-   * Logging configurations for sending logs to the producer project.
-   * There can be multiple producer destinations, each one must have a
-   * different monitored resource type. A log can be used in at most
-   * one producer destination.
-   * 
- */ - public com.google.api.Logging.LoggingDestinationOrBuilder getProducerDestinationsOrBuilder( - int index) { - return producerDestinations_.get(index); - } - - public static final int CONSUMER_DESTINATIONS_FIELD_NUMBER = 2; - private java.util.List consumerDestinations_; - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-   * Logging configurations for sending logs to the consumer project.
-   * There can be multiple consumer destinations, each one must have a
-   * different monitored resource type. A log can be used in at most
-   * one consumer destination.
-   * 
- */ - public java.util.List getConsumerDestinationsList() { - return consumerDestinations_; - } - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-   * Logging configurations for sending logs to the consumer project.
-   * There can be multiple consumer destinations, each one must have a
-   * different monitored resource type. A log can be used in at most
-   * one consumer destination.
-   * 
- */ - public java.util.List - getConsumerDestinationsOrBuilderList() { - return consumerDestinations_; - } - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-   * Logging configurations for sending logs to the consumer project.
-   * There can be multiple consumer destinations, each one must have a
-   * different monitored resource type. A log can be used in at most
-   * one consumer destination.
-   * 
- */ - public int getConsumerDestinationsCount() { - return consumerDestinations_.size(); - } - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-   * Logging configurations for sending logs to the consumer project.
-   * There can be multiple consumer destinations, each one must have a
-   * different monitored resource type. A log can be used in at most
-   * one consumer destination.
-   * 
- */ - public com.google.api.Logging.LoggingDestination getConsumerDestinations(int index) { - return consumerDestinations_.get(index); - } - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-   * Logging configurations for sending logs to the consumer project.
-   * There can be multiple consumer destinations, each one must have a
-   * different monitored resource type. A log can be used in at most
-   * one consumer destination.
-   * 
- */ - public com.google.api.Logging.LoggingDestinationOrBuilder getConsumerDestinationsOrBuilder( - int index) { - return consumerDestinations_.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 < producerDestinations_.size(); i++) { - output.writeMessage(1, producerDestinations_.get(i)); - } - for (int i = 0; i < consumerDestinations_.size(); i++) { - output.writeMessage(2, consumerDestinations_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < producerDestinations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, producerDestinations_.get(i)); - } - for (int i = 0; i < consumerDestinations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, consumerDestinations_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.Logging parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Logging 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.Logging parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Logging parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.Logging parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Logging parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.Logging parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.Logging parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.Logging parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Logging 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.Logging 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.Logging} - * - *
-   * Logging configuration of the service.
-   * The following example shows how to configure logs to be sent to the
-   * producer and consumer projects. In the example,
-   * the `library.googleapis.com/activity_history` log is
-   * sent to both the producer and consumer projects, whereas
-   * the `library.googleapis.com/purchase_history` log is only sent to the
-   * producer project:
-   *     monitored_resources:
-   *     - type: library.googleapis.com/branch
-   *       labels:
-   *       - key: /city
-   *         description: The city where the library branch is located in.
-   *       - key: /name
-   *         description: The name of the branch.
-   *     logs:
-   *     - name: library.googleapis.com/activity_history
-   *       labels:
-   *       - key: /customer_id
-   *     - name: library.googleapis.com/purchase_history
-   *     logging:
-   *       producer_destinations:
-   *       - monitored_resource: library.googleapis.com/branch
-   *         logs:
-   *         - library.googleapis.com/activity_history
-   *         - library.googleapis.com/purchase_history
-   *       consumer_destinations:
-   *       - monitored_resource: library.googleapis.com/branch
-   *         logs:
-   *         - library.googleapis.com/activity_history
-   * (-- GOOGLE_INTERNAL:
-   * This example shows how to configure a log to be sent to the consumer project,
-   * and skip fine grained ACL check since the service is a trusted
-   * Google service:
-   *     logging:
-   *       consumer_destination:
-   *         logs:
-   *         - library.googleapis.com/activity_history
-   *         acl:
-   *           model: SKIP
-   * --)
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.Logging) - com.google.api.LoggingOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.LoggingProto.internal_static_google_api_Logging_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.LoggingProto.internal_static_google_api_Logging_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Logging.class, com.google.api.Logging.Builder.class); - } - - // Construct using com.google.api.Logging.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getProducerDestinationsFieldBuilder(); - getConsumerDestinationsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (producerDestinationsBuilder_ == null) { - producerDestinations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - producerDestinationsBuilder_.clear(); - } - if (consumerDestinationsBuilder_ == null) { - consumerDestinations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - consumerDestinationsBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.LoggingProto.internal_static_google_api_Logging_descriptor; - } - - public com.google.api.Logging getDefaultInstanceForType() { - return com.google.api.Logging.getDefaultInstance(); - } - - public com.google.api.Logging build() { - com.google.api.Logging result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.Logging buildPartial() { - com.google.api.Logging result = new com.google.api.Logging(this); - int from_bitField0_ = bitField0_; - if (producerDestinationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - producerDestinations_ = java.util.Collections.unmodifiableList(producerDestinations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.producerDestinations_ = producerDestinations_; - } else { - result.producerDestinations_ = producerDestinationsBuilder_.build(); - } - if (consumerDestinationsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - consumerDestinations_ = java.util.Collections.unmodifiableList(consumerDestinations_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.consumerDestinations_ = consumerDestinations_; - } else { - result.consumerDestinations_ = consumerDestinationsBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.Logging) { - return mergeFrom((com.google.api.Logging)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.Logging other) { - if (other == com.google.api.Logging.getDefaultInstance()) return this; - if (producerDestinationsBuilder_ == null) { - if (!other.producerDestinations_.isEmpty()) { - if (producerDestinations_.isEmpty()) { - producerDestinations_ = other.producerDestinations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureProducerDestinationsIsMutable(); - producerDestinations_.addAll(other.producerDestinations_); - } - onChanged(); - } - } else { - if (!other.producerDestinations_.isEmpty()) { - if (producerDestinationsBuilder_.isEmpty()) { - producerDestinationsBuilder_.dispose(); - producerDestinationsBuilder_ = null; - producerDestinations_ = other.producerDestinations_; - bitField0_ = (bitField0_ & ~0x00000001); - producerDestinationsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getProducerDestinationsFieldBuilder() : null; - } else { - producerDestinationsBuilder_.addAllMessages(other.producerDestinations_); - } - } - } - if (consumerDestinationsBuilder_ == null) { - if (!other.consumerDestinations_.isEmpty()) { - if (consumerDestinations_.isEmpty()) { - consumerDestinations_ = other.consumerDestinations_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureConsumerDestinationsIsMutable(); - consumerDestinations_.addAll(other.consumerDestinations_); - } - onChanged(); - } - } else { - if (!other.consumerDestinations_.isEmpty()) { - if (consumerDestinationsBuilder_.isEmpty()) { - consumerDestinationsBuilder_.dispose(); - consumerDestinationsBuilder_ = null; - consumerDestinations_ = other.consumerDestinations_; - bitField0_ = (bitField0_ & ~0x00000002); - consumerDestinationsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getConsumerDestinationsFieldBuilder() : null; - } else { - consumerDestinationsBuilder_.addAllMessages(other.consumerDestinations_); - } - } - } - 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.Logging parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.Logging) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List producerDestinations_ = - java.util.Collections.emptyList(); - private void ensureProducerDestinationsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - producerDestinations_ = new java.util.ArrayList(producerDestinations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.Logging.LoggingDestination, com.google.api.Logging.LoggingDestination.Builder, com.google.api.Logging.LoggingDestinationOrBuilder> producerDestinationsBuilder_; - - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-     * Logging configurations for sending logs to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one producer destination.
-     * 
- */ - public java.util.List getProducerDestinationsList() { - if (producerDestinationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(producerDestinations_); - } else { - return producerDestinationsBuilder_.getMessageList(); - } - } - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-     * Logging configurations for sending logs to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one producer destination.
-     * 
- */ - public int getProducerDestinationsCount() { - if (producerDestinationsBuilder_ == null) { - return producerDestinations_.size(); - } else { - return producerDestinationsBuilder_.getCount(); - } - } - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-     * Logging configurations for sending logs to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one producer destination.
-     * 
- */ - public com.google.api.Logging.LoggingDestination getProducerDestinations(int index) { - if (producerDestinationsBuilder_ == null) { - return producerDestinations_.get(index); - } else { - return producerDestinationsBuilder_.getMessage(index); - } - } - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-     * Logging configurations for sending logs to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one producer destination.
-     * 
- */ - public Builder setProducerDestinations( - int index, com.google.api.Logging.LoggingDestination value) { - if (producerDestinationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProducerDestinationsIsMutable(); - producerDestinations_.set(index, value); - onChanged(); - } else { - producerDestinationsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-     * Logging configurations for sending logs to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one producer destination.
-     * 
- */ - public Builder setProducerDestinations( - int index, com.google.api.Logging.LoggingDestination.Builder builderForValue) { - if (producerDestinationsBuilder_ == null) { - ensureProducerDestinationsIsMutable(); - producerDestinations_.set(index, builderForValue.build()); - onChanged(); - } else { - producerDestinationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-     * Logging configurations for sending logs to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one producer destination.
-     * 
- */ - public Builder addProducerDestinations(com.google.api.Logging.LoggingDestination value) { - if (producerDestinationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProducerDestinationsIsMutable(); - producerDestinations_.add(value); - onChanged(); - } else { - producerDestinationsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-     * Logging configurations for sending logs to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one producer destination.
-     * 
- */ - public Builder addProducerDestinations( - int index, com.google.api.Logging.LoggingDestination value) { - if (producerDestinationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProducerDestinationsIsMutable(); - producerDestinations_.add(index, value); - onChanged(); - } else { - producerDestinationsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-     * Logging configurations for sending logs to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one producer destination.
-     * 
- */ - public Builder addProducerDestinations( - com.google.api.Logging.LoggingDestination.Builder builderForValue) { - if (producerDestinationsBuilder_ == null) { - ensureProducerDestinationsIsMutable(); - producerDestinations_.add(builderForValue.build()); - onChanged(); - } else { - producerDestinationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-     * Logging configurations for sending logs to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one producer destination.
-     * 
- */ - public Builder addProducerDestinations( - int index, com.google.api.Logging.LoggingDestination.Builder builderForValue) { - if (producerDestinationsBuilder_ == null) { - ensureProducerDestinationsIsMutable(); - producerDestinations_.add(index, builderForValue.build()); - onChanged(); - } else { - producerDestinationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-     * Logging configurations for sending logs to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one producer destination.
-     * 
- */ - public Builder addAllProducerDestinations( - java.lang.Iterable values) { - if (producerDestinationsBuilder_ == null) { - ensureProducerDestinationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, producerDestinations_); - onChanged(); - } else { - producerDestinationsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-     * Logging configurations for sending logs to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one producer destination.
-     * 
- */ - public Builder clearProducerDestinations() { - if (producerDestinationsBuilder_ == null) { - producerDestinations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - producerDestinationsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-     * Logging configurations for sending logs to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one producer destination.
-     * 
- */ - public Builder removeProducerDestinations(int index) { - if (producerDestinationsBuilder_ == null) { - ensureProducerDestinationsIsMutable(); - producerDestinations_.remove(index); - onChanged(); - } else { - producerDestinationsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-     * Logging configurations for sending logs to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one producer destination.
-     * 
- */ - public com.google.api.Logging.LoggingDestination.Builder getProducerDestinationsBuilder( - int index) { - return getProducerDestinationsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-     * Logging configurations for sending logs to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one producer destination.
-     * 
- */ - public com.google.api.Logging.LoggingDestinationOrBuilder getProducerDestinationsOrBuilder( - int index) { - if (producerDestinationsBuilder_ == null) { - return producerDestinations_.get(index); } else { - return producerDestinationsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-     * Logging configurations for sending logs to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one producer destination.
-     * 
- */ - public java.util.List - getProducerDestinationsOrBuilderList() { - if (producerDestinationsBuilder_ != null) { - return producerDestinationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(producerDestinations_); - } - } - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-     * Logging configurations for sending logs to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one producer destination.
-     * 
- */ - public com.google.api.Logging.LoggingDestination.Builder addProducerDestinationsBuilder() { - return getProducerDestinationsFieldBuilder().addBuilder( - com.google.api.Logging.LoggingDestination.getDefaultInstance()); - } - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-     * Logging configurations for sending logs to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one producer destination.
-     * 
- */ - public com.google.api.Logging.LoggingDestination.Builder addProducerDestinationsBuilder( - int index) { - return getProducerDestinationsFieldBuilder().addBuilder( - index, com.google.api.Logging.LoggingDestination.getDefaultInstance()); - } - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-     * Logging configurations for sending logs to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one producer destination.
-     * 
- */ - public java.util.List - getProducerDestinationsBuilderList() { - return getProducerDestinationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.Logging.LoggingDestination, com.google.api.Logging.LoggingDestination.Builder, com.google.api.Logging.LoggingDestinationOrBuilder> - getProducerDestinationsFieldBuilder() { - if (producerDestinationsBuilder_ == null) { - producerDestinationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.api.Logging.LoggingDestination, com.google.api.Logging.LoggingDestination.Builder, com.google.api.Logging.LoggingDestinationOrBuilder>( - producerDestinations_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - producerDestinations_ = null; - } - return producerDestinationsBuilder_; - } - - private java.util.List consumerDestinations_ = - java.util.Collections.emptyList(); - private void ensureConsumerDestinationsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - consumerDestinations_ = new java.util.ArrayList(consumerDestinations_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.Logging.LoggingDestination, com.google.api.Logging.LoggingDestination.Builder, com.google.api.Logging.LoggingDestinationOrBuilder> consumerDestinationsBuilder_; - - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-     * Logging configurations for sending logs to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one consumer destination.
-     * 
- */ - public java.util.List getConsumerDestinationsList() { - if (consumerDestinationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(consumerDestinations_); - } else { - return consumerDestinationsBuilder_.getMessageList(); - } - } - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-     * Logging configurations for sending logs to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one consumer destination.
-     * 
- */ - public int getConsumerDestinationsCount() { - if (consumerDestinationsBuilder_ == null) { - return consumerDestinations_.size(); - } else { - return consumerDestinationsBuilder_.getCount(); - } - } - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-     * Logging configurations for sending logs to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one consumer destination.
-     * 
- */ - public com.google.api.Logging.LoggingDestination getConsumerDestinations(int index) { - if (consumerDestinationsBuilder_ == null) { - return consumerDestinations_.get(index); - } else { - return consumerDestinationsBuilder_.getMessage(index); - } - } - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-     * Logging configurations for sending logs to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one consumer destination.
-     * 
- */ - public Builder setConsumerDestinations( - int index, com.google.api.Logging.LoggingDestination value) { - if (consumerDestinationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConsumerDestinationsIsMutable(); - consumerDestinations_.set(index, value); - onChanged(); - } else { - consumerDestinationsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-     * Logging configurations for sending logs to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one consumer destination.
-     * 
- */ - public Builder setConsumerDestinations( - int index, com.google.api.Logging.LoggingDestination.Builder builderForValue) { - if (consumerDestinationsBuilder_ == null) { - ensureConsumerDestinationsIsMutable(); - consumerDestinations_.set(index, builderForValue.build()); - onChanged(); - } else { - consumerDestinationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-     * Logging configurations for sending logs to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one consumer destination.
-     * 
- */ - public Builder addConsumerDestinations(com.google.api.Logging.LoggingDestination value) { - if (consumerDestinationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConsumerDestinationsIsMutable(); - consumerDestinations_.add(value); - onChanged(); - } else { - consumerDestinationsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-     * Logging configurations for sending logs to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one consumer destination.
-     * 
- */ - public Builder addConsumerDestinations( - int index, com.google.api.Logging.LoggingDestination value) { - if (consumerDestinationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConsumerDestinationsIsMutable(); - consumerDestinations_.add(index, value); - onChanged(); - } else { - consumerDestinationsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-     * Logging configurations for sending logs to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one consumer destination.
-     * 
- */ - public Builder addConsumerDestinations( - com.google.api.Logging.LoggingDestination.Builder builderForValue) { - if (consumerDestinationsBuilder_ == null) { - ensureConsumerDestinationsIsMutable(); - consumerDestinations_.add(builderForValue.build()); - onChanged(); - } else { - consumerDestinationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-     * Logging configurations for sending logs to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one consumer destination.
-     * 
- */ - public Builder addConsumerDestinations( - int index, com.google.api.Logging.LoggingDestination.Builder builderForValue) { - if (consumerDestinationsBuilder_ == null) { - ensureConsumerDestinationsIsMutable(); - consumerDestinations_.add(index, builderForValue.build()); - onChanged(); - } else { - consumerDestinationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-     * Logging configurations for sending logs to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one consumer destination.
-     * 
- */ - public Builder addAllConsumerDestinations( - java.lang.Iterable values) { - if (consumerDestinationsBuilder_ == null) { - ensureConsumerDestinationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, consumerDestinations_); - onChanged(); - } else { - consumerDestinationsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-     * Logging configurations for sending logs to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one consumer destination.
-     * 
- */ - public Builder clearConsumerDestinations() { - if (consumerDestinationsBuilder_ == null) { - consumerDestinations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - consumerDestinationsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-     * Logging configurations for sending logs to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one consumer destination.
-     * 
- */ - public Builder removeConsumerDestinations(int index) { - if (consumerDestinationsBuilder_ == null) { - ensureConsumerDestinationsIsMutable(); - consumerDestinations_.remove(index); - onChanged(); - } else { - consumerDestinationsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-     * Logging configurations for sending logs to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one consumer destination.
-     * 
- */ - public com.google.api.Logging.LoggingDestination.Builder getConsumerDestinationsBuilder( - int index) { - return getConsumerDestinationsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-     * Logging configurations for sending logs to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one consumer destination.
-     * 
- */ - public com.google.api.Logging.LoggingDestinationOrBuilder getConsumerDestinationsOrBuilder( - int index) { - if (consumerDestinationsBuilder_ == null) { - return consumerDestinations_.get(index); } else { - return consumerDestinationsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-     * Logging configurations for sending logs to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one consumer destination.
-     * 
- */ - public java.util.List - getConsumerDestinationsOrBuilderList() { - if (consumerDestinationsBuilder_ != null) { - return consumerDestinationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(consumerDestinations_); - } - } - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-     * Logging configurations for sending logs to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one consumer destination.
-     * 
- */ - public com.google.api.Logging.LoggingDestination.Builder addConsumerDestinationsBuilder() { - return getConsumerDestinationsFieldBuilder().addBuilder( - com.google.api.Logging.LoggingDestination.getDefaultInstance()); - } - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-     * Logging configurations for sending logs to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one consumer destination.
-     * 
- */ - public com.google.api.Logging.LoggingDestination.Builder addConsumerDestinationsBuilder( - int index) { - return getConsumerDestinationsFieldBuilder().addBuilder( - index, com.google.api.Logging.LoggingDestination.getDefaultInstance()); - } - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-     * Logging configurations for sending logs to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A log can be used in at most
-     * one consumer destination.
-     * 
- */ - public java.util.List - getConsumerDestinationsBuilderList() { - return getConsumerDestinationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.Logging.LoggingDestination, com.google.api.Logging.LoggingDestination.Builder, com.google.api.Logging.LoggingDestinationOrBuilder> - getConsumerDestinationsFieldBuilder() { - if (consumerDestinationsBuilder_ == null) { - consumerDestinationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.api.Logging.LoggingDestination, com.google.api.Logging.LoggingDestination.Builder, com.google.api.Logging.LoggingDestinationOrBuilder>( - consumerDestinations_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - consumerDestinations_ = null; - } - return consumerDestinationsBuilder_; - } - 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.Logging) - } - - // @@protoc_insertion_point(class_scope:google.api.Logging) - private static final com.google.api.Logging DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.Logging(); - } - - public static com.google.api.Logging getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Logging parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Logging(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.Logging getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/LoggingOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/LoggingOrBuilder.java deleted file mode 100644 index 23e37a541406..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/LoggingOrBuilder.java +++ /dev/null @@ -1,127 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/logging.proto - -package com.google.api; - -public interface LoggingOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.Logging) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-   * Logging configurations for sending logs to the producer project.
-   * There can be multiple producer destinations, each one must have a
-   * different monitored resource type. A log can be used in at most
-   * one producer destination.
-   * 
- */ - java.util.List - getProducerDestinationsList(); - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-   * Logging configurations for sending logs to the producer project.
-   * There can be multiple producer destinations, each one must have a
-   * different monitored resource type. A log can be used in at most
-   * one producer destination.
-   * 
- */ - com.google.api.Logging.LoggingDestination getProducerDestinations(int index); - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-   * Logging configurations for sending logs to the producer project.
-   * There can be multiple producer destinations, each one must have a
-   * different monitored resource type. A log can be used in at most
-   * one producer destination.
-   * 
- */ - int getProducerDestinationsCount(); - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-   * Logging configurations for sending logs to the producer project.
-   * There can be multiple producer destinations, each one must have a
-   * different monitored resource type. A log can be used in at most
-   * one producer destination.
-   * 
- */ - java.util.List - getProducerDestinationsOrBuilderList(); - /** - * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - * - *
-   * Logging configurations for sending logs to the producer project.
-   * There can be multiple producer destinations, each one must have a
-   * different monitored resource type. A log can be used in at most
-   * one producer destination.
-   * 
- */ - com.google.api.Logging.LoggingDestinationOrBuilder getProducerDestinationsOrBuilder( - int index); - - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-   * Logging configurations for sending logs to the consumer project.
-   * There can be multiple consumer destinations, each one must have a
-   * different monitored resource type. A log can be used in at most
-   * one consumer destination.
-   * 
- */ - java.util.List - getConsumerDestinationsList(); - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-   * Logging configurations for sending logs to the consumer project.
-   * There can be multiple consumer destinations, each one must have a
-   * different monitored resource type. A log can be used in at most
-   * one consumer destination.
-   * 
- */ - com.google.api.Logging.LoggingDestination getConsumerDestinations(int index); - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-   * Logging configurations for sending logs to the consumer project.
-   * There can be multiple consumer destinations, each one must have a
-   * different monitored resource type. A log can be used in at most
-   * one consumer destination.
-   * 
- */ - int getConsumerDestinationsCount(); - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-   * Logging configurations for sending logs to the consumer project.
-   * There can be multiple consumer destinations, each one must have a
-   * different monitored resource type. A log can be used in at most
-   * one consumer destination.
-   * 
- */ - java.util.List - getConsumerDestinationsOrBuilderList(); - /** - * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - * - *
-   * Logging configurations for sending logs to the consumer project.
-   * There can be multiple consumer destinations, each one must have a
-   * different monitored resource type. A log can be used in at most
-   * one consumer destination.
-   * 
- */ - com.google.api.Logging.LoggingDestinationOrBuilder getConsumerDestinationsOrBuilder( - int index); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/LoggingProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/LoggingProto.java deleted file mode 100644 index 191803347fcc..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/LoggingProto.java +++ /dev/null @@ -1,72 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/logging.proto - -package com.google.api; - -public final class LoggingProto { - private LoggingProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_Logging_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_Logging_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_Logging_LoggingDestination_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_Logging_LoggingDestination_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/logging.proto\022\ngoogle.api\032\034" + - "google/api/annotations.proto\032\'google/api" + - "/service_control_access.proto\"\327\001\n\007Loggin" + - "g\022E\n\025producer_destinations\030\001 \003(\0132&.googl" + - "e.api.Logging.LoggingDestination\022E\n\025cons" + - "umer_destinations\030\002 \003(\0132&.google.api.Log" + - "ging.LoggingDestination\032>\n\022LoggingDestin" + - "ation\022\032\n\022monitored_resource\030\003 \001(\t\022\014\n\004log" + - "s\030\001 \003(\tB \n\016com.google.apiB\014LoggingProtoP" + - "\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.api.ServiceControlAccessProto.getDescriptor(), - }, assigner); - internal_static_google_api_Logging_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_api_Logging_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_Logging_descriptor, - new java.lang.String[] { "ProducerDestinations", "ConsumerDestinations", }); - internal_static_google_api_Logging_LoggingDestination_descriptor = - internal_static_google_api_Logging_descriptor.getNestedTypes().get(0); - internal_static_google_api_Logging_LoggingDestination_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_Logging_LoggingDestination_descriptor, - new java.lang.String[] { "MonitoredResource", "Logs", }); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ServiceControlAccessProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MetricDescriptor.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MetricDescriptor.java deleted file mode 100644 index 5bcfde55dda4..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/MetricDescriptor.java +++ /dev/null @@ -1,2450 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/metric.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.MetricDescriptor} - * - *
- * A description of a type of metric.
- * 
- */ -public final class MetricDescriptor extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.MetricDescriptor) - MetricDescriptorOrBuilder { - // Use MetricDescriptor.newBuilder() to construct. - private MetricDescriptor(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MetricDescriptor() { - name_ = ""; - labels_ = java.util.Collections.emptyList(); - metricKind_ = 0; - valueType_ = 0; - unit_ = ""; - description_ = ""; - displayName_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private MetricDescriptor( - 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: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - labels_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - labels_.add(input.readMessage(com.google.api.LabelDescriptor.parser(), extensionRegistry)); - break; - } - case 24: { - int rawValue = input.readEnum(); - - metricKind_ = rawValue; - break; - } - case 32: { - int rawValue = input.readEnum(); - - valueType_ = rawValue; - break; - } - case 42: { - String s = input.readStringRequireUtf8(); - - unit_ = s; - break; - } - case 50: { - String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 58: { - String s = input.readStringRequireUtf8(); - - displayName_ = 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)) { - labels_ = java.util.Collections.unmodifiableList(labels_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.MetricProto.internal_static_google_api_MetricDescriptor_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.MetricProto.internal_static_google_api_MetricDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.MetricDescriptor.class, com.google.api.MetricDescriptor.Builder.class); - } - - /** - * Protobuf enum {@code google.api.MetricDescriptor.MetricKind} - * - *
-   * The kind of measurement. It describes how the data is reported.
-   * 
- */ - public enum MetricKind - implements com.google.protobuf.ProtocolMessageEnum { - /** - * METRIC_KIND_UNSPECIFIED = 0; - * - *
-     * An unspecified metric kind. The metric descriptor must specify a value
-     * different from `METRIC_KIND_UNSPECIFIED`.
-     * 
- */ - METRIC_KIND_UNSPECIFIED(0, 0), - /** - * GAUGE = 1; - * - *
-     * Instantaneous measurements of a varying quantity.
-     * 
- */ - GAUGE(1, 1), - /** - * DELTA = 2; - * - *
-     * Changes over non-overlapping time intervals.
-     * 
- */ - DELTA(2, 2), - /** - * CUMULATIVE = 3; - * - *
-     * Cumulative value over time intervals that can overlap.
-     * The overlapping intervals must have the same start time.
-     * 
- */ - CUMULATIVE(3, 3), - UNRECOGNIZED(-1, -1), - ; - - /** - * METRIC_KIND_UNSPECIFIED = 0; - * - *
-     * An unspecified metric kind. The metric descriptor must specify a value
-     * different from `METRIC_KIND_UNSPECIFIED`.
-     * 
- */ - public static final int METRIC_KIND_UNSPECIFIED_VALUE = 0; - /** - * GAUGE = 1; - * - *
-     * Instantaneous measurements of a varying quantity.
-     * 
- */ - public static final int GAUGE_VALUE = 1; - /** - * DELTA = 2; - * - *
-     * Changes over non-overlapping time intervals.
-     * 
- */ - public static final int DELTA_VALUE = 2; - /** - * CUMULATIVE = 3; - * - *
-     * Cumulative value over time intervals that can overlap.
-     * The overlapping intervals must have the same start time.
-     * 
- */ - public static final int CUMULATIVE_VALUE = 3; - - - 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 MetricKind valueOf(int value) { - switch (value) { - case 0: return METRIC_KIND_UNSPECIFIED; - case 1: return GAUGE; - case 2: return DELTA; - case 3: return CUMULATIVE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - MetricKind> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public MetricKind findValueByNumber(int number) { - return MetricKind.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.api.MetricDescriptor.getDescriptor().getEnumTypes().get(0); - } - - private static final MetricKind[] VALUES = values(); - - public static MetricKind 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 MetricKind(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.api.MetricDescriptor.MetricKind) - } - - /** - * Protobuf enum {@code google.api.MetricDescriptor.ValueType} - * - *
-   * The value type of a metric.
-   * 
- */ - public enum ValueType - implements com.google.protobuf.ProtocolMessageEnum { - /** - * VALUE_TYPE_UNSPECIFIED = 0; - * - *
-     * An unspecified value type. The metric descriptor must specify a value
-     * different from `VALUE_TYPE_UNSPECIFIED`.
-     * 
- */ - VALUE_TYPE_UNSPECIFIED(0, 0), - /** - * BOOL = 1; - * - *
-     * The value is a boolean.
-     * This value type can be used only if the metric kind is `GAUGE`.
-     * 
- */ - BOOL(1, 1), - /** - * INT64 = 2; - * - *
-     * The value is a signed 64-bit integer.
-     * 
- */ - INT64(2, 2), - /** - * DOUBLE = 3; - * - *
-     * The value is a double precision floating point number.
-     * 
- */ - DOUBLE(3, 3), - /** - * STRING = 4; - * - *
-     * The value is a text string.
-     * This value type can be used only if the metric kind is `GAUGE`.
-     * 
- */ - STRING(4, 4), - /** - * DISTRIBUTION = 5; - * - *
-     * The value is a distribution.
-     * 
- */ - DISTRIBUTION(5, 5), - /** - * MONEY = 6; - * - *
-     * The value is money.
-     * 
- */ - MONEY(6, 6), - UNRECOGNIZED(-1, -1), - ; - - /** - * VALUE_TYPE_UNSPECIFIED = 0; - * - *
-     * An unspecified value type. The metric descriptor must specify a value
-     * different from `VALUE_TYPE_UNSPECIFIED`.
-     * 
- */ - public static final int VALUE_TYPE_UNSPECIFIED_VALUE = 0; - /** - * BOOL = 1; - * - *
-     * The value is a boolean.
-     * This value type can be used only if the metric kind is `GAUGE`.
-     * 
- */ - public static final int BOOL_VALUE = 1; - /** - * INT64 = 2; - * - *
-     * The value is a signed 64-bit integer.
-     * 
- */ - public static final int INT64_VALUE = 2; - /** - * DOUBLE = 3; - * - *
-     * The value is a double precision floating point number.
-     * 
- */ - public static final int DOUBLE_VALUE = 3; - /** - * STRING = 4; - * - *
-     * The value is a text string.
-     * This value type can be used only if the metric kind is `GAUGE`.
-     * 
- */ - public static final int STRING_VALUE = 4; - /** - * DISTRIBUTION = 5; - * - *
-     * The value is a distribution.
-     * 
- */ - public static final int DISTRIBUTION_VALUE = 5; - /** - * MONEY = 6; - * - *
-     * The value is money.
-     * 
- */ - public static final int MONEY_VALUE = 6; - - - 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 ValueType valueOf(int value) { - switch (value) { - case 0: return VALUE_TYPE_UNSPECIFIED; - case 1: return BOOL; - case 2: return INT64; - case 3: return DOUBLE; - case 4: return STRING; - case 5: return DISTRIBUTION; - case 6: return MONEY; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ValueType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ValueType findValueByNumber(int number) { - return ValueType.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.api.MetricDescriptor.getDescriptor().getEnumTypes().get(1); - } - - private static final ValueType[] VALUES = values(); - - public static ValueType 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 ValueType(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.api.MetricDescriptor.ValueType) - } - - 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 metric type, including a domain prefix, such as
-   * `"compute.googleapis.com/instance/cpu/utilization"`.  Metric type names
-   * should use a natural hierarchical grouping such as the following:
-   *     compute.googleapis.com/instance/cpu/utilization
-   *     compute.googleapis.com/instance/disk/read_ops_count
-   *     compute.googleapis.com/instance/network/received_bytes_count
-   * Note that if the metric name changes, the monitoring data will be
-   * discontinued, and anything depends on it will break, such as monitoring
-   * dashborads, alerting rules and quota limits. Therefore, once a metric has
-   * been published, its name should be immutable. You can use the display_name
-   * field to provide a user-friendly name for the metric.
-   * 
- */ - 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 metric type, including a domain prefix, such as
-   * `"compute.googleapis.com/instance/cpu/utilization"`.  Metric type names
-   * should use a natural hierarchical grouping such as the following:
-   *     compute.googleapis.com/instance/cpu/utilization
-   *     compute.googleapis.com/instance/disk/read_ops_count
-   *     compute.googleapis.com/instance/network/received_bytes_count
-   * Note that if the metric name changes, the monitoring data will be
-   * discontinued, and anything depends on it will break, such as monitoring
-   * dashborads, alerting rules and quota limits. Therefore, once a metric has
-   * been published, its name should be immutable. You can use the display_name
-   * field to provide a user-friendly name for the metric.
-   * 
- */ - 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 LABELS_FIELD_NUMBER = 2; - private java.util.List labels_; - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-   * The set of labels that can be used to describe a specific instance of this
-   * metric type. For example, the
-   * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-   * has a label, `loadbalanced`, that specifies whether the traffic was
-   * received through a load balanced IP address.
-   * 
- */ - public java.util.List getLabelsList() { - return labels_; - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-   * The set of labels that can be used to describe a specific instance of this
-   * metric type. For example, the
-   * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-   * has a label, `loadbalanced`, that specifies whether the traffic was
-   * received through a load balanced IP address.
-   * 
- */ - public java.util.List - getLabelsOrBuilderList() { - return labels_; - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-   * The set of labels that can be used to describe a specific instance of this
-   * metric type. For example, the
-   * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-   * has a label, `loadbalanced`, that specifies whether the traffic was
-   * received through a load balanced IP address.
-   * 
- */ - public int getLabelsCount() { - return labels_.size(); - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-   * The set of labels that can be used to describe a specific instance of this
-   * metric type. For example, the
-   * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-   * has a label, `loadbalanced`, that specifies whether the traffic was
-   * received through a load balanced IP address.
-   * 
- */ - public com.google.api.LabelDescriptor getLabels(int index) { - return labels_.get(index); - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-   * The set of labels that can be used to describe a specific instance of this
-   * metric type. For example, the
-   * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-   * has a label, `loadbalanced`, that specifies whether the traffic was
-   * received through a load balanced IP address.
-   * 
- */ - public com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder( - int index) { - return labels_.get(index); - } - - public static final int METRIC_KIND_FIELD_NUMBER = 3; - private int metricKind_; - /** - * optional .google.api.MetricDescriptor.MetricKind metric_kind = 3; - * - *
-   * Whether the metric records instantaneous values, changes to a value, etc.
-   * 
- */ - public int getMetricKindValue() { - return metricKind_; - } - /** - * optional .google.api.MetricDescriptor.MetricKind metric_kind = 3; - * - *
-   * Whether the metric records instantaneous values, changes to a value, etc.
-   * 
- */ - public com.google.api.MetricDescriptor.MetricKind getMetricKind() { - com.google.api.MetricDescriptor.MetricKind result = com.google.api.MetricDescriptor.MetricKind.valueOf(metricKind_); - return result == null ? com.google.api.MetricDescriptor.MetricKind.UNRECOGNIZED : result; - } - - public static final int VALUE_TYPE_FIELD_NUMBER = 4; - private int valueType_; - /** - * optional .google.api.MetricDescriptor.ValueType value_type = 4; - * - *
-   * Whether the measurement is an integer, a floating-point number, etc.
-   * 
- */ - public int getValueTypeValue() { - return valueType_; - } - /** - * optional .google.api.MetricDescriptor.ValueType value_type = 4; - * - *
-   * Whether the measurement is an integer, a floating-point number, etc.
-   * 
- */ - public com.google.api.MetricDescriptor.ValueType getValueType() { - com.google.api.MetricDescriptor.ValueType result = com.google.api.MetricDescriptor.ValueType.valueOf(valueType_); - return result == null ? com.google.api.MetricDescriptor.ValueType.UNRECOGNIZED : result; - } - - public static final int UNIT_FIELD_NUMBER = 5; - private volatile java.lang.Object unit_; - /** - * optional string unit = 5; - * - *
-   * The unit in which the metric value is reported. It is only applicable
-   * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
-   * supported units are a subset of [The Unified Code for Units of
-   * Measure](http://unitsofmeasure.org/ucum.html) standard:
-   * **Basic units (UNIT)**
-   * * `bit`   bit
-   * * `By`    byte
-   * * `s`     second
-   * * `min`   minute
-   * * `h`     hour
-   * * `d`     day
-   * **Prefixes (PREFIX)**
-   * * `k`     kilo    (10**3)
-   * * `M`     mega    (10**6)
-   * * `G`     giga    (10**9)
-   * * `T`     tera    (10**12)
-   * * `P`     peta    (10**15)
-   * * `E`     exa     (10**18)
-   * * `Z`     zetta   (10**21)
-   * * `Y`     yotta   (10**24)
-   * * `m`     milli   (10**-3)
-   * * `u`     micro   (10**-6)
-   * * `n`     nano    (10**-9)
-   * * `p`     pico    (10**-12)
-   * * `f`     femto   (10**-15)
-   * * `a`     atto    (10**-18)
-   * * `z`     zepto   (10**-21)
-   * * `y`     yocto   (10**-24)
-   * * `Ki`    kibi    (2**10)
-   * * `Mi`    mebi    (2**20)
-   * * `Gi`    gibi    (2**30)
-   * * `Ti`    tebi    (2**40)
-   * **Grammar**
-   * The grammar includes the dimensionless unit `1`, such as `1/s`.
-   * The grammar also includes these connectors:
-   * * `/`    division (as an infix operator, e.g. `1/s`).
-   * * `.`    multiplication (as an infix operator, e.g. `GBy.d`)
-   * The grammar for a unit is as follows:
-   *     Expression = Component { "." Component } { "/" Component } ;
-   *     Component = [ PREFIX ] UNIT [ Annotation ]
-   *               | Annotation
-   *               | "1"
-   *               ;
-   *     Annotation = "{" NAME "}" ;
-   * Notes:
-   * * `Annotation` is just a comment if it follows a `UNIT` and is
-   *    equivalent to `1` if it is used alone. For examples,
-   *    `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
-   * * `NAME` is a sequence of non-blank printable ASCII characters not
-   *    containing '{' or '}'.
-   * 
- */ - public java.lang.String getUnit() { - java.lang.Object ref = unit_; - 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(); - unit_ = s; - return s; - } - } - /** - * optional string unit = 5; - * - *
-   * The unit in which the metric value is reported. It is only applicable
-   * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
-   * supported units are a subset of [The Unified Code for Units of
-   * Measure](http://unitsofmeasure.org/ucum.html) standard:
-   * **Basic units (UNIT)**
-   * * `bit`   bit
-   * * `By`    byte
-   * * `s`     second
-   * * `min`   minute
-   * * `h`     hour
-   * * `d`     day
-   * **Prefixes (PREFIX)**
-   * * `k`     kilo    (10**3)
-   * * `M`     mega    (10**6)
-   * * `G`     giga    (10**9)
-   * * `T`     tera    (10**12)
-   * * `P`     peta    (10**15)
-   * * `E`     exa     (10**18)
-   * * `Z`     zetta   (10**21)
-   * * `Y`     yotta   (10**24)
-   * * `m`     milli   (10**-3)
-   * * `u`     micro   (10**-6)
-   * * `n`     nano    (10**-9)
-   * * `p`     pico    (10**-12)
-   * * `f`     femto   (10**-15)
-   * * `a`     atto    (10**-18)
-   * * `z`     zepto   (10**-21)
-   * * `y`     yocto   (10**-24)
-   * * `Ki`    kibi    (2**10)
-   * * `Mi`    mebi    (2**20)
-   * * `Gi`    gibi    (2**30)
-   * * `Ti`    tebi    (2**40)
-   * **Grammar**
-   * The grammar includes the dimensionless unit `1`, such as `1/s`.
-   * The grammar also includes these connectors:
-   * * `/`    division (as an infix operator, e.g. `1/s`).
-   * * `.`    multiplication (as an infix operator, e.g. `GBy.d`)
-   * The grammar for a unit is as follows:
-   *     Expression = Component { "." Component } { "/" Component } ;
-   *     Component = [ PREFIX ] UNIT [ Annotation ]
-   *               | Annotation
-   *               | "1"
-   *               ;
-   *     Annotation = "{" NAME "}" ;
-   * Notes:
-   * * `Annotation` is just a comment if it follows a `UNIT` and is
-   *    equivalent to `1` if it is used alone. For examples,
-   *    `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
-   * * `NAME` is a sequence of non-blank printable ASCII characters not
-   *    containing '{' or '}'.
-   * 
- */ - public com.google.protobuf.ByteString - getUnitBytes() { - java.lang.Object ref = unit_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - unit_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 6; - private volatile java.lang.Object description_; - /** - * optional string description = 6; - * - *
-   * A detailed description of the monitored resource type, which is used in
-   * documentation.
-   * 
- */ - 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 = 6; - * - *
-   * A detailed description of the monitored resource type, which is used in
-   * documentation.
-   * 
- */ - 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 DISPLAY_NAME_FIELD_NUMBER = 7; - private volatile java.lang.Object displayName_; - /** - * optional string display_name = 7; - * - *
-   * A concise name for the monitored resource type, which is displayed in user
-   * interfaces.
-   * 
- */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - * optional string display_name = 7; - * - *
-   * A concise name for the monitored resource type, which is displayed in user
-   * interfaces.
-   * 
- */ - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - 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_); - } - for (int i = 0; i < labels_.size(); i++) { - output.writeMessage(2, labels_.get(i)); - } - if (metricKind_ != com.google.api.MetricDescriptor.MetricKind.METRIC_KIND_UNSPECIFIED.getNumber()) { - output.writeEnum(3, metricKind_); - } - if (valueType_ != com.google.api.MetricDescriptor.ValueType.VALUE_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(4, valueType_); - } - if (!getUnitBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 5, unit_); - } - if (!getDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 6, description_); - } - if (!getDisplayNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 7, displayName_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - for (int i = 0; i < labels_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, labels_.get(i)); - } - if (metricKind_ != com.google.api.MetricDescriptor.MetricKind.METRIC_KIND_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, metricKind_); - } - if (valueType_ != com.google.api.MetricDescriptor.ValueType.VALUE_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, valueType_); - } - if (!getUnitBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(5, unit_); - } - if (!getDescriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(6, description_); - } - if (!getDisplayNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(7, displayName_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.MetricDescriptor parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.MetricDescriptor 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.MetricDescriptor parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.MetricDescriptor parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.MetricDescriptor parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.MetricDescriptor parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.MetricDescriptor parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.MetricDescriptor parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.MetricDescriptor parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.MetricDescriptor 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.MetricDescriptor 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.MetricDescriptor} - * - *
-   * A description of a type of metric.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.MetricDescriptor) - com.google.api.MetricDescriptorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.MetricProto.internal_static_google_api_MetricDescriptor_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.MetricProto.internal_static_google_api_MetricDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.MetricDescriptor.class, com.google.api.MetricDescriptor.Builder.class); - } - - // Construct using com.google.api.MetricDescriptor.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getLabelsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - if (labelsBuilder_ == null) { - labels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - labelsBuilder_.clear(); - } - metricKind_ = 0; - - valueType_ = 0; - - unit_ = ""; - - description_ = ""; - - displayName_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.MetricProto.internal_static_google_api_MetricDescriptor_descriptor; - } - - public com.google.api.MetricDescriptor getDefaultInstanceForType() { - return com.google.api.MetricDescriptor.getDefaultInstance(); - } - - public com.google.api.MetricDescriptor build() { - com.google.api.MetricDescriptor result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.MetricDescriptor buildPartial() { - com.google.api.MetricDescriptor result = new com.google.api.MetricDescriptor(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.name_ = name_; - if (labelsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - labels_ = java.util.Collections.unmodifiableList(labels_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.labels_ = labels_; - } else { - result.labels_ = labelsBuilder_.build(); - } - result.metricKind_ = metricKind_; - result.valueType_ = valueType_; - result.unit_ = unit_; - result.description_ = description_; - result.displayName_ = displayName_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.MetricDescriptor) { - return mergeFrom((com.google.api.MetricDescriptor)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.MetricDescriptor other) { - if (other == com.google.api.MetricDescriptor.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (labelsBuilder_ == null) { - if (!other.labels_.isEmpty()) { - if (labels_.isEmpty()) { - labels_ = other.labels_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureLabelsIsMutable(); - labels_.addAll(other.labels_); - } - onChanged(); - } - } else { - if (!other.labels_.isEmpty()) { - if (labelsBuilder_.isEmpty()) { - labelsBuilder_.dispose(); - labelsBuilder_ = null; - labels_ = other.labels_; - bitField0_ = (bitField0_ & ~0x00000002); - labelsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getLabelsFieldBuilder() : null; - } else { - labelsBuilder_.addAllMessages(other.labels_); - } - } - } - if (other.metricKind_ != 0) { - setMetricKindValue(other.getMetricKindValue()); - } - if (other.valueType_ != 0) { - setValueTypeValue(other.getValueTypeValue()); - } - if (!other.getUnit().isEmpty()) { - unit_ = other.unit_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - 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.MetricDescriptor parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.MetricDescriptor) 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 metric type, including a domain prefix, such as
-     * `"compute.googleapis.com/instance/cpu/utilization"`.  Metric type names
-     * should use a natural hierarchical grouping such as the following:
-     *     compute.googleapis.com/instance/cpu/utilization
-     *     compute.googleapis.com/instance/disk/read_ops_count
-     *     compute.googleapis.com/instance/network/received_bytes_count
-     * Note that if the metric name changes, the monitoring data will be
-     * discontinued, and anything depends on it will break, such as monitoring
-     * dashborads, alerting rules and quota limits. Therefore, once a metric has
-     * been published, its name should be immutable. You can use the display_name
-     * field to provide a user-friendly name for the metric.
-     * 
- */ - 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 metric type, including a domain prefix, such as
-     * `"compute.googleapis.com/instance/cpu/utilization"`.  Metric type names
-     * should use a natural hierarchical grouping such as the following:
-     *     compute.googleapis.com/instance/cpu/utilization
-     *     compute.googleapis.com/instance/disk/read_ops_count
-     *     compute.googleapis.com/instance/network/received_bytes_count
-     * Note that if the metric name changes, the monitoring data will be
-     * discontinued, and anything depends on it will break, such as monitoring
-     * dashborads, alerting rules and quota limits. Therefore, once a metric has
-     * been published, its name should be immutable. You can use the display_name
-     * field to provide a user-friendly name for the metric.
-     * 
- */ - 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 metric type, including a domain prefix, such as
-     * `"compute.googleapis.com/instance/cpu/utilization"`.  Metric type names
-     * should use a natural hierarchical grouping such as the following:
-     *     compute.googleapis.com/instance/cpu/utilization
-     *     compute.googleapis.com/instance/disk/read_ops_count
-     *     compute.googleapis.com/instance/network/received_bytes_count
-     * Note that if the metric name changes, the monitoring data will be
-     * discontinued, and anything depends on it will break, such as monitoring
-     * dashborads, alerting rules and quota limits. Therefore, once a metric has
-     * been published, its name should be immutable. You can use the display_name
-     * field to provide a user-friendly name for the metric.
-     * 
- */ - 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 metric type, including a domain prefix, such as
-     * `"compute.googleapis.com/instance/cpu/utilization"`.  Metric type names
-     * should use a natural hierarchical grouping such as the following:
-     *     compute.googleapis.com/instance/cpu/utilization
-     *     compute.googleapis.com/instance/disk/read_ops_count
-     *     compute.googleapis.com/instance/network/received_bytes_count
-     * Note that if the metric name changes, the monitoring data will be
-     * discontinued, and anything depends on it will break, such as monitoring
-     * dashborads, alerting rules and quota limits. Therefore, once a metric has
-     * been published, its name should be immutable. You can use the display_name
-     * field to provide a user-friendly name for the metric.
-     * 
- */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The name of the metric type, including a domain prefix, such as
-     * `"compute.googleapis.com/instance/cpu/utilization"`.  Metric type names
-     * should use a natural hierarchical grouping such as the following:
-     *     compute.googleapis.com/instance/cpu/utilization
-     *     compute.googleapis.com/instance/disk/read_ops_count
-     *     compute.googleapis.com/instance/network/received_bytes_count
-     * Note that if the metric name changes, the monitoring data will be
-     * discontinued, and anything depends on it will break, such as monitoring
-     * dashborads, alerting rules and quota limits. Therefore, once a metric has
-     * been published, its name should be immutable. You can use the display_name
-     * field to provide a user-friendly name for the metric.
-     * 
- */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.util.List labels_ = - java.util.Collections.emptyList(); - private void ensureLabelsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - labels_ = new java.util.ArrayList(labels_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.LabelDescriptor, com.google.api.LabelDescriptor.Builder, com.google.api.LabelDescriptorOrBuilder> labelsBuilder_; - - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that can be used to describe a specific instance of this
-     * metric type. For example, the
-     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-     * has a label, `loadbalanced`, that specifies whether the traffic was
-     * received through a load balanced IP address.
-     * 
- */ - public java.util.List getLabelsList() { - if (labelsBuilder_ == null) { - return java.util.Collections.unmodifiableList(labels_); - } else { - return labelsBuilder_.getMessageList(); - } - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that can be used to describe a specific instance of this
-     * metric type. For example, the
-     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-     * has a label, `loadbalanced`, that specifies whether the traffic was
-     * received through a load balanced IP address.
-     * 
- */ - public int getLabelsCount() { - if (labelsBuilder_ == null) { - return labels_.size(); - } else { - return labelsBuilder_.getCount(); - } - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that can be used to describe a specific instance of this
-     * metric type. For example, the
-     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-     * has a label, `loadbalanced`, that specifies whether the traffic was
-     * received through a load balanced IP address.
-     * 
- */ - public com.google.api.LabelDescriptor getLabels(int index) { - if (labelsBuilder_ == null) { - return labels_.get(index); - } else { - return labelsBuilder_.getMessage(index); - } - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that can be used to describe a specific instance of this
-     * metric type. For example, the
-     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-     * has a label, `loadbalanced`, that specifies whether the traffic was
-     * received through a load balanced IP address.
-     * 
- */ - public Builder setLabels( - int index, com.google.api.LabelDescriptor value) { - if (labelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelsIsMutable(); - labels_.set(index, value); - onChanged(); - } else { - labelsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that can be used to describe a specific instance of this
-     * metric type. For example, the
-     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-     * has a label, `loadbalanced`, that specifies whether the traffic was
-     * received through a load balanced IP address.
-     * 
- */ - public Builder setLabels( - int index, com.google.api.LabelDescriptor.Builder builderForValue) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - labels_.set(index, builderForValue.build()); - onChanged(); - } else { - labelsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that can be used to describe a specific instance of this
-     * metric type. For example, the
-     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-     * has a label, `loadbalanced`, that specifies whether the traffic was
-     * received through a load balanced IP address.
-     * 
- */ - public Builder addLabels(com.google.api.LabelDescriptor value) { - if (labelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelsIsMutable(); - labels_.add(value); - onChanged(); - } else { - labelsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that can be used to describe a specific instance of this
-     * metric type. For example, the
-     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-     * has a label, `loadbalanced`, that specifies whether the traffic was
-     * received through a load balanced IP address.
-     * 
- */ - public Builder addLabels( - int index, com.google.api.LabelDescriptor value) { - if (labelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelsIsMutable(); - labels_.add(index, value); - onChanged(); - } else { - labelsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that can be used to describe a specific instance of this
-     * metric type. For example, the
-     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-     * has a label, `loadbalanced`, that specifies whether the traffic was
-     * received through a load balanced IP address.
-     * 
- */ - public Builder addLabels( - com.google.api.LabelDescriptor.Builder builderForValue) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - labels_.add(builderForValue.build()); - onChanged(); - } else { - labelsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that can be used to describe a specific instance of this
-     * metric type. For example, the
-     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-     * has a label, `loadbalanced`, that specifies whether the traffic was
-     * received through a load balanced IP address.
-     * 
- */ - public Builder addLabels( - int index, com.google.api.LabelDescriptor.Builder builderForValue) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - labels_.add(index, builderForValue.build()); - onChanged(); - } else { - labelsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that can be used to describe a specific instance of this
-     * metric type. For example, the
-     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-     * has a label, `loadbalanced`, that specifies whether the traffic was
-     * received through a load balanced IP address.
-     * 
- */ - public Builder addAllLabels( - java.lang.Iterable values) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, labels_); - onChanged(); - } else { - labelsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that can be used to describe a specific instance of this
-     * metric type. For example, the
-     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-     * has a label, `loadbalanced`, that specifies whether the traffic was
-     * received through a load balanced IP address.
-     * 
- */ - public Builder clearLabels() { - if (labelsBuilder_ == null) { - labels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - labelsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that can be used to describe a specific instance of this
-     * metric type. For example, the
-     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-     * has a label, `loadbalanced`, that specifies whether the traffic was
-     * received through a load balanced IP address.
-     * 
- */ - public Builder removeLabels(int index) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - labels_.remove(index); - onChanged(); - } else { - labelsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that can be used to describe a specific instance of this
-     * metric type. For example, the
-     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-     * has a label, `loadbalanced`, that specifies whether the traffic was
-     * received through a load balanced IP address.
-     * 
- */ - public com.google.api.LabelDescriptor.Builder getLabelsBuilder( - int index) { - return getLabelsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that can be used to describe a specific instance of this
-     * metric type. For example, the
-     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-     * has a label, `loadbalanced`, that specifies whether the traffic was
-     * received through a load balanced IP address.
-     * 
- */ - public com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder( - int index) { - if (labelsBuilder_ == null) { - return labels_.get(index); } else { - return labelsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that can be used to describe a specific instance of this
-     * metric type. For example, the
-     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-     * has a label, `loadbalanced`, that specifies whether the traffic was
-     * received through a load balanced IP address.
-     * 
- */ - public java.util.List - getLabelsOrBuilderList() { - if (labelsBuilder_ != null) { - return labelsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(labels_); - } - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that can be used to describe a specific instance of this
-     * metric type. For example, the
-     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-     * has a label, `loadbalanced`, that specifies whether the traffic was
-     * received through a load balanced IP address.
-     * 
- */ - public com.google.api.LabelDescriptor.Builder addLabelsBuilder() { - return getLabelsFieldBuilder().addBuilder( - com.google.api.LabelDescriptor.getDefaultInstance()); - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that can be used to describe a specific instance of this
-     * metric type. For example, the
-     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-     * has a label, `loadbalanced`, that specifies whether the traffic was
-     * received through a load balanced IP address.
-     * 
- */ - public com.google.api.LabelDescriptor.Builder addLabelsBuilder( - int index) { - return getLabelsFieldBuilder().addBuilder( - index, com.google.api.LabelDescriptor.getDefaultInstance()); - } - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-     * The set of labels that can be used to describe a specific instance of this
-     * metric type. For example, the
-     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-     * has a label, `loadbalanced`, that specifies whether the traffic was
-     * received through a load balanced IP address.
-     * 
- */ - public java.util.List - getLabelsBuilderList() { - return getLabelsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.LabelDescriptor, com.google.api.LabelDescriptor.Builder, com.google.api.LabelDescriptorOrBuilder> - getLabelsFieldBuilder() { - if (labelsBuilder_ == null) { - labelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.api.LabelDescriptor, com.google.api.LabelDescriptor.Builder, com.google.api.LabelDescriptorOrBuilder>( - labels_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - labels_ = null; - } - return labelsBuilder_; - } - - private int metricKind_ = 0; - /** - * optional .google.api.MetricDescriptor.MetricKind metric_kind = 3; - * - *
-     * Whether the metric records instantaneous values, changes to a value, etc.
-     * 
- */ - public int getMetricKindValue() { - return metricKind_; - } - /** - * optional .google.api.MetricDescriptor.MetricKind metric_kind = 3; - * - *
-     * Whether the metric records instantaneous values, changes to a value, etc.
-     * 
- */ - public Builder setMetricKindValue(int value) { - metricKind_ = value; - onChanged(); - return this; - } - /** - * optional .google.api.MetricDescriptor.MetricKind metric_kind = 3; - * - *
-     * Whether the metric records instantaneous values, changes to a value, etc.
-     * 
- */ - public com.google.api.MetricDescriptor.MetricKind getMetricKind() { - com.google.api.MetricDescriptor.MetricKind result = com.google.api.MetricDescriptor.MetricKind.valueOf(metricKind_); - return result == null ? com.google.api.MetricDescriptor.MetricKind.UNRECOGNIZED : result; - } - /** - * optional .google.api.MetricDescriptor.MetricKind metric_kind = 3; - * - *
-     * Whether the metric records instantaneous values, changes to a value, etc.
-     * 
- */ - public Builder setMetricKind(com.google.api.MetricDescriptor.MetricKind value) { - if (value == null) { - throw new NullPointerException(); - } - - metricKind_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .google.api.MetricDescriptor.MetricKind metric_kind = 3; - * - *
-     * Whether the metric records instantaneous values, changes to a value, etc.
-     * 
- */ - public Builder clearMetricKind() { - - metricKind_ = 0; - onChanged(); - return this; - } - - private int valueType_ = 0; - /** - * optional .google.api.MetricDescriptor.ValueType value_type = 4; - * - *
-     * Whether the measurement is an integer, a floating-point number, etc.
-     * 
- */ - public int getValueTypeValue() { - return valueType_; - } - /** - * optional .google.api.MetricDescriptor.ValueType value_type = 4; - * - *
-     * Whether the measurement is an integer, a floating-point number, etc.
-     * 
- */ - public Builder setValueTypeValue(int value) { - valueType_ = value; - onChanged(); - return this; - } - /** - * optional .google.api.MetricDescriptor.ValueType value_type = 4; - * - *
-     * Whether the measurement is an integer, a floating-point number, etc.
-     * 
- */ - public com.google.api.MetricDescriptor.ValueType getValueType() { - com.google.api.MetricDescriptor.ValueType result = com.google.api.MetricDescriptor.ValueType.valueOf(valueType_); - return result == null ? com.google.api.MetricDescriptor.ValueType.UNRECOGNIZED : result; - } - /** - * optional .google.api.MetricDescriptor.ValueType value_type = 4; - * - *
-     * Whether the measurement is an integer, a floating-point number, etc.
-     * 
- */ - public Builder setValueType(com.google.api.MetricDescriptor.ValueType value) { - if (value == null) { - throw new NullPointerException(); - } - - valueType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .google.api.MetricDescriptor.ValueType value_type = 4; - * - *
-     * Whether the measurement is an integer, a floating-point number, etc.
-     * 
- */ - public Builder clearValueType() { - - valueType_ = 0; - onChanged(); - return this; - } - - private java.lang.Object unit_ = ""; - /** - * optional string unit = 5; - * - *
-     * The unit in which the metric value is reported. It is only applicable
-     * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
-     * supported units are a subset of [The Unified Code for Units of
-     * Measure](http://unitsofmeasure.org/ucum.html) standard:
-     * **Basic units (UNIT)**
-     * * `bit`   bit
-     * * `By`    byte
-     * * `s`     second
-     * * `min`   minute
-     * * `h`     hour
-     * * `d`     day
-     * **Prefixes (PREFIX)**
-     * * `k`     kilo    (10**3)
-     * * `M`     mega    (10**6)
-     * * `G`     giga    (10**9)
-     * * `T`     tera    (10**12)
-     * * `P`     peta    (10**15)
-     * * `E`     exa     (10**18)
-     * * `Z`     zetta   (10**21)
-     * * `Y`     yotta   (10**24)
-     * * `m`     milli   (10**-3)
-     * * `u`     micro   (10**-6)
-     * * `n`     nano    (10**-9)
-     * * `p`     pico    (10**-12)
-     * * `f`     femto   (10**-15)
-     * * `a`     atto    (10**-18)
-     * * `z`     zepto   (10**-21)
-     * * `y`     yocto   (10**-24)
-     * * `Ki`    kibi    (2**10)
-     * * `Mi`    mebi    (2**20)
-     * * `Gi`    gibi    (2**30)
-     * * `Ti`    tebi    (2**40)
-     * **Grammar**
-     * The grammar includes the dimensionless unit `1`, such as `1/s`.
-     * The grammar also includes these connectors:
-     * * `/`    division (as an infix operator, e.g. `1/s`).
-     * * `.`    multiplication (as an infix operator, e.g. `GBy.d`)
-     * The grammar for a unit is as follows:
-     *     Expression = Component { "." Component } { "/" Component } ;
-     *     Component = [ PREFIX ] UNIT [ Annotation ]
-     *               | Annotation
-     *               | "1"
-     *               ;
-     *     Annotation = "{" NAME "}" ;
-     * Notes:
-     * * `Annotation` is just a comment if it follows a `UNIT` and is
-     *    equivalent to `1` if it is used alone. For examples,
-     *    `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
-     * * `NAME` is a sequence of non-blank printable ASCII characters not
-     *    containing '{' or '}'.
-     * 
- */ - public java.lang.String getUnit() { - java.lang.Object ref = unit_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - unit_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string unit = 5; - * - *
-     * The unit in which the metric value is reported. It is only applicable
-     * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
-     * supported units are a subset of [The Unified Code for Units of
-     * Measure](http://unitsofmeasure.org/ucum.html) standard:
-     * **Basic units (UNIT)**
-     * * `bit`   bit
-     * * `By`    byte
-     * * `s`     second
-     * * `min`   minute
-     * * `h`     hour
-     * * `d`     day
-     * **Prefixes (PREFIX)**
-     * * `k`     kilo    (10**3)
-     * * `M`     mega    (10**6)
-     * * `G`     giga    (10**9)
-     * * `T`     tera    (10**12)
-     * * `P`     peta    (10**15)
-     * * `E`     exa     (10**18)
-     * * `Z`     zetta   (10**21)
-     * * `Y`     yotta   (10**24)
-     * * `m`     milli   (10**-3)
-     * * `u`     micro   (10**-6)
-     * * `n`     nano    (10**-9)
-     * * `p`     pico    (10**-12)
-     * * `f`     femto   (10**-15)
-     * * `a`     atto    (10**-18)
-     * * `z`     zepto   (10**-21)
-     * * `y`     yocto   (10**-24)
-     * * `Ki`    kibi    (2**10)
-     * * `Mi`    mebi    (2**20)
-     * * `Gi`    gibi    (2**30)
-     * * `Ti`    tebi    (2**40)
-     * **Grammar**
-     * The grammar includes the dimensionless unit `1`, such as `1/s`.
-     * The grammar also includes these connectors:
-     * * `/`    division (as an infix operator, e.g. `1/s`).
-     * * `.`    multiplication (as an infix operator, e.g. `GBy.d`)
-     * The grammar for a unit is as follows:
-     *     Expression = Component { "." Component } { "/" Component } ;
-     *     Component = [ PREFIX ] UNIT [ Annotation ]
-     *               | Annotation
-     *               | "1"
-     *               ;
-     *     Annotation = "{" NAME "}" ;
-     * Notes:
-     * * `Annotation` is just a comment if it follows a `UNIT` and is
-     *    equivalent to `1` if it is used alone. For examples,
-     *    `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
-     * * `NAME` is a sequence of non-blank printable ASCII characters not
-     *    containing '{' or '}'.
-     * 
- */ - public com.google.protobuf.ByteString - getUnitBytes() { - java.lang.Object ref = unit_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - unit_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string unit = 5; - * - *
-     * The unit in which the metric value is reported. It is only applicable
-     * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
-     * supported units are a subset of [The Unified Code for Units of
-     * Measure](http://unitsofmeasure.org/ucum.html) standard:
-     * **Basic units (UNIT)**
-     * * `bit`   bit
-     * * `By`    byte
-     * * `s`     second
-     * * `min`   minute
-     * * `h`     hour
-     * * `d`     day
-     * **Prefixes (PREFIX)**
-     * * `k`     kilo    (10**3)
-     * * `M`     mega    (10**6)
-     * * `G`     giga    (10**9)
-     * * `T`     tera    (10**12)
-     * * `P`     peta    (10**15)
-     * * `E`     exa     (10**18)
-     * * `Z`     zetta   (10**21)
-     * * `Y`     yotta   (10**24)
-     * * `m`     milli   (10**-3)
-     * * `u`     micro   (10**-6)
-     * * `n`     nano    (10**-9)
-     * * `p`     pico    (10**-12)
-     * * `f`     femto   (10**-15)
-     * * `a`     atto    (10**-18)
-     * * `z`     zepto   (10**-21)
-     * * `y`     yocto   (10**-24)
-     * * `Ki`    kibi    (2**10)
-     * * `Mi`    mebi    (2**20)
-     * * `Gi`    gibi    (2**30)
-     * * `Ti`    tebi    (2**40)
-     * **Grammar**
-     * The grammar includes the dimensionless unit `1`, such as `1/s`.
-     * The grammar also includes these connectors:
-     * * `/`    division (as an infix operator, e.g. `1/s`).
-     * * `.`    multiplication (as an infix operator, e.g. `GBy.d`)
-     * The grammar for a unit is as follows:
-     *     Expression = Component { "." Component } { "/" Component } ;
-     *     Component = [ PREFIX ] UNIT [ Annotation ]
-     *               | Annotation
-     *               | "1"
-     *               ;
-     *     Annotation = "{" NAME "}" ;
-     * Notes:
-     * * `Annotation` is just a comment if it follows a `UNIT` and is
-     *    equivalent to `1` if it is used alone. For examples,
-     *    `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
-     * * `NAME` is a sequence of non-blank printable ASCII characters not
-     *    containing '{' or '}'.
-     * 
- */ - public Builder setUnit( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - unit_ = value; - onChanged(); - return this; - } - /** - * optional string unit = 5; - * - *
-     * The unit in which the metric value is reported. It is only applicable
-     * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
-     * supported units are a subset of [The Unified Code for Units of
-     * Measure](http://unitsofmeasure.org/ucum.html) standard:
-     * **Basic units (UNIT)**
-     * * `bit`   bit
-     * * `By`    byte
-     * * `s`     second
-     * * `min`   minute
-     * * `h`     hour
-     * * `d`     day
-     * **Prefixes (PREFIX)**
-     * * `k`     kilo    (10**3)
-     * * `M`     mega    (10**6)
-     * * `G`     giga    (10**9)
-     * * `T`     tera    (10**12)
-     * * `P`     peta    (10**15)
-     * * `E`     exa     (10**18)
-     * * `Z`     zetta   (10**21)
-     * * `Y`     yotta   (10**24)
-     * * `m`     milli   (10**-3)
-     * * `u`     micro   (10**-6)
-     * * `n`     nano    (10**-9)
-     * * `p`     pico    (10**-12)
-     * * `f`     femto   (10**-15)
-     * * `a`     atto    (10**-18)
-     * * `z`     zepto   (10**-21)
-     * * `y`     yocto   (10**-24)
-     * * `Ki`    kibi    (2**10)
-     * * `Mi`    mebi    (2**20)
-     * * `Gi`    gibi    (2**30)
-     * * `Ti`    tebi    (2**40)
-     * **Grammar**
-     * The grammar includes the dimensionless unit `1`, such as `1/s`.
-     * The grammar also includes these connectors:
-     * * `/`    division (as an infix operator, e.g. `1/s`).
-     * * `.`    multiplication (as an infix operator, e.g. `GBy.d`)
-     * The grammar for a unit is as follows:
-     *     Expression = Component { "." Component } { "/" Component } ;
-     *     Component = [ PREFIX ] UNIT [ Annotation ]
-     *               | Annotation
-     *               | "1"
-     *               ;
-     *     Annotation = "{" NAME "}" ;
-     * Notes:
-     * * `Annotation` is just a comment if it follows a `UNIT` and is
-     *    equivalent to `1` if it is used alone. For examples,
-     *    `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
-     * * `NAME` is a sequence of non-blank printable ASCII characters not
-     *    containing '{' or '}'.
-     * 
- */ - public Builder clearUnit() { - - unit_ = getDefaultInstance().getUnit(); - onChanged(); - return this; - } - /** - * optional string unit = 5; - * - *
-     * The unit in which the metric value is reported. It is only applicable
-     * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
-     * supported units are a subset of [The Unified Code for Units of
-     * Measure](http://unitsofmeasure.org/ucum.html) standard:
-     * **Basic units (UNIT)**
-     * * `bit`   bit
-     * * `By`    byte
-     * * `s`     second
-     * * `min`   minute
-     * * `h`     hour
-     * * `d`     day
-     * **Prefixes (PREFIX)**
-     * * `k`     kilo    (10**3)
-     * * `M`     mega    (10**6)
-     * * `G`     giga    (10**9)
-     * * `T`     tera    (10**12)
-     * * `P`     peta    (10**15)
-     * * `E`     exa     (10**18)
-     * * `Z`     zetta   (10**21)
-     * * `Y`     yotta   (10**24)
-     * * `m`     milli   (10**-3)
-     * * `u`     micro   (10**-6)
-     * * `n`     nano    (10**-9)
-     * * `p`     pico    (10**-12)
-     * * `f`     femto   (10**-15)
-     * * `a`     atto    (10**-18)
-     * * `z`     zepto   (10**-21)
-     * * `y`     yocto   (10**-24)
-     * * `Ki`    kibi    (2**10)
-     * * `Mi`    mebi    (2**20)
-     * * `Gi`    gibi    (2**30)
-     * * `Ti`    tebi    (2**40)
-     * **Grammar**
-     * The grammar includes the dimensionless unit `1`, such as `1/s`.
-     * The grammar also includes these connectors:
-     * * `/`    division (as an infix operator, e.g. `1/s`).
-     * * `.`    multiplication (as an infix operator, e.g. `GBy.d`)
-     * The grammar for a unit is as follows:
-     *     Expression = Component { "." Component } { "/" Component } ;
-     *     Component = [ PREFIX ] UNIT [ Annotation ]
-     *               | Annotation
-     *               | "1"
-     *               ;
-     *     Annotation = "{" NAME "}" ;
-     * Notes:
-     * * `Annotation` is just a comment if it follows a `UNIT` and is
-     *    equivalent to `1` if it is used alone. For examples,
-     *    `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
-     * * `NAME` is a sequence of non-blank printable ASCII characters not
-     *    containing '{' or '}'.
-     * 
- */ - public Builder setUnitBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - unit_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * optional string description = 6; - * - *
-     * A detailed description of the monitored resource type, which is used in
-     * documentation.
-     * 
- */ - 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 = 6; - * - *
-     * A detailed description of the monitored resource type, which is used in
-     * documentation.
-     * 
- */ - 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 = 6; - * - *
-     * A detailed description of the monitored resource type, which is used in
-     * documentation.
-     * 
- */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * optional string description = 6; - * - *
-     * A detailed description of the monitored resource type, which is used in
-     * documentation.
-     * 
- */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * optional string description = 6; - * - *
-     * A detailed description of the monitored resource type, which is used in
-     * documentation.
-     * 
- */ - 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 displayName_ = ""; - /** - * optional string display_name = 7; - * - *
-     * A concise name for the monitored resource type, which is displayed in user
-     * interfaces.
-     * 
- */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string display_name = 7; - * - *
-     * A concise name for the monitored resource type, which is displayed in user
-     * interfaces.
-     * 
- */ - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string display_name = 7; - * - *
-     * A concise name for the monitored resource type, which is displayed in user
-     * interfaces.
-     * 
- */ - public Builder setDisplayName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - displayName_ = value; - onChanged(); - return this; - } - /** - * optional string display_name = 7; - * - *
-     * A concise name for the monitored resource type, which is displayed in user
-     * interfaces.
-     * 
- */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - * optional string display_name = 7; - * - *
-     * A concise name for the monitored resource type, which is displayed in user
-     * interfaces.
-     * 
- */ - public Builder setDisplayNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - displayName_ = 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.MetricDescriptor) - } - - // @@protoc_insertion_point(class_scope:google.api.MetricDescriptor) - private static final com.google.api.MetricDescriptor DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.MetricDescriptor(); - } - - public static com.google.api.MetricDescriptor getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public MetricDescriptor parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new MetricDescriptor(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.MetricDescriptor getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MetricDescriptorOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MetricDescriptorOrBuilder.java deleted file mode 100644 index c686cb16c35d..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/MetricDescriptorOrBuilder.java +++ /dev/null @@ -1,301 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/metric.proto - -package com.google.api; - -public interface MetricDescriptorOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.MetricDescriptor) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string name = 1; - * - *
-   * The name of the metric type, including a domain prefix, such as
-   * `"compute.googleapis.com/instance/cpu/utilization"`.  Metric type names
-   * should use a natural hierarchical grouping such as the following:
-   *     compute.googleapis.com/instance/cpu/utilization
-   *     compute.googleapis.com/instance/disk/read_ops_count
-   *     compute.googleapis.com/instance/network/received_bytes_count
-   * Note that if the metric name changes, the monitoring data will be
-   * discontinued, and anything depends on it will break, such as monitoring
-   * dashborads, alerting rules and quota limits. Therefore, once a metric has
-   * been published, its name should be immutable. You can use the display_name
-   * field to provide a user-friendly name for the metric.
-   * 
- */ - java.lang.String getName(); - /** - * optional string name = 1; - * - *
-   * The name of the metric type, including a domain prefix, such as
-   * `"compute.googleapis.com/instance/cpu/utilization"`.  Metric type names
-   * should use a natural hierarchical grouping such as the following:
-   *     compute.googleapis.com/instance/cpu/utilization
-   *     compute.googleapis.com/instance/disk/read_ops_count
-   *     compute.googleapis.com/instance/network/received_bytes_count
-   * Note that if the metric name changes, the monitoring data will be
-   * discontinued, and anything depends on it will break, such as monitoring
-   * dashborads, alerting rules and quota limits. Therefore, once a metric has
-   * been published, its name should be immutable. You can use the display_name
-   * field to provide a user-friendly name for the metric.
-   * 
- */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-   * The set of labels that can be used to describe a specific instance of this
-   * metric type. For example, the
-   * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-   * has a label, `loadbalanced`, that specifies whether the traffic was
-   * received through a load balanced IP address.
-   * 
- */ - java.util.List - getLabelsList(); - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-   * The set of labels that can be used to describe a specific instance of this
-   * metric type. For example, the
-   * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-   * has a label, `loadbalanced`, that specifies whether the traffic was
-   * received through a load balanced IP address.
-   * 
- */ - com.google.api.LabelDescriptor getLabels(int index); - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-   * The set of labels that can be used to describe a specific instance of this
-   * metric type. For example, the
-   * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-   * has a label, `loadbalanced`, that specifies whether the traffic was
-   * received through a load balanced IP address.
-   * 
- */ - int getLabelsCount(); - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-   * The set of labels that can be used to describe a specific instance of this
-   * metric type. For example, the
-   * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-   * has a label, `loadbalanced`, that specifies whether the traffic was
-   * received through a load balanced IP address.
-   * 
- */ - java.util.List - getLabelsOrBuilderList(); - /** - * repeated .google.api.LabelDescriptor labels = 2; - * - *
-   * The set of labels that can be used to describe a specific instance of this
-   * metric type. For example, the
-   * `compute.googleapis.com/instance/network/received_bytes_count` metric type
-   * has a label, `loadbalanced`, that specifies whether the traffic was
-   * received through a load balanced IP address.
-   * 
- */ - com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder( - int index); - - /** - * optional .google.api.MetricDescriptor.MetricKind metric_kind = 3; - * - *
-   * Whether the metric records instantaneous values, changes to a value, etc.
-   * 
- */ - int getMetricKindValue(); - /** - * optional .google.api.MetricDescriptor.MetricKind metric_kind = 3; - * - *
-   * Whether the metric records instantaneous values, changes to a value, etc.
-   * 
- */ - com.google.api.MetricDescriptor.MetricKind getMetricKind(); - - /** - * optional .google.api.MetricDescriptor.ValueType value_type = 4; - * - *
-   * Whether the measurement is an integer, a floating-point number, etc.
-   * 
- */ - int getValueTypeValue(); - /** - * optional .google.api.MetricDescriptor.ValueType value_type = 4; - * - *
-   * Whether the measurement is an integer, a floating-point number, etc.
-   * 
- */ - com.google.api.MetricDescriptor.ValueType getValueType(); - - /** - * optional string unit = 5; - * - *
-   * The unit in which the metric value is reported. It is only applicable
-   * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
-   * supported units are a subset of [The Unified Code for Units of
-   * Measure](http://unitsofmeasure.org/ucum.html) standard:
-   * **Basic units (UNIT)**
-   * * `bit`   bit
-   * * `By`    byte
-   * * `s`     second
-   * * `min`   minute
-   * * `h`     hour
-   * * `d`     day
-   * **Prefixes (PREFIX)**
-   * * `k`     kilo    (10**3)
-   * * `M`     mega    (10**6)
-   * * `G`     giga    (10**9)
-   * * `T`     tera    (10**12)
-   * * `P`     peta    (10**15)
-   * * `E`     exa     (10**18)
-   * * `Z`     zetta   (10**21)
-   * * `Y`     yotta   (10**24)
-   * * `m`     milli   (10**-3)
-   * * `u`     micro   (10**-6)
-   * * `n`     nano    (10**-9)
-   * * `p`     pico    (10**-12)
-   * * `f`     femto   (10**-15)
-   * * `a`     atto    (10**-18)
-   * * `z`     zepto   (10**-21)
-   * * `y`     yocto   (10**-24)
-   * * `Ki`    kibi    (2**10)
-   * * `Mi`    mebi    (2**20)
-   * * `Gi`    gibi    (2**30)
-   * * `Ti`    tebi    (2**40)
-   * **Grammar**
-   * The grammar includes the dimensionless unit `1`, such as `1/s`.
-   * The grammar also includes these connectors:
-   * * `/`    division (as an infix operator, e.g. `1/s`).
-   * * `.`    multiplication (as an infix operator, e.g. `GBy.d`)
-   * The grammar for a unit is as follows:
-   *     Expression = Component { "." Component } { "/" Component } ;
-   *     Component = [ PREFIX ] UNIT [ Annotation ]
-   *               | Annotation
-   *               | "1"
-   *               ;
-   *     Annotation = "{" NAME "}" ;
-   * Notes:
-   * * `Annotation` is just a comment if it follows a `UNIT` and is
-   *    equivalent to `1` if it is used alone. For examples,
-   *    `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
-   * * `NAME` is a sequence of non-blank printable ASCII characters not
-   *    containing '{' or '}'.
-   * 
- */ - java.lang.String getUnit(); - /** - * optional string unit = 5; - * - *
-   * The unit in which the metric value is reported. It is only applicable
-   * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
-   * supported units are a subset of [The Unified Code for Units of
-   * Measure](http://unitsofmeasure.org/ucum.html) standard:
-   * **Basic units (UNIT)**
-   * * `bit`   bit
-   * * `By`    byte
-   * * `s`     second
-   * * `min`   minute
-   * * `h`     hour
-   * * `d`     day
-   * **Prefixes (PREFIX)**
-   * * `k`     kilo    (10**3)
-   * * `M`     mega    (10**6)
-   * * `G`     giga    (10**9)
-   * * `T`     tera    (10**12)
-   * * `P`     peta    (10**15)
-   * * `E`     exa     (10**18)
-   * * `Z`     zetta   (10**21)
-   * * `Y`     yotta   (10**24)
-   * * `m`     milli   (10**-3)
-   * * `u`     micro   (10**-6)
-   * * `n`     nano    (10**-9)
-   * * `p`     pico    (10**-12)
-   * * `f`     femto   (10**-15)
-   * * `a`     atto    (10**-18)
-   * * `z`     zepto   (10**-21)
-   * * `y`     yocto   (10**-24)
-   * * `Ki`    kibi    (2**10)
-   * * `Mi`    mebi    (2**20)
-   * * `Gi`    gibi    (2**30)
-   * * `Ti`    tebi    (2**40)
-   * **Grammar**
-   * The grammar includes the dimensionless unit `1`, such as `1/s`.
-   * The grammar also includes these connectors:
-   * * `/`    division (as an infix operator, e.g. `1/s`).
-   * * `.`    multiplication (as an infix operator, e.g. `GBy.d`)
-   * The grammar for a unit is as follows:
-   *     Expression = Component { "." Component } { "/" Component } ;
-   *     Component = [ PREFIX ] UNIT [ Annotation ]
-   *               | Annotation
-   *               | "1"
-   *               ;
-   *     Annotation = "{" NAME "}" ;
-   * Notes:
-   * * `Annotation` is just a comment if it follows a `UNIT` and is
-   *    equivalent to `1` if it is used alone. For examples,
-   *    `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
-   * * `NAME` is a sequence of non-blank printable ASCII characters not
-   *    containing '{' or '}'.
-   * 
- */ - com.google.protobuf.ByteString - getUnitBytes(); - - /** - * optional string description = 6; - * - *
-   * A detailed description of the monitored resource type, which is used in
-   * documentation.
-   * 
- */ - java.lang.String getDescription(); - /** - * optional string description = 6; - * - *
-   * A detailed description of the monitored resource type, which is used in
-   * documentation.
-   * 
- */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - * optional string display_name = 7; - * - *
-   * A concise name for the monitored resource type, which is displayed in user
-   * interfaces.
-   * 
- */ - java.lang.String getDisplayName(); - /** - * optional string display_name = 7; - * - *
-   * A concise name for the monitored resource type, which is displayed in user
-   * interfaces.
-   * 
- */ - com.google.protobuf.ByteString - getDisplayNameBytes(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MetricProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MetricProto.java deleted file mode 100644 index e6f859aa70d5..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/MetricProto.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/metric.proto - -package com.google.api; - -public final class MetricProto { - private MetricProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_MetricDescriptor_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_MetricDescriptor_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/api/metric.proto\022\ngoogle.api\032\026g" + - "oogle/api/label.proto\"\304\003\n\020MetricDescript" + - "or\022\014\n\004name\030\001 \001(\t\022+\n\006labels\030\002 \003(\0132\033.googl" + - "e.api.LabelDescriptor\022<\n\013metric_kind\030\003 \001" + - "(\0162\'.google.api.MetricDescriptor.MetricK" + - "ind\022:\n\nvalue_type\030\004 \001(\0162&.google.api.Met" + - "ricDescriptor.ValueType\022\014\n\004unit\030\005 \001(\t\022\023\n" + - "\013description\030\006 \001(\t\022\024\n\014display_name\030\007 \001(\t" + - "\"O\n\nMetricKind\022\033\n\027METRIC_KIND_UNSPECIFIE" + - "D\020\000\022\t\n\005GAUGE\020\001\022\t\n\005DELTA\020\002\022\016\n\nCUMULATIVE\020", - "\003\"q\n\tValueType\022\032\n\026VALUE_TYPE_UNSPECIFIED" + - "\020\000\022\010\n\004BOOL\020\001\022\t\n\005INT64\020\002\022\n\n\006DOUBLE\020\003\022\n\n\006S" + - "TRING\020\004\022\020\n\014DISTRIBUTION\020\005\022\t\n\005MONEY\020\006B\037\n\016" + - "com.google.apiB\013MetricProtoP\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.LabelProto.getDescriptor(), - }, assigner); - internal_static_google_api_MetricDescriptor_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_api_MetricDescriptor_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_MetricDescriptor_descriptor, - new java.lang.String[] { "Name", "Labels", "MetricKind", "ValueType", "Unit", "Description", "DisplayName", }); - com.google.api.LabelProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResource.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResource.java deleted file mode 100644 index c30b634b3951..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResource.java +++ /dev/null @@ -1,670 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/monitored_resource.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.MonitoredResource} - * - *
- * A specific monitored resource or a group of monitored resources.
- * 
- */ -public final class MonitoredResource extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.MonitoredResource) - MonitoredResourceOrBuilder { - // Use MonitoredResource.newBuilder() to construct. - private MonitoredResource(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MonitoredResource() { - type_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private MonitoredResource( - 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(); - - type_ = s; - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry - labels = input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels.getKey(), labels.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.api.MonitoredResourceProto.internal_static_google_api_MonitoredResource_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.MonitoredResourceProto.internal_static_google_api_MonitoredResource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.MonitoredResource.class, com.google.api.MonitoredResource.Builder.class); - } - - private int bitField0_; - public static final int TYPE_FIELD_NUMBER = 1; - private volatile java.lang.Object type_; - /** - * optional string type = 1; - * - *
-   * The type of monitored resource. This field must match the value of the
-   * `type` field in a [MonitoredResourceDescriptor][] object.  For example,
-   * `"cloudsql_database"` represents Cloud SQL databases.
-   * 
- */ - public java.lang.String getType() { - java.lang.Object ref = type_; - 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(); - type_ = s; - return s; - } - } - /** - * optional string type = 1; - * - *
-   * The type of monitored resource. This field must match the value of the
-   * `type` field in a [MonitoredResourceDescriptor][] object.  For example,
-   * `"cloudsql_database"` represents Cloud SQL databases.
-   * 
- */ - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LABELS_FIELD_NUMBER = 2; - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.api.MonitoredResourceProto.internal_static_google_api_MonitoredResource_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - /** - * map<string, string> labels = 2; - * - *
-   * Values for some or all of the labels listed in the associated monitored
-   * resource type. For example, specify a specific Cloud SQL database by
-   * supplying values for both the `"database_id"` and `"zone"` labels.  Specify
-   * the set of all Cloud SQL databases in a particular location by supplying a
-   * value for only the `"zone"` label.
-   * 
- */ - - public java.util.Map getLabels() { - return internalGetLabels().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 (!getTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, type_); - } - for (java.util.Map.Entry entry - : internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry - labels = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - output.writeMessage(2, labels); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, type_); - } - for (java.util.Map.Entry entry - : internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry - labels = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, labels); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.MonitoredResource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.MonitoredResource 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.MonitoredResource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.MonitoredResource parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.MonitoredResource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.MonitoredResource parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.MonitoredResource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.MonitoredResource parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.MonitoredResource parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.MonitoredResource 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.MonitoredResource 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.MonitoredResource} - * - *
-   * A specific monitored resource or a group of monitored resources.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.MonitoredResource) - com.google.api.MonitoredResourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.MonitoredResourceProto.internal_static_google_api_MonitoredResource_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 2: - return internalGetMutableLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.MonitoredResourceProto.internal_static_google_api_MonitoredResource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.MonitoredResource.class, com.google.api.MonitoredResource.Builder.class); - } - - // Construct using com.google.api.MonitoredResource.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(); - type_ = ""; - - internalGetMutableLabels().clear(); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.MonitoredResourceProto.internal_static_google_api_MonitoredResource_descriptor; - } - - public com.google.api.MonitoredResource getDefaultInstanceForType() { - return com.google.api.MonitoredResource.getDefaultInstance(); - } - - public com.google.api.MonitoredResource build() { - com.google.api.MonitoredResource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.MonitoredResource buildPartial() { - com.google.api.MonitoredResource result = new com.google.api.MonitoredResource(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.type_ = type_; - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.MonitoredResource) { - return mergeFrom((com.google.api.MonitoredResource)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.MonitoredResource other) { - if (other == com.google.api.MonitoredResource.getDefaultInstance()) return this; - if (!other.getType().isEmpty()) { - type_ = other.type_; - onChanged(); - } - internalGetMutableLabels().mergeFrom( - other.internalGetLabels()); - 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.MonitoredResource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.MonitoredResource) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object type_ = ""; - /** - * optional string type = 1; - * - *
-     * The type of monitored resource. This field must match the value of the
-     * `type` field in a [MonitoredResourceDescriptor][] object.  For example,
-     * `"cloudsql_database"` represents Cloud SQL databases.
-     * 
- */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string type = 1; - * - *
-     * The type of monitored resource. This field must match the value of the
-     * `type` field in a [MonitoredResourceDescriptor][] object.  For example,
-     * `"cloudsql_database"` represents Cloud SQL databases.
-     * 
- */ - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string type = 1; - * - *
-     * The type of monitored resource. This field must match the value of the
-     * `type` field in a [MonitoredResourceDescriptor][] object.  For example,
-     * `"cloudsql_database"` represents Cloud SQL databases.
-     * 
- */ - public Builder setType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value; - onChanged(); - return this; - } - /** - * optional string type = 1; - * - *
-     * The type of monitored resource. This field must match the value of the
-     * `type` field in a [MonitoredResourceDescriptor][] object.  For example,
-     * `"cloudsql_database"` represents Cloud SQL databases.
-     * 
- */ - public Builder clearType() { - - type_ = getDefaultInstance().getType(); - onChanged(); - return this; - } - /** - * optional string type = 1; - * - *
-     * The type of monitored resource. This field must match the value of the
-     * `type` field in a [MonitoredResourceDescriptor][] object.  For example,
-     * `"cloudsql_database"` represents Cloud SQL databases.
-     * 
- */ - public Builder setTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - type_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - private com.google.protobuf.MapField - internalGetMutableLabels() { - onChanged();; - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - return labels_; - } - /** - * map<string, string> labels = 2; - * - *
-     * Values for some or all of the labels listed in the associated monitored
-     * resource type. For example, specify a specific Cloud SQL database by
-     * supplying values for both the `"database_id"` and `"zone"` labels.  Specify
-     * the set of all Cloud SQL databases in a particular location by supplying a
-     * value for only the `"zone"` label.
-     * 
- */ - public java.util.Map getLabels() { - return internalGetLabels().getMap(); - } - /** - * map<string, string> labels = 2; - * - *
-     * Values for some or all of the labels listed in the associated monitored
-     * resource type. For example, specify a specific Cloud SQL database by
-     * supplying values for both the `"database_id"` and `"zone"` labels.  Specify
-     * the set of all Cloud SQL databases in a particular location by supplying a
-     * value for only the `"zone"` label.
-     * 
- */ - public java.util.Map - getMutableLabels() { - return internalGetMutableLabels().getMutableMap(); - } - /** - * map<string, string> labels = 2; - * - *
-     * Values for some or all of the labels listed in the associated monitored
-     * resource type. For example, specify a specific Cloud SQL database by
-     * supplying values for both the `"database_id"` and `"zone"` labels.  Specify
-     * the set of all Cloud SQL databases in a particular location by supplying a
-     * value for only the `"zone"` label.
-     * 
- */ - public Builder putAllLabels( - java.util.Map values) { - getMutableLabels().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.api.MonitoredResource) - } - - // @@protoc_insertion_point(class_scope:google.api.MonitoredResource) - private static final com.google.api.MonitoredResource DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.MonitoredResource(); - } - - public static com.google.api.MonitoredResource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public MonitoredResource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new MonitoredResource(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.MonitoredResource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceDescriptor.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceDescriptor.java deleted file mode 100644 index 864003e6fa89..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceDescriptor.java +++ /dev/null @@ -1,1278 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/monitored_resource.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.MonitoredResourceDescriptor} - * - *
- * A description of a type of monitored resource.
- * 
- */ -public final class MonitoredResourceDescriptor extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.MonitoredResourceDescriptor) - MonitoredResourceDescriptorOrBuilder { - // Use MonitoredResourceDescriptor.newBuilder() to construct. - private MonitoredResourceDescriptor(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MonitoredResourceDescriptor() { - type_ = ""; - displayName_ = ""; - description_ = ""; - labels_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private MonitoredResourceDescriptor( - 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(); - - type_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: { - String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - labels_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - labels_.add(input.readMessage(com.google.api.LabelDescriptor.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_ & 0x00000008) == 0x00000008)) { - labels_ = java.util.Collections.unmodifiableList(labels_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.MonitoredResourceProto.internal_static_google_api_MonitoredResourceDescriptor_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.MonitoredResourceProto.internal_static_google_api_MonitoredResourceDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.MonitoredResourceDescriptor.class, com.google.api.MonitoredResourceDescriptor.Builder.class); - } - - private int bitField0_; - public static final int TYPE_FIELD_NUMBER = 1; - private volatile java.lang.Object type_; - /** - * optional string type = 1; - * - *
-   * The monitored resource type. For example, the type `"cloudsql_database"`
-   * represents databases in Google Cloud SQL.
-   * 
- */ - public java.lang.String getType() { - java.lang.Object ref = type_; - 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(); - type_ = s; - return s; - } - } - /** - * optional string type = 1; - * - *
-   * The monitored resource type. For example, the type `"cloudsql_database"`
-   * represents databases in Google Cloud SQL.
-   * 
- */ - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object displayName_; - /** - * optional string display_name = 2; - * - *
-   * A concise name for the monitored resource type, which is displayed in user
-   * interfaces. For example, `"Cloud SQL database"`.
-   * 
- */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - * optional string display_name = 2; - * - *
-   * A concise name for the monitored resource type, which is displayed in user
-   * interfaces. For example, `"Cloud SQL database"`.
-   * 
- */ - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - * optional string description = 3; - * - *
-   * A detailed description of the monitored resource type, which is used in
-   * documentation.
-   * 
- */ - 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 = 3; - * - *
-   * A detailed description of the monitored resource type, which is used in
-   * documentation.
-   * 
- */ - 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 LABELS_FIELD_NUMBER = 4; - private java.util.List labels_; - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-   * A set of labels that can be used to describe instances of this monitored
-   * resource type. For example, Cloud SQL databases can be labeled with
-   * their `"database_id"` and their `"zone"`.
-   * 
- */ - public java.util.List getLabelsList() { - return labels_; - } - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-   * A set of labels that can be used to describe instances of this monitored
-   * resource type. For example, Cloud SQL databases can be labeled with
-   * their `"database_id"` and their `"zone"`.
-   * 
- */ - public java.util.List - getLabelsOrBuilderList() { - return labels_; - } - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-   * A set of labels that can be used to describe instances of this monitored
-   * resource type. For example, Cloud SQL databases can be labeled with
-   * their `"database_id"` and their `"zone"`.
-   * 
- */ - public int getLabelsCount() { - return labels_.size(); - } - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-   * A set of labels that can be used to describe instances of this monitored
-   * resource type. For example, Cloud SQL databases can be labeled with
-   * their `"database_id"` and their `"zone"`.
-   * 
- */ - public com.google.api.LabelDescriptor getLabels(int index) { - return labels_.get(index); - } - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-   * A set of labels that can be used to describe instances of this monitored
-   * resource type. For example, Cloud SQL databases can be labeled with
-   * their `"database_id"` and their `"zone"`.
-   * 
- */ - public com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder( - int index) { - return labels_.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 (!getTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, type_); - } - if (!getDisplayNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_); - } - if (!getDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, description_); - } - for (int i = 0; i < labels_.size(); i++) { - output.writeMessage(4, labels_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, type_); - } - if (!getDisplayNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, displayName_); - } - if (!getDescriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_); - } - for (int i = 0; i < labels_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, labels_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.MonitoredResourceDescriptor parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.MonitoredResourceDescriptor 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.MonitoredResourceDescriptor parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.MonitoredResourceDescriptor parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.MonitoredResourceDescriptor parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.MonitoredResourceDescriptor parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.MonitoredResourceDescriptor parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.MonitoredResourceDescriptor parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.MonitoredResourceDescriptor parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.MonitoredResourceDescriptor 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.MonitoredResourceDescriptor 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.MonitoredResourceDescriptor} - * - *
-   * A description of a type of monitored resource.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.MonitoredResourceDescriptor) - com.google.api.MonitoredResourceDescriptorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.MonitoredResourceProto.internal_static_google_api_MonitoredResourceDescriptor_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.MonitoredResourceProto.internal_static_google_api_MonitoredResourceDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.MonitoredResourceDescriptor.class, com.google.api.MonitoredResourceDescriptor.Builder.class); - } - - // Construct using com.google.api.MonitoredResourceDescriptor.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getLabelsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - type_ = ""; - - displayName_ = ""; - - description_ = ""; - - if (labelsBuilder_ == null) { - labels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - labelsBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.MonitoredResourceProto.internal_static_google_api_MonitoredResourceDescriptor_descriptor; - } - - public com.google.api.MonitoredResourceDescriptor getDefaultInstanceForType() { - return com.google.api.MonitoredResourceDescriptor.getDefaultInstance(); - } - - public com.google.api.MonitoredResourceDescriptor build() { - com.google.api.MonitoredResourceDescriptor result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.MonitoredResourceDescriptor buildPartial() { - com.google.api.MonitoredResourceDescriptor result = new com.google.api.MonitoredResourceDescriptor(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.type_ = type_; - result.displayName_ = displayName_; - result.description_ = description_; - if (labelsBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { - labels_ = java.util.Collections.unmodifiableList(labels_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.labels_ = labels_; - } else { - result.labels_ = labelsBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.MonitoredResourceDescriptor) { - return mergeFrom((com.google.api.MonitoredResourceDescriptor)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.MonitoredResourceDescriptor other) { - if (other == com.google.api.MonitoredResourceDescriptor.getDefaultInstance()) return this; - if (!other.getType().isEmpty()) { - type_ = other.type_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (labelsBuilder_ == null) { - if (!other.labels_.isEmpty()) { - if (labels_.isEmpty()) { - labels_ = other.labels_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureLabelsIsMutable(); - labels_.addAll(other.labels_); - } - onChanged(); - } - } else { - if (!other.labels_.isEmpty()) { - if (labelsBuilder_.isEmpty()) { - labelsBuilder_.dispose(); - labelsBuilder_ = null; - labels_ = other.labels_; - bitField0_ = (bitField0_ & ~0x00000008); - labelsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getLabelsFieldBuilder() : null; - } else { - labelsBuilder_.addAllMessages(other.labels_); - } - } - } - 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.MonitoredResourceDescriptor parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.MonitoredResourceDescriptor) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object type_ = ""; - /** - * optional string type = 1; - * - *
-     * The monitored resource type. For example, the type `"cloudsql_database"`
-     * represents databases in Google Cloud SQL.
-     * 
- */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string type = 1; - * - *
-     * The monitored resource type. For example, the type `"cloudsql_database"`
-     * represents databases in Google Cloud SQL.
-     * 
- */ - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string type = 1; - * - *
-     * The monitored resource type. For example, the type `"cloudsql_database"`
-     * represents databases in Google Cloud SQL.
-     * 
- */ - public Builder setType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value; - onChanged(); - return this; - } - /** - * optional string type = 1; - * - *
-     * The monitored resource type. For example, the type `"cloudsql_database"`
-     * represents databases in Google Cloud SQL.
-     * 
- */ - public Builder clearType() { - - type_ = getDefaultInstance().getType(); - onChanged(); - return this; - } - /** - * optional string type = 1; - * - *
-     * The monitored resource type. For example, the type `"cloudsql_database"`
-     * represents databases in Google Cloud SQL.
-     * 
- */ - public Builder setTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - type_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - * optional string display_name = 2; - * - *
-     * A concise name for the monitored resource type, which is displayed in user
-     * interfaces. For example, `"Cloud SQL database"`.
-     * 
- */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string display_name = 2; - * - *
-     * A concise name for the monitored resource type, which is displayed in user
-     * interfaces. For example, `"Cloud SQL database"`.
-     * 
- */ - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string display_name = 2; - * - *
-     * A concise name for the monitored resource type, which is displayed in user
-     * interfaces. For example, `"Cloud SQL database"`.
-     * 
- */ - public Builder setDisplayName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - displayName_ = value; - onChanged(); - return this; - } - /** - * optional string display_name = 2; - * - *
-     * A concise name for the monitored resource type, which is displayed in user
-     * interfaces. For example, `"Cloud SQL database"`.
-     * 
- */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - * optional string display_name = 2; - * - *
-     * A concise name for the monitored resource type, which is displayed in user
-     * interfaces. For example, `"Cloud SQL database"`.
-     * 
- */ - public Builder setDisplayNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - displayName_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * optional string description = 3; - * - *
-     * A detailed description of the monitored resource type, which is used in
-     * documentation.
-     * 
- */ - 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 = 3; - * - *
-     * A detailed description of the monitored resource type, which is used in
-     * documentation.
-     * 
- */ - 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 = 3; - * - *
-     * A detailed description of the monitored resource type, which is used in
-     * documentation.
-     * 
- */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * optional string description = 3; - * - *
-     * A detailed description of the monitored resource type, which is used in
-     * documentation.
-     * 
- */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * optional string description = 3; - * - *
-     * A detailed description of the monitored resource type, which is used in
-     * documentation.
-     * 
- */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private java.util.List labels_ = - java.util.Collections.emptyList(); - private void ensureLabelsIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - labels_ = new java.util.ArrayList(labels_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.LabelDescriptor, com.google.api.LabelDescriptor.Builder, com.google.api.LabelDescriptorOrBuilder> labelsBuilder_; - - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-     * A set of labels that can be used to describe instances of this monitored
-     * resource type. For example, Cloud SQL databases can be labeled with
-     * their `"database_id"` and their `"zone"`.
-     * 
- */ - public java.util.List getLabelsList() { - if (labelsBuilder_ == null) { - return java.util.Collections.unmodifiableList(labels_); - } else { - return labelsBuilder_.getMessageList(); - } - } - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-     * A set of labels that can be used to describe instances of this monitored
-     * resource type. For example, Cloud SQL databases can be labeled with
-     * their `"database_id"` and their `"zone"`.
-     * 
- */ - public int getLabelsCount() { - if (labelsBuilder_ == null) { - return labels_.size(); - } else { - return labelsBuilder_.getCount(); - } - } - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-     * A set of labels that can be used to describe instances of this monitored
-     * resource type. For example, Cloud SQL databases can be labeled with
-     * their `"database_id"` and their `"zone"`.
-     * 
- */ - public com.google.api.LabelDescriptor getLabels(int index) { - if (labelsBuilder_ == null) { - return labels_.get(index); - } else { - return labelsBuilder_.getMessage(index); - } - } - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-     * A set of labels that can be used to describe instances of this monitored
-     * resource type. For example, Cloud SQL databases can be labeled with
-     * their `"database_id"` and their `"zone"`.
-     * 
- */ - public Builder setLabels( - int index, com.google.api.LabelDescriptor value) { - if (labelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelsIsMutable(); - labels_.set(index, value); - onChanged(); - } else { - labelsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-     * A set of labels that can be used to describe instances of this monitored
-     * resource type. For example, Cloud SQL databases can be labeled with
-     * their `"database_id"` and their `"zone"`.
-     * 
- */ - public Builder setLabels( - int index, com.google.api.LabelDescriptor.Builder builderForValue) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - labels_.set(index, builderForValue.build()); - onChanged(); - } else { - labelsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-     * A set of labels that can be used to describe instances of this monitored
-     * resource type. For example, Cloud SQL databases can be labeled with
-     * their `"database_id"` and their `"zone"`.
-     * 
- */ - public Builder addLabels(com.google.api.LabelDescriptor value) { - if (labelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelsIsMutable(); - labels_.add(value); - onChanged(); - } else { - labelsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-     * A set of labels that can be used to describe instances of this monitored
-     * resource type. For example, Cloud SQL databases can be labeled with
-     * their `"database_id"` and their `"zone"`.
-     * 
- */ - public Builder addLabels( - int index, com.google.api.LabelDescriptor value) { - if (labelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelsIsMutable(); - labels_.add(index, value); - onChanged(); - } else { - labelsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-     * A set of labels that can be used to describe instances of this monitored
-     * resource type. For example, Cloud SQL databases can be labeled with
-     * their `"database_id"` and their `"zone"`.
-     * 
- */ - public Builder addLabels( - com.google.api.LabelDescriptor.Builder builderForValue) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - labels_.add(builderForValue.build()); - onChanged(); - } else { - labelsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-     * A set of labels that can be used to describe instances of this monitored
-     * resource type. For example, Cloud SQL databases can be labeled with
-     * their `"database_id"` and their `"zone"`.
-     * 
- */ - public Builder addLabels( - int index, com.google.api.LabelDescriptor.Builder builderForValue) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - labels_.add(index, builderForValue.build()); - onChanged(); - } else { - labelsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-     * A set of labels that can be used to describe instances of this monitored
-     * resource type. For example, Cloud SQL databases can be labeled with
-     * their `"database_id"` and their `"zone"`.
-     * 
- */ - public Builder addAllLabels( - java.lang.Iterable values) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, labels_); - onChanged(); - } else { - labelsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-     * A set of labels that can be used to describe instances of this monitored
-     * resource type. For example, Cloud SQL databases can be labeled with
-     * their `"database_id"` and their `"zone"`.
-     * 
- */ - public Builder clearLabels() { - if (labelsBuilder_ == null) { - labels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - labelsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-     * A set of labels that can be used to describe instances of this monitored
-     * resource type. For example, Cloud SQL databases can be labeled with
-     * their `"database_id"` and their `"zone"`.
-     * 
- */ - public Builder removeLabels(int index) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - labels_.remove(index); - onChanged(); - } else { - labelsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-     * A set of labels that can be used to describe instances of this monitored
-     * resource type. For example, Cloud SQL databases can be labeled with
-     * their `"database_id"` and their `"zone"`.
-     * 
- */ - public com.google.api.LabelDescriptor.Builder getLabelsBuilder( - int index) { - return getLabelsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-     * A set of labels that can be used to describe instances of this monitored
-     * resource type. For example, Cloud SQL databases can be labeled with
-     * their `"database_id"` and their `"zone"`.
-     * 
- */ - public com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder( - int index) { - if (labelsBuilder_ == null) { - return labels_.get(index); } else { - return labelsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-     * A set of labels that can be used to describe instances of this monitored
-     * resource type. For example, Cloud SQL databases can be labeled with
-     * their `"database_id"` and their `"zone"`.
-     * 
- */ - public java.util.List - getLabelsOrBuilderList() { - if (labelsBuilder_ != null) { - return labelsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(labels_); - } - } - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-     * A set of labels that can be used to describe instances of this monitored
-     * resource type. For example, Cloud SQL databases can be labeled with
-     * their `"database_id"` and their `"zone"`.
-     * 
- */ - public com.google.api.LabelDescriptor.Builder addLabelsBuilder() { - return getLabelsFieldBuilder().addBuilder( - com.google.api.LabelDescriptor.getDefaultInstance()); - } - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-     * A set of labels that can be used to describe instances of this monitored
-     * resource type. For example, Cloud SQL databases can be labeled with
-     * their `"database_id"` and their `"zone"`.
-     * 
- */ - public com.google.api.LabelDescriptor.Builder addLabelsBuilder( - int index) { - return getLabelsFieldBuilder().addBuilder( - index, com.google.api.LabelDescriptor.getDefaultInstance()); - } - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-     * A set of labels that can be used to describe instances of this monitored
-     * resource type. For example, Cloud SQL databases can be labeled with
-     * their `"database_id"` and their `"zone"`.
-     * 
- */ - public java.util.List - getLabelsBuilderList() { - return getLabelsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.LabelDescriptor, com.google.api.LabelDescriptor.Builder, com.google.api.LabelDescriptorOrBuilder> - getLabelsFieldBuilder() { - if (labelsBuilder_ == null) { - labelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.api.LabelDescriptor, com.google.api.LabelDescriptor.Builder, com.google.api.LabelDescriptorOrBuilder>( - labels_, - ((bitField0_ & 0x00000008) == 0x00000008), - getParentForChildren(), - isClean()); - labels_ = null; - } - return labelsBuilder_; - } - 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.MonitoredResourceDescriptor) - } - - // @@protoc_insertion_point(class_scope:google.api.MonitoredResourceDescriptor) - private static final com.google.api.MonitoredResourceDescriptor DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.MonitoredResourceDescriptor(); - } - - public static com.google.api.MonitoredResourceDescriptor getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public MonitoredResourceDescriptor parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new MonitoredResourceDescriptor(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.MonitoredResourceDescriptor getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceDescriptorOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceDescriptorOrBuilder.java deleted file mode 100644 index beb3f025a9c4..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceDescriptorOrBuilder.java +++ /dev/null @@ -1,123 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/monitored_resource.proto - -package com.google.api; - -public interface MonitoredResourceDescriptorOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.MonitoredResourceDescriptor) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string type = 1; - * - *
-   * The monitored resource type. For example, the type `"cloudsql_database"`
-   * represents databases in Google Cloud SQL.
-   * 
- */ - java.lang.String getType(); - /** - * optional string type = 1; - * - *
-   * The monitored resource type. For example, the type `"cloudsql_database"`
-   * represents databases in Google Cloud SQL.
-   * 
- */ - com.google.protobuf.ByteString - getTypeBytes(); - - /** - * optional string display_name = 2; - * - *
-   * A concise name for the monitored resource type, which is displayed in user
-   * interfaces. For example, `"Cloud SQL database"`.
-   * 
- */ - java.lang.String getDisplayName(); - /** - * optional string display_name = 2; - * - *
-   * A concise name for the monitored resource type, which is displayed in user
-   * interfaces. For example, `"Cloud SQL database"`.
-   * 
- */ - com.google.protobuf.ByteString - getDisplayNameBytes(); - - /** - * optional string description = 3; - * - *
-   * A detailed description of the monitored resource type, which is used in
-   * documentation.
-   * 
- */ - java.lang.String getDescription(); - /** - * optional string description = 3; - * - *
-   * A detailed description of the monitored resource type, which is used in
-   * documentation.
-   * 
- */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-   * A set of labels that can be used to describe instances of this monitored
-   * resource type. For example, Cloud SQL databases can be labeled with
-   * their `"database_id"` and their `"zone"`.
-   * 
- */ - java.util.List - getLabelsList(); - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-   * A set of labels that can be used to describe instances of this monitored
-   * resource type. For example, Cloud SQL databases can be labeled with
-   * their `"database_id"` and their `"zone"`.
-   * 
- */ - com.google.api.LabelDescriptor getLabels(int index); - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-   * A set of labels that can be used to describe instances of this monitored
-   * resource type. For example, Cloud SQL databases can be labeled with
-   * their `"database_id"` and their `"zone"`.
-   * 
- */ - int getLabelsCount(); - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-   * A set of labels that can be used to describe instances of this monitored
-   * resource type. For example, Cloud SQL databases can be labeled with
-   * their `"database_id"` and their `"zone"`.
-   * 
- */ - java.util.List - getLabelsOrBuilderList(); - /** - * repeated .google.api.LabelDescriptor labels = 4; - * - *
-   * A set of labels that can be used to describe instances of this monitored
-   * resource type. For example, Cloud SQL databases can be labeled with
-   * their `"database_id"` and their `"zone"`.
-   * 
- */ - com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder( - int index); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceOrBuilder.java deleted file mode 100644 index 21547c4a766c..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceOrBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/monitored_resource.proto - -package com.google.api; - -public interface MonitoredResourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.MonitoredResource) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string type = 1; - * - *
-   * The type of monitored resource. This field must match the value of the
-   * `type` field in a [MonitoredResourceDescriptor][] object.  For example,
-   * `"cloudsql_database"` represents Cloud SQL databases.
-   * 
- */ - java.lang.String getType(); - /** - * optional string type = 1; - * - *
-   * The type of monitored resource. This field must match the value of the
-   * `type` field in a [MonitoredResourceDescriptor][] object.  For example,
-   * `"cloudsql_database"` represents Cloud SQL databases.
-   * 
- */ - com.google.protobuf.ByteString - getTypeBytes(); - - /** - * map<string, string> labels = 2; - * - *
-   * Values for some or all of the labels listed in the associated monitored
-   * resource type. For example, specify a specific Cloud SQL database by
-   * supplying values for both the `"database_id"` and `"zone"` labels.  Specify
-   * the set of all Cloud SQL databases in a particular location by supplying a
-   * value for only the `"zone"` label.
-   * 
- */ - java.util.Map - getLabels(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceProto.java deleted file mode 100644 index acba4d139321..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceProto.java +++ /dev/null @@ -1,82 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/monitored_resource.proto - -package com.google.api; - -public final class MonitoredResourceProto { - private MonitoredResourceProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_MonitoredResourceDescriptor_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_MonitoredResourceDescriptor_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_MonitoredResource_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_MonitoredResource_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_MonitoredResource_LabelsEntry_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_MonitoredResource_LabelsEntry_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/api/monitored_resource.proto\022\ng" + - "oogle.api\032\026google/api/label.proto\"\203\001\n\033Mo" + - "nitoredResourceDescriptor\022\014\n\004type\030\001 \001(\t\022" + - "\024\n\014display_name\030\002 \001(\t\022\023\n\013description\030\003 \001" + - "(\t\022+\n\006labels\030\004 \003(\0132\033.google.api.LabelDes" + - "criptor\"\213\001\n\021MonitoredResource\022\014\n\004type\030\001 " + - "\001(\t\0229\n\006labels\030\002 \003(\0132).google.api.Monitor" + - "edResource.LabelsEntry\032-\n\013LabelsEntry\022\013\n" + - "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B*\n\016com.goo" + - "gle.apiB\026MonitoredResourceProtoP\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[] { - com.google.api.LabelProto.getDescriptor(), - }, assigner); - internal_static_google_api_MonitoredResourceDescriptor_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_api_MonitoredResourceDescriptor_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_MonitoredResourceDescriptor_descriptor, - new java.lang.String[] { "Type", "DisplayName", "Description", "Labels", }); - internal_static_google_api_MonitoredResource_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_api_MonitoredResource_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_MonitoredResource_descriptor, - new java.lang.String[] { "Type", "Labels", }); - internal_static_google_api_MonitoredResource_LabelsEntry_descriptor = - internal_static_google_api_MonitoredResource_descriptor.getNestedTypes().get(0); - internal_static_google_api_MonitoredResource_LabelsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_MonitoredResource_LabelsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - com.google.api.LabelProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/Monitoring.java b/gcloud-java-gax/generated/src/main/java/com/google/api/Monitoring.java deleted file mode 100644 index 7732b4e36ef3..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/Monitoring.java +++ /dev/null @@ -1,2192 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/monitoring.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.Monitoring} - * - *
- * Monitoring configuration of the service.
- * The example below shows how to configure monitored resources and metrics
- * for monitoring. In the example, a monitored resource and two metrics are
- * defined. The `library.googleapis.com/book/returned_count` metric is sent
- * to both producer and consumer projects, whereas the
- * `library.googleapis.com/book/overdue_count` metric is only sent to the
- * consumer project.
- *     monitored_resources:
- *     - type: library.googleapis.com/branch
- *       labels:
- *       - key: /city
- *         description: The city where the library branch is located in.
- *       - key: /name
- *         description: The name of the branch.
- *     metrics:
- *     - name: library.googleapis.com/book/returned_count
- *       metric_kind: DELTA
- *       value_type: INT64
- *       labels:
- *       - key: /customer_id
- *     - name: library.googleapis.com/book/overdue_count
- *       metric_kind: GAUGE
- *       value_type: INT64
- *       labels:
- *       - key: /customer_id
- *     monitoring:
- *       producer_destinations:
- *       - monitored_resource: library.googleapis.com/branch
- *         metrics:
- *         - library.googleapis.com/book/returned_count
- *       consumer_destinations:
- *       - monitored_resource: library.googleapis.com/branch
- *         metrics:
- *         - library.googleapis.com/book/returned_count
- *         - library.googleapis.com/book/overdue_count
- * (-- GOOGLE_INTERNAL:
- * This example shows how to configure metrics to be sent to the consumer
- * project, and skip fine grained ACL check since the service is a trusted
- * Google service:
- *     monitoring:
- *       consumer_destinations:
- *       - monitored_resource: library.googleapis.com/branch
- *         metrics:
- *         - library.googleapis.com/book/returned_count
- *         - library.googleapis.com/book/overdue_count
- *         acl:
- *           model: SKIP
- * --)
- * 
- */ -public final class Monitoring extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.Monitoring) - MonitoringOrBuilder { - // Use Monitoring.newBuilder() to construct. - private Monitoring(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Monitoring() { - producerDestinations_ = java.util.Collections.emptyList(); - consumerDestinations_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Monitoring( - 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)) { - producerDestinations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - producerDestinations_.add(input.readMessage(com.google.api.Monitoring.MonitoringDestination.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - consumerDestinations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - consumerDestinations_.add(input.readMessage(com.google.api.Monitoring.MonitoringDestination.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)) { - producerDestinations_ = java.util.Collections.unmodifiableList(producerDestinations_); - } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - consumerDestinations_ = java.util.Collections.unmodifiableList(consumerDestinations_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Monitoring.class, com.google.api.Monitoring.Builder.class); - } - - public interface MonitoringDestinationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.Monitoring.MonitoringDestination) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string monitored_resource = 1; - * - *
-     * The monitored resource type. The type must be defined in
-     * [Service.monitored_resources][] section.
-     * 
- */ - java.lang.String getMonitoredResource(); - /** - * optional string monitored_resource = 1; - * - *
-     * The monitored resource type. The type must be defined in
-     * [Service.monitored_resources][] section.
-     * 
- */ - com.google.protobuf.ByteString - getMonitoredResourceBytes(); - - /** - * repeated string metrics = 2; - * - *
-     * Names of the metrics to report to this monitoring destination.
-     * Each name must be defined in [Service.metrics][] section.
-     * 
- */ - com.google.protobuf.ProtocolStringList - getMetricsList(); - /** - * repeated string metrics = 2; - * - *
-     * Names of the metrics to report to this monitoring destination.
-     * Each name must be defined in [Service.metrics][] section.
-     * 
- */ - int getMetricsCount(); - /** - * repeated string metrics = 2; - * - *
-     * Names of the metrics to report to this monitoring destination.
-     * Each name must be defined in [Service.metrics][] section.
-     * 
- */ - java.lang.String getMetrics(int index); - /** - * repeated string metrics = 2; - * - *
-     * Names of the metrics to report to this monitoring destination.
-     * Each name must be defined in [Service.metrics][] section.
-     * 
- */ - com.google.protobuf.ByteString - getMetricsBytes(int index); - } - /** - * Protobuf type {@code google.api.Monitoring.MonitoringDestination} - * - *
-   * Configuration of a specific monitoring destination (the producer project
-   * or the consumer project).
-   * 
- */ - public static final class MonitoringDestination extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.Monitoring.MonitoringDestination) - MonitoringDestinationOrBuilder { - // Use MonitoringDestination.newBuilder() to construct. - private MonitoringDestination(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MonitoringDestination() { - monitoredResource_ = ""; - metrics_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private MonitoringDestination( - 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(); - - monitoredResource_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - metrics_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - metrics_.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)) { - metrics_ = metrics_.getUnmodifiableView(); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_MonitoringDestination_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_MonitoringDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Monitoring.MonitoringDestination.class, com.google.api.Monitoring.MonitoringDestination.Builder.class); - } - - private int bitField0_; - public static final int MONITORED_RESOURCE_FIELD_NUMBER = 1; - private volatile java.lang.Object monitoredResource_; - /** - * optional string monitored_resource = 1; - * - *
-     * The monitored resource type. The type must be defined in
-     * [Service.monitored_resources][] section.
-     * 
- */ - public java.lang.String getMonitoredResource() { - java.lang.Object ref = monitoredResource_; - 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(); - monitoredResource_ = s; - return s; - } - } - /** - * optional string monitored_resource = 1; - * - *
-     * The monitored resource type. The type must be defined in
-     * [Service.monitored_resources][] section.
-     * 
- */ - public com.google.protobuf.ByteString - getMonitoredResourceBytes() { - java.lang.Object ref = monitoredResource_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - monitoredResource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METRICS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList metrics_; - /** - * repeated string metrics = 2; - * - *
-     * Names of the metrics to report to this monitoring destination.
-     * Each name must be defined in [Service.metrics][] section.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getMetricsList() { - return metrics_; - } - /** - * repeated string metrics = 2; - * - *
-     * Names of the metrics to report to this monitoring destination.
-     * Each name must be defined in [Service.metrics][] section.
-     * 
- */ - public int getMetricsCount() { - return metrics_.size(); - } - /** - * repeated string metrics = 2; - * - *
-     * Names of the metrics to report to this monitoring destination.
-     * Each name must be defined in [Service.metrics][] section.
-     * 
- */ - public java.lang.String getMetrics(int index) { - return metrics_.get(index); - } - /** - * repeated string metrics = 2; - * - *
-     * Names of the metrics to report to this monitoring destination.
-     * Each name must be defined in [Service.metrics][] section.
-     * 
- */ - public com.google.protobuf.ByteString - getMetricsBytes(int index) { - return metrics_.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 (!getMonitoredResourceBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, monitoredResource_); - } - for (int i = 0; i < metrics_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, metrics_.getRaw(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getMonitoredResourceBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, monitoredResource_); - } - { - int dataSize = 0; - for (int i = 0; i < metrics_.size(); i++) { - dataSize += computeStringSizeNoTag(metrics_.getRaw(i)); - } - size += dataSize; - size += 1 * getMetricsList().size(); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.Monitoring.MonitoringDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Monitoring.MonitoringDestination 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.Monitoring.MonitoringDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Monitoring.MonitoringDestination parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.Monitoring.MonitoringDestination parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Monitoring.MonitoringDestination parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.Monitoring.MonitoringDestination parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.Monitoring.MonitoringDestination parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.Monitoring.MonitoringDestination parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Monitoring.MonitoringDestination 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.Monitoring.MonitoringDestination 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.Monitoring.MonitoringDestination} - * - *
-     * Configuration of a specific monitoring destination (the producer project
-     * or the consumer project).
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.Monitoring.MonitoringDestination) - com.google.api.Monitoring.MonitoringDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_MonitoringDestination_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_MonitoringDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Monitoring.MonitoringDestination.class, com.google.api.Monitoring.MonitoringDestination.Builder.class); - } - - // Construct using com.google.api.Monitoring.MonitoringDestination.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(); - monitoredResource_ = ""; - - metrics_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_MonitoringDestination_descriptor; - } - - public com.google.api.Monitoring.MonitoringDestination getDefaultInstanceForType() { - return com.google.api.Monitoring.MonitoringDestination.getDefaultInstance(); - } - - public com.google.api.Monitoring.MonitoringDestination build() { - com.google.api.Monitoring.MonitoringDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.Monitoring.MonitoringDestination buildPartial() { - com.google.api.Monitoring.MonitoringDestination result = new com.google.api.Monitoring.MonitoringDestination(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.monitoredResource_ = monitoredResource_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - metrics_ = metrics_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.metrics_ = metrics_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.Monitoring.MonitoringDestination) { - return mergeFrom((com.google.api.Monitoring.MonitoringDestination)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.Monitoring.MonitoringDestination other) { - if (other == com.google.api.Monitoring.MonitoringDestination.getDefaultInstance()) return this; - if (!other.getMonitoredResource().isEmpty()) { - monitoredResource_ = other.monitoredResource_; - onChanged(); - } - if (!other.metrics_.isEmpty()) { - if (metrics_.isEmpty()) { - metrics_ = other.metrics_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureMetricsIsMutable(); - metrics_.addAll(other.metrics_); - } - 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.Monitoring.MonitoringDestination parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.Monitoring.MonitoringDestination) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object monitoredResource_ = ""; - /** - * optional string monitored_resource = 1; - * - *
-       * The monitored resource type. The type must be defined in
-       * [Service.monitored_resources][] section.
-       * 
- */ - public java.lang.String getMonitoredResource() { - java.lang.Object ref = monitoredResource_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - monitoredResource_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string monitored_resource = 1; - * - *
-       * The monitored resource type. The type must be defined in
-       * [Service.monitored_resources][] section.
-       * 
- */ - public com.google.protobuf.ByteString - getMonitoredResourceBytes() { - java.lang.Object ref = monitoredResource_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - monitoredResource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string monitored_resource = 1; - * - *
-       * The monitored resource type. The type must be defined in
-       * [Service.monitored_resources][] section.
-       * 
- */ - public Builder setMonitoredResource( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - monitoredResource_ = value; - onChanged(); - return this; - } - /** - * optional string monitored_resource = 1; - * - *
-       * The monitored resource type. The type must be defined in
-       * [Service.monitored_resources][] section.
-       * 
- */ - public Builder clearMonitoredResource() { - - monitoredResource_ = getDefaultInstance().getMonitoredResource(); - onChanged(); - return this; - } - /** - * optional string monitored_resource = 1; - * - *
-       * The monitored resource type. The type must be defined in
-       * [Service.monitored_resources][] section.
-       * 
- */ - public Builder setMonitoredResourceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - monitoredResource_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList metrics_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureMetricsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - metrics_ = new com.google.protobuf.LazyStringArrayList(metrics_); - bitField0_ |= 0x00000002; - } - } - /** - * repeated string metrics = 2; - * - *
-       * Names of the metrics to report to this monitoring destination.
-       * Each name must be defined in [Service.metrics][] section.
-       * 
- */ - public com.google.protobuf.ProtocolStringList - getMetricsList() { - return metrics_.getUnmodifiableView(); - } - /** - * repeated string metrics = 2; - * - *
-       * Names of the metrics to report to this monitoring destination.
-       * Each name must be defined in [Service.metrics][] section.
-       * 
- */ - public int getMetricsCount() { - return metrics_.size(); - } - /** - * repeated string metrics = 2; - * - *
-       * Names of the metrics to report to this monitoring destination.
-       * Each name must be defined in [Service.metrics][] section.
-       * 
- */ - public java.lang.String getMetrics(int index) { - return metrics_.get(index); - } - /** - * repeated string metrics = 2; - * - *
-       * Names of the metrics to report to this monitoring destination.
-       * Each name must be defined in [Service.metrics][] section.
-       * 
- */ - public com.google.protobuf.ByteString - getMetricsBytes(int index) { - return metrics_.getByteString(index); - } - /** - * repeated string metrics = 2; - * - *
-       * Names of the metrics to report to this monitoring destination.
-       * Each name must be defined in [Service.metrics][] section.
-       * 
- */ - public Builder setMetrics( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetricsIsMutable(); - metrics_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string metrics = 2; - * - *
-       * Names of the metrics to report to this monitoring destination.
-       * Each name must be defined in [Service.metrics][] section.
-       * 
- */ - public Builder addMetrics( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetricsIsMutable(); - metrics_.add(value); - onChanged(); - return this; - } - /** - * repeated string metrics = 2; - * - *
-       * Names of the metrics to report to this monitoring destination.
-       * Each name must be defined in [Service.metrics][] section.
-       * 
- */ - public Builder addAllMetrics( - java.lang.Iterable values) { - ensureMetricsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, metrics_); - onChanged(); - return this; - } - /** - * repeated string metrics = 2; - * - *
-       * Names of the metrics to report to this monitoring destination.
-       * Each name must be defined in [Service.metrics][] section.
-       * 
- */ - public Builder clearMetrics() { - metrics_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * repeated string metrics = 2; - * - *
-       * Names of the metrics to report to this monitoring destination.
-       * Each name must be defined in [Service.metrics][] section.
-       * 
- */ - public Builder addMetricsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureMetricsIsMutable(); - metrics_.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.Monitoring.MonitoringDestination) - } - - // @@protoc_insertion_point(class_scope:google.api.Monitoring.MonitoringDestination) - private static final com.google.api.Monitoring.MonitoringDestination DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.Monitoring.MonitoringDestination(); - } - - public static com.google.api.Monitoring.MonitoringDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public MonitoringDestination parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new MonitoringDestination(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.Monitoring.MonitoringDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int PRODUCER_DESTINATIONS_FIELD_NUMBER = 1; - private java.util.List producerDestinations_; - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-   * Monitoring configurations for sending metrics to the producer project.
-   * There can be multiple producer destinations, each one must have a
-   * different monitored resource type. A metric can be used in at most
-   * one producer destination.
-   * 
- */ - public java.util.List getProducerDestinationsList() { - return producerDestinations_; - } - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-   * Monitoring configurations for sending metrics to the producer project.
-   * There can be multiple producer destinations, each one must have a
-   * different monitored resource type. A metric can be used in at most
-   * one producer destination.
-   * 
- */ - public java.util.List - getProducerDestinationsOrBuilderList() { - return producerDestinations_; - } - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-   * Monitoring configurations for sending metrics to the producer project.
-   * There can be multiple producer destinations, each one must have a
-   * different monitored resource type. A metric can be used in at most
-   * one producer destination.
-   * 
- */ - public int getProducerDestinationsCount() { - return producerDestinations_.size(); - } - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-   * Monitoring configurations for sending metrics to the producer project.
-   * There can be multiple producer destinations, each one must have a
-   * different monitored resource type. A metric can be used in at most
-   * one producer destination.
-   * 
- */ - public com.google.api.Monitoring.MonitoringDestination getProducerDestinations(int index) { - return producerDestinations_.get(index); - } - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-   * Monitoring configurations for sending metrics to the producer project.
-   * There can be multiple producer destinations, each one must have a
-   * different monitored resource type. A metric can be used in at most
-   * one producer destination.
-   * 
- */ - public com.google.api.Monitoring.MonitoringDestinationOrBuilder getProducerDestinationsOrBuilder( - int index) { - return producerDestinations_.get(index); - } - - public static final int CONSUMER_DESTINATIONS_FIELD_NUMBER = 2; - private java.util.List consumerDestinations_; - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-   * Monitoring configurations for sending metrics to the consumer project.
-   * There can be multiple consumer destinations, each one must have a
-   * different monitored resource type. A metric can be used in at most
-   * one consumer destination.
-   * 
- */ - public java.util.List getConsumerDestinationsList() { - return consumerDestinations_; - } - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-   * Monitoring configurations for sending metrics to the consumer project.
-   * There can be multiple consumer destinations, each one must have a
-   * different monitored resource type. A metric can be used in at most
-   * one consumer destination.
-   * 
- */ - public java.util.List - getConsumerDestinationsOrBuilderList() { - return consumerDestinations_; - } - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-   * Monitoring configurations for sending metrics to the consumer project.
-   * There can be multiple consumer destinations, each one must have a
-   * different monitored resource type. A metric can be used in at most
-   * one consumer destination.
-   * 
- */ - public int getConsumerDestinationsCount() { - return consumerDestinations_.size(); - } - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-   * Monitoring configurations for sending metrics to the consumer project.
-   * There can be multiple consumer destinations, each one must have a
-   * different monitored resource type. A metric can be used in at most
-   * one consumer destination.
-   * 
- */ - public com.google.api.Monitoring.MonitoringDestination getConsumerDestinations(int index) { - return consumerDestinations_.get(index); - } - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-   * Monitoring configurations for sending metrics to the consumer project.
-   * There can be multiple consumer destinations, each one must have a
-   * different monitored resource type. A metric can be used in at most
-   * one consumer destination.
-   * 
- */ - public com.google.api.Monitoring.MonitoringDestinationOrBuilder getConsumerDestinationsOrBuilder( - int index) { - return consumerDestinations_.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 < producerDestinations_.size(); i++) { - output.writeMessage(1, producerDestinations_.get(i)); - } - for (int i = 0; i < consumerDestinations_.size(); i++) { - output.writeMessage(2, consumerDestinations_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < producerDestinations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, producerDestinations_.get(i)); - } - for (int i = 0; i < consumerDestinations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, consumerDestinations_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.Monitoring parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Monitoring 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.Monitoring parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Monitoring parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.Monitoring parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Monitoring parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.Monitoring parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.Monitoring parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.Monitoring parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Monitoring 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.Monitoring 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.Monitoring} - * - *
-   * Monitoring configuration of the service.
-   * The example below shows how to configure monitored resources and metrics
-   * for monitoring. In the example, a monitored resource and two metrics are
-   * defined. The `library.googleapis.com/book/returned_count` metric is sent
-   * to both producer and consumer projects, whereas the
-   * `library.googleapis.com/book/overdue_count` metric is only sent to the
-   * consumer project.
-   *     monitored_resources:
-   *     - type: library.googleapis.com/branch
-   *       labels:
-   *       - key: /city
-   *         description: The city where the library branch is located in.
-   *       - key: /name
-   *         description: The name of the branch.
-   *     metrics:
-   *     - name: library.googleapis.com/book/returned_count
-   *       metric_kind: DELTA
-   *       value_type: INT64
-   *       labels:
-   *       - key: /customer_id
-   *     - name: library.googleapis.com/book/overdue_count
-   *       metric_kind: GAUGE
-   *       value_type: INT64
-   *       labels:
-   *       - key: /customer_id
-   *     monitoring:
-   *       producer_destinations:
-   *       - monitored_resource: library.googleapis.com/branch
-   *         metrics:
-   *         - library.googleapis.com/book/returned_count
-   *       consumer_destinations:
-   *       - monitored_resource: library.googleapis.com/branch
-   *         metrics:
-   *         - library.googleapis.com/book/returned_count
-   *         - library.googleapis.com/book/overdue_count
-   * (-- GOOGLE_INTERNAL:
-   * This example shows how to configure metrics to be sent to the consumer
-   * project, and skip fine grained ACL check since the service is a trusted
-   * Google service:
-   *     monitoring:
-   *       consumer_destinations:
-   *       - monitored_resource: library.googleapis.com/branch
-   *         metrics:
-   *         - library.googleapis.com/book/returned_count
-   *         - library.googleapis.com/book/overdue_count
-   *         acl:
-   *           model: SKIP
-   * --)
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.Monitoring) - com.google.api.MonitoringOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Monitoring.class, com.google.api.Monitoring.Builder.class); - } - - // Construct using com.google.api.Monitoring.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getProducerDestinationsFieldBuilder(); - getConsumerDestinationsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (producerDestinationsBuilder_ == null) { - producerDestinations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - producerDestinationsBuilder_.clear(); - } - if (consumerDestinationsBuilder_ == null) { - consumerDestinations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - consumerDestinationsBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_descriptor; - } - - public com.google.api.Monitoring getDefaultInstanceForType() { - return com.google.api.Monitoring.getDefaultInstance(); - } - - public com.google.api.Monitoring build() { - com.google.api.Monitoring result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.Monitoring buildPartial() { - com.google.api.Monitoring result = new com.google.api.Monitoring(this); - int from_bitField0_ = bitField0_; - if (producerDestinationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - producerDestinations_ = java.util.Collections.unmodifiableList(producerDestinations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.producerDestinations_ = producerDestinations_; - } else { - result.producerDestinations_ = producerDestinationsBuilder_.build(); - } - if (consumerDestinationsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - consumerDestinations_ = java.util.Collections.unmodifiableList(consumerDestinations_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.consumerDestinations_ = consumerDestinations_; - } else { - result.consumerDestinations_ = consumerDestinationsBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.Monitoring) { - return mergeFrom((com.google.api.Monitoring)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.Monitoring other) { - if (other == com.google.api.Monitoring.getDefaultInstance()) return this; - if (producerDestinationsBuilder_ == null) { - if (!other.producerDestinations_.isEmpty()) { - if (producerDestinations_.isEmpty()) { - producerDestinations_ = other.producerDestinations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureProducerDestinationsIsMutable(); - producerDestinations_.addAll(other.producerDestinations_); - } - onChanged(); - } - } else { - if (!other.producerDestinations_.isEmpty()) { - if (producerDestinationsBuilder_.isEmpty()) { - producerDestinationsBuilder_.dispose(); - producerDestinationsBuilder_ = null; - producerDestinations_ = other.producerDestinations_; - bitField0_ = (bitField0_ & ~0x00000001); - producerDestinationsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getProducerDestinationsFieldBuilder() : null; - } else { - producerDestinationsBuilder_.addAllMessages(other.producerDestinations_); - } - } - } - if (consumerDestinationsBuilder_ == null) { - if (!other.consumerDestinations_.isEmpty()) { - if (consumerDestinations_.isEmpty()) { - consumerDestinations_ = other.consumerDestinations_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureConsumerDestinationsIsMutable(); - consumerDestinations_.addAll(other.consumerDestinations_); - } - onChanged(); - } - } else { - if (!other.consumerDestinations_.isEmpty()) { - if (consumerDestinationsBuilder_.isEmpty()) { - consumerDestinationsBuilder_.dispose(); - consumerDestinationsBuilder_ = null; - consumerDestinations_ = other.consumerDestinations_; - bitField0_ = (bitField0_ & ~0x00000002); - consumerDestinationsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getConsumerDestinationsFieldBuilder() : null; - } else { - consumerDestinationsBuilder_.addAllMessages(other.consumerDestinations_); - } - } - } - 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.Monitoring parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.Monitoring) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List producerDestinations_ = - java.util.Collections.emptyList(); - private void ensureProducerDestinationsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - producerDestinations_ = new java.util.ArrayList(producerDestinations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.Monitoring.MonitoringDestination, com.google.api.Monitoring.MonitoringDestination.Builder, com.google.api.Monitoring.MonitoringDestinationOrBuilder> producerDestinationsBuilder_; - - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-     * Monitoring configurations for sending metrics to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one producer destination.
-     * 
- */ - public java.util.List getProducerDestinationsList() { - if (producerDestinationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(producerDestinations_); - } else { - return producerDestinationsBuilder_.getMessageList(); - } - } - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-     * Monitoring configurations for sending metrics to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one producer destination.
-     * 
- */ - public int getProducerDestinationsCount() { - if (producerDestinationsBuilder_ == null) { - return producerDestinations_.size(); - } else { - return producerDestinationsBuilder_.getCount(); - } - } - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-     * Monitoring configurations for sending metrics to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one producer destination.
-     * 
- */ - public com.google.api.Monitoring.MonitoringDestination getProducerDestinations(int index) { - if (producerDestinationsBuilder_ == null) { - return producerDestinations_.get(index); - } else { - return producerDestinationsBuilder_.getMessage(index); - } - } - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-     * Monitoring configurations for sending metrics to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one producer destination.
-     * 
- */ - public Builder setProducerDestinations( - int index, com.google.api.Monitoring.MonitoringDestination value) { - if (producerDestinationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProducerDestinationsIsMutable(); - producerDestinations_.set(index, value); - onChanged(); - } else { - producerDestinationsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-     * Monitoring configurations for sending metrics to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one producer destination.
-     * 
- */ - public Builder setProducerDestinations( - int index, com.google.api.Monitoring.MonitoringDestination.Builder builderForValue) { - if (producerDestinationsBuilder_ == null) { - ensureProducerDestinationsIsMutable(); - producerDestinations_.set(index, builderForValue.build()); - onChanged(); - } else { - producerDestinationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-     * Monitoring configurations for sending metrics to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one producer destination.
-     * 
- */ - public Builder addProducerDestinations(com.google.api.Monitoring.MonitoringDestination value) { - if (producerDestinationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProducerDestinationsIsMutable(); - producerDestinations_.add(value); - onChanged(); - } else { - producerDestinationsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-     * Monitoring configurations for sending metrics to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one producer destination.
-     * 
- */ - public Builder addProducerDestinations( - int index, com.google.api.Monitoring.MonitoringDestination value) { - if (producerDestinationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProducerDestinationsIsMutable(); - producerDestinations_.add(index, value); - onChanged(); - } else { - producerDestinationsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-     * Monitoring configurations for sending metrics to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one producer destination.
-     * 
- */ - public Builder addProducerDestinations( - com.google.api.Monitoring.MonitoringDestination.Builder builderForValue) { - if (producerDestinationsBuilder_ == null) { - ensureProducerDestinationsIsMutable(); - producerDestinations_.add(builderForValue.build()); - onChanged(); - } else { - producerDestinationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-     * Monitoring configurations for sending metrics to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one producer destination.
-     * 
- */ - public Builder addProducerDestinations( - int index, com.google.api.Monitoring.MonitoringDestination.Builder builderForValue) { - if (producerDestinationsBuilder_ == null) { - ensureProducerDestinationsIsMutable(); - producerDestinations_.add(index, builderForValue.build()); - onChanged(); - } else { - producerDestinationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-     * Monitoring configurations for sending metrics to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one producer destination.
-     * 
- */ - public Builder addAllProducerDestinations( - java.lang.Iterable values) { - if (producerDestinationsBuilder_ == null) { - ensureProducerDestinationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, producerDestinations_); - onChanged(); - } else { - producerDestinationsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-     * Monitoring configurations for sending metrics to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one producer destination.
-     * 
- */ - public Builder clearProducerDestinations() { - if (producerDestinationsBuilder_ == null) { - producerDestinations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - producerDestinationsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-     * Monitoring configurations for sending metrics to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one producer destination.
-     * 
- */ - public Builder removeProducerDestinations(int index) { - if (producerDestinationsBuilder_ == null) { - ensureProducerDestinationsIsMutable(); - producerDestinations_.remove(index); - onChanged(); - } else { - producerDestinationsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-     * Monitoring configurations for sending metrics to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one producer destination.
-     * 
- */ - public com.google.api.Monitoring.MonitoringDestination.Builder getProducerDestinationsBuilder( - int index) { - return getProducerDestinationsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-     * Monitoring configurations for sending metrics to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one producer destination.
-     * 
- */ - public com.google.api.Monitoring.MonitoringDestinationOrBuilder getProducerDestinationsOrBuilder( - int index) { - if (producerDestinationsBuilder_ == null) { - return producerDestinations_.get(index); } else { - return producerDestinationsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-     * Monitoring configurations for sending metrics to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one producer destination.
-     * 
- */ - public java.util.List - getProducerDestinationsOrBuilderList() { - if (producerDestinationsBuilder_ != null) { - return producerDestinationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(producerDestinations_); - } - } - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-     * Monitoring configurations for sending metrics to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one producer destination.
-     * 
- */ - public com.google.api.Monitoring.MonitoringDestination.Builder addProducerDestinationsBuilder() { - return getProducerDestinationsFieldBuilder().addBuilder( - com.google.api.Monitoring.MonitoringDestination.getDefaultInstance()); - } - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-     * Monitoring configurations for sending metrics to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one producer destination.
-     * 
- */ - public com.google.api.Monitoring.MonitoringDestination.Builder addProducerDestinationsBuilder( - int index) { - return getProducerDestinationsFieldBuilder().addBuilder( - index, com.google.api.Monitoring.MonitoringDestination.getDefaultInstance()); - } - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-     * Monitoring configurations for sending metrics to the producer project.
-     * There can be multiple producer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one producer destination.
-     * 
- */ - public java.util.List - getProducerDestinationsBuilderList() { - return getProducerDestinationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.Monitoring.MonitoringDestination, com.google.api.Monitoring.MonitoringDestination.Builder, com.google.api.Monitoring.MonitoringDestinationOrBuilder> - getProducerDestinationsFieldBuilder() { - if (producerDestinationsBuilder_ == null) { - producerDestinationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.api.Monitoring.MonitoringDestination, com.google.api.Monitoring.MonitoringDestination.Builder, com.google.api.Monitoring.MonitoringDestinationOrBuilder>( - producerDestinations_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - producerDestinations_ = null; - } - return producerDestinationsBuilder_; - } - - private java.util.List consumerDestinations_ = - java.util.Collections.emptyList(); - private void ensureConsumerDestinationsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - consumerDestinations_ = new java.util.ArrayList(consumerDestinations_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.Monitoring.MonitoringDestination, com.google.api.Monitoring.MonitoringDestination.Builder, com.google.api.Monitoring.MonitoringDestinationOrBuilder> consumerDestinationsBuilder_; - - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-     * Monitoring configurations for sending metrics to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one consumer destination.
-     * 
- */ - public java.util.List getConsumerDestinationsList() { - if (consumerDestinationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(consumerDestinations_); - } else { - return consumerDestinationsBuilder_.getMessageList(); - } - } - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-     * Monitoring configurations for sending metrics to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one consumer destination.
-     * 
- */ - public int getConsumerDestinationsCount() { - if (consumerDestinationsBuilder_ == null) { - return consumerDestinations_.size(); - } else { - return consumerDestinationsBuilder_.getCount(); - } - } - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-     * Monitoring configurations for sending metrics to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one consumer destination.
-     * 
- */ - public com.google.api.Monitoring.MonitoringDestination getConsumerDestinations(int index) { - if (consumerDestinationsBuilder_ == null) { - return consumerDestinations_.get(index); - } else { - return consumerDestinationsBuilder_.getMessage(index); - } - } - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-     * Monitoring configurations for sending metrics to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one consumer destination.
-     * 
- */ - public Builder setConsumerDestinations( - int index, com.google.api.Monitoring.MonitoringDestination value) { - if (consumerDestinationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConsumerDestinationsIsMutable(); - consumerDestinations_.set(index, value); - onChanged(); - } else { - consumerDestinationsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-     * Monitoring configurations for sending metrics to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one consumer destination.
-     * 
- */ - public Builder setConsumerDestinations( - int index, com.google.api.Monitoring.MonitoringDestination.Builder builderForValue) { - if (consumerDestinationsBuilder_ == null) { - ensureConsumerDestinationsIsMutable(); - consumerDestinations_.set(index, builderForValue.build()); - onChanged(); - } else { - consumerDestinationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-     * Monitoring configurations for sending metrics to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one consumer destination.
-     * 
- */ - public Builder addConsumerDestinations(com.google.api.Monitoring.MonitoringDestination value) { - if (consumerDestinationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConsumerDestinationsIsMutable(); - consumerDestinations_.add(value); - onChanged(); - } else { - consumerDestinationsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-     * Monitoring configurations for sending metrics to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one consumer destination.
-     * 
- */ - public Builder addConsumerDestinations( - int index, com.google.api.Monitoring.MonitoringDestination value) { - if (consumerDestinationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConsumerDestinationsIsMutable(); - consumerDestinations_.add(index, value); - onChanged(); - } else { - consumerDestinationsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-     * Monitoring configurations for sending metrics to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one consumer destination.
-     * 
- */ - public Builder addConsumerDestinations( - com.google.api.Monitoring.MonitoringDestination.Builder builderForValue) { - if (consumerDestinationsBuilder_ == null) { - ensureConsumerDestinationsIsMutable(); - consumerDestinations_.add(builderForValue.build()); - onChanged(); - } else { - consumerDestinationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-     * Monitoring configurations for sending metrics to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one consumer destination.
-     * 
- */ - public Builder addConsumerDestinations( - int index, com.google.api.Monitoring.MonitoringDestination.Builder builderForValue) { - if (consumerDestinationsBuilder_ == null) { - ensureConsumerDestinationsIsMutable(); - consumerDestinations_.add(index, builderForValue.build()); - onChanged(); - } else { - consumerDestinationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-     * Monitoring configurations for sending metrics to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one consumer destination.
-     * 
- */ - public Builder addAllConsumerDestinations( - java.lang.Iterable values) { - if (consumerDestinationsBuilder_ == null) { - ensureConsumerDestinationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, consumerDestinations_); - onChanged(); - } else { - consumerDestinationsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-     * Monitoring configurations for sending metrics to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one consumer destination.
-     * 
- */ - public Builder clearConsumerDestinations() { - if (consumerDestinationsBuilder_ == null) { - consumerDestinations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - consumerDestinationsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-     * Monitoring configurations for sending metrics to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one consumer destination.
-     * 
- */ - public Builder removeConsumerDestinations(int index) { - if (consumerDestinationsBuilder_ == null) { - ensureConsumerDestinationsIsMutable(); - consumerDestinations_.remove(index); - onChanged(); - } else { - consumerDestinationsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-     * Monitoring configurations for sending metrics to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one consumer destination.
-     * 
- */ - public com.google.api.Monitoring.MonitoringDestination.Builder getConsumerDestinationsBuilder( - int index) { - return getConsumerDestinationsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-     * Monitoring configurations for sending metrics to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one consumer destination.
-     * 
- */ - public com.google.api.Monitoring.MonitoringDestinationOrBuilder getConsumerDestinationsOrBuilder( - int index) { - if (consumerDestinationsBuilder_ == null) { - return consumerDestinations_.get(index); } else { - return consumerDestinationsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-     * Monitoring configurations for sending metrics to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one consumer destination.
-     * 
- */ - public java.util.List - getConsumerDestinationsOrBuilderList() { - if (consumerDestinationsBuilder_ != null) { - return consumerDestinationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(consumerDestinations_); - } - } - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-     * Monitoring configurations for sending metrics to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one consumer destination.
-     * 
- */ - public com.google.api.Monitoring.MonitoringDestination.Builder addConsumerDestinationsBuilder() { - return getConsumerDestinationsFieldBuilder().addBuilder( - com.google.api.Monitoring.MonitoringDestination.getDefaultInstance()); - } - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-     * Monitoring configurations for sending metrics to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one consumer destination.
-     * 
- */ - public com.google.api.Monitoring.MonitoringDestination.Builder addConsumerDestinationsBuilder( - int index) { - return getConsumerDestinationsFieldBuilder().addBuilder( - index, com.google.api.Monitoring.MonitoringDestination.getDefaultInstance()); - } - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-     * Monitoring configurations for sending metrics to the consumer project.
-     * There can be multiple consumer destinations, each one must have a
-     * different monitored resource type. A metric can be used in at most
-     * one consumer destination.
-     * 
- */ - public java.util.List - getConsumerDestinationsBuilderList() { - return getConsumerDestinationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.Monitoring.MonitoringDestination, com.google.api.Monitoring.MonitoringDestination.Builder, com.google.api.Monitoring.MonitoringDestinationOrBuilder> - getConsumerDestinationsFieldBuilder() { - if (consumerDestinationsBuilder_ == null) { - consumerDestinationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.api.Monitoring.MonitoringDestination, com.google.api.Monitoring.MonitoringDestination.Builder, com.google.api.Monitoring.MonitoringDestinationOrBuilder>( - consumerDestinations_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - consumerDestinations_ = null; - } - return consumerDestinationsBuilder_; - } - 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.Monitoring) - } - - // @@protoc_insertion_point(class_scope:google.api.Monitoring) - private static final com.google.api.Monitoring DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.Monitoring(); - } - - public static com.google.api.Monitoring getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Monitoring parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Monitoring(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.Monitoring getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoringOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoringOrBuilder.java deleted file mode 100644 index 4c47de40aed8..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoringOrBuilder.java +++ /dev/null @@ -1,127 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/monitoring.proto - -package com.google.api; - -public interface MonitoringOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.Monitoring) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-   * Monitoring configurations for sending metrics to the producer project.
-   * There can be multiple producer destinations, each one must have a
-   * different monitored resource type. A metric can be used in at most
-   * one producer destination.
-   * 
- */ - java.util.List - getProducerDestinationsList(); - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-   * Monitoring configurations for sending metrics to the producer project.
-   * There can be multiple producer destinations, each one must have a
-   * different monitored resource type. A metric can be used in at most
-   * one producer destination.
-   * 
- */ - com.google.api.Monitoring.MonitoringDestination getProducerDestinations(int index); - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-   * Monitoring configurations for sending metrics to the producer project.
-   * There can be multiple producer destinations, each one must have a
-   * different monitored resource type. A metric can be used in at most
-   * one producer destination.
-   * 
- */ - int getProducerDestinationsCount(); - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-   * Monitoring configurations for sending metrics to the producer project.
-   * There can be multiple producer destinations, each one must have a
-   * different monitored resource type. A metric can be used in at most
-   * one producer destination.
-   * 
- */ - java.util.List - getProducerDestinationsOrBuilderList(); - /** - * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - * - *
-   * Monitoring configurations for sending metrics to the producer project.
-   * There can be multiple producer destinations, each one must have a
-   * different monitored resource type. A metric can be used in at most
-   * one producer destination.
-   * 
- */ - com.google.api.Monitoring.MonitoringDestinationOrBuilder getProducerDestinationsOrBuilder( - int index); - - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-   * Monitoring configurations for sending metrics to the consumer project.
-   * There can be multiple consumer destinations, each one must have a
-   * different monitored resource type. A metric can be used in at most
-   * one consumer destination.
-   * 
- */ - java.util.List - getConsumerDestinationsList(); - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-   * Monitoring configurations for sending metrics to the consumer project.
-   * There can be multiple consumer destinations, each one must have a
-   * different monitored resource type. A metric can be used in at most
-   * one consumer destination.
-   * 
- */ - com.google.api.Monitoring.MonitoringDestination getConsumerDestinations(int index); - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-   * Monitoring configurations for sending metrics to the consumer project.
-   * There can be multiple consumer destinations, each one must have a
-   * different monitored resource type. A metric can be used in at most
-   * one consumer destination.
-   * 
- */ - int getConsumerDestinationsCount(); - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-   * Monitoring configurations for sending metrics to the consumer project.
-   * There can be multiple consumer destinations, each one must have a
-   * different monitored resource type. A metric can be used in at most
-   * one consumer destination.
-   * 
- */ - java.util.List - getConsumerDestinationsOrBuilderList(); - /** - * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - * - *
-   * Monitoring configurations for sending metrics to the consumer project.
-   * There can be multiple consumer destinations, each one must have a
-   * different monitored resource type. A metric can be used in at most
-   * one consumer destination.
-   * 
- */ - com.google.api.Monitoring.MonitoringDestinationOrBuilder getConsumerDestinationsOrBuilder( - int index); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoringProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoringProto.java deleted file mode 100644 index a88e408696e2..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoringProto.java +++ /dev/null @@ -1,72 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/monitoring.proto - -package com.google.api; - -public final class MonitoringProto { - private MonitoringProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_Monitoring_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_Monitoring_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_Monitoring_MonitoringDestination_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_Monitoring_MonitoringDestination_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/monitoring.proto\022\ngoogle.ap" + - "i\032\034google/api/annotations.proto\032\'google/" + - "api/service_control_access.proto\"\354\001\n\nMon" + - "itoring\022K\n\025producer_destinations\030\001 \003(\0132," + - ".google.api.Monitoring.MonitoringDestina" + - "tion\022K\n\025consumer_destinations\030\002 \003(\0132,.go" + - "ogle.api.Monitoring.MonitoringDestinatio" + - "n\032D\n\025MonitoringDestination\022\032\n\022monitored_" + - "resource\030\001 \001(\t\022\017\n\007metrics\030\002 \003(\tB#\n\016com.g" + - "oogle.apiB\017MonitoringProtoP\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.api.ServiceControlAccessProto.getDescriptor(), - }, assigner); - internal_static_google_api_Monitoring_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_api_Monitoring_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_Monitoring_descriptor, - new java.lang.String[] { "ProducerDestinations", "ConsumerDestinations", }); - internal_static_google_api_Monitoring_MonitoringDestination_descriptor = - internal_static_google_api_Monitoring_descriptor.getNestedTypes().get(0); - internal_static_google_api_Monitoring_MonitoringDestination_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_Monitoring_MonitoringDestination_descriptor, - new java.lang.String[] { "MonitoredResource", "Metrics", }); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ServiceControlAccessProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/OAuthRequirements.java b/gcloud-java-gax/generated/src/main/java/com/google/api/OAuthRequirements.java deleted file mode 100644 index 907dd4d8a721..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/OAuthRequirements.java +++ /dev/null @@ -1,532 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/auth.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.OAuthRequirements} - * - *
- * OAuth scopes are a way to define data and permissions on data. For example,
- * there are scopes defined for "Read-only access to Google Calendar" and
- * "Access to Cloud Platform". Users can consent to a scope for an application,
- * giving it permission to access that data on their behalf.
- * OAuth scope specifications should be fairly coarse grained; a user will need
- * to see and understand the text description of what your scope means.
- * In most cases: use one or at most two OAuth scopes for an entire family of
- * products.  If your product has multiple APIs, you should probably be sharing
- * the OAuth scope across all of those APIs.
- * When you need finer grained OAuth consent screens: talk with your product
- * management about how developers will use them in practice.
- * (--GOOGLE_INTERNAL Do not do this:
- * https://screenshot.googleplex.com/PHqgZGxetu.png
- * See http://go/apiscopes for documentation on how to create
- * a new API scope if you need one. --)
- * 
- */ -public final class OAuthRequirements extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.OAuthRequirements) - OAuthRequirementsOrBuilder { - // Use OAuthRequirements.newBuilder() to construct. - private OAuthRequirements(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private OAuthRequirements() { - canonicalScopes_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private OAuthRequirements( - 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(); - - canonicalScopes_ = 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.AuthProto.internal_static_google_api_OAuthRequirements_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.AuthProto.internal_static_google_api_OAuthRequirements_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.OAuthRequirements.class, com.google.api.OAuthRequirements.Builder.class); - } - - public static final int CANONICAL_SCOPES_FIELD_NUMBER = 1; - private volatile java.lang.Object canonicalScopes_; - /** - * optional string canonical_scopes = 1; - * - *
-   * The list of publicly documented OAuth scopes that are allowed access. An
-   * OAuth token containing any of these scopes will be accepted.
-   * Example:
-   *      canonical_scopes: https://www.googleapis.com/auth/calendar,
-   *                        https://www.googleapis.com/auth/calendar.read
-   * 
- */ - public java.lang.String getCanonicalScopes() { - java.lang.Object ref = canonicalScopes_; - 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(); - canonicalScopes_ = s; - return s; - } - } - /** - * optional string canonical_scopes = 1; - * - *
-   * The list of publicly documented OAuth scopes that are allowed access. An
-   * OAuth token containing any of these scopes will be accepted.
-   * Example:
-   *      canonical_scopes: https://www.googleapis.com/auth/calendar,
-   *                        https://www.googleapis.com/auth/calendar.read
-   * 
- */ - public com.google.protobuf.ByteString - getCanonicalScopesBytes() { - java.lang.Object ref = canonicalScopes_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - canonicalScopes_ = 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 (!getCanonicalScopesBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, canonicalScopes_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getCanonicalScopesBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, canonicalScopes_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.OAuthRequirements parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.OAuthRequirements 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.OAuthRequirements parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.OAuthRequirements parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.OAuthRequirements parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.OAuthRequirements parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.OAuthRequirements parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.OAuthRequirements parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.OAuthRequirements parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.OAuthRequirements 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.OAuthRequirements 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.OAuthRequirements} - * - *
-   * OAuth scopes are a way to define data and permissions on data. For example,
-   * there are scopes defined for "Read-only access to Google Calendar" and
-   * "Access to Cloud Platform". Users can consent to a scope for an application,
-   * giving it permission to access that data on their behalf.
-   * OAuth scope specifications should be fairly coarse grained; a user will need
-   * to see and understand the text description of what your scope means.
-   * In most cases: use one or at most two OAuth scopes for an entire family of
-   * products.  If your product has multiple APIs, you should probably be sharing
-   * the OAuth scope across all of those APIs.
-   * When you need finer grained OAuth consent screens: talk with your product
-   * management about how developers will use them in practice.
-   * (--GOOGLE_INTERNAL Do not do this:
-   * https://screenshot.googleplex.com/PHqgZGxetu.png
-   * See http://go/apiscopes for documentation on how to create
-   * a new API scope if you need one. --)
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.OAuthRequirements) - com.google.api.OAuthRequirementsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.AuthProto.internal_static_google_api_OAuthRequirements_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.AuthProto.internal_static_google_api_OAuthRequirements_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.OAuthRequirements.class, com.google.api.OAuthRequirements.Builder.class); - } - - // Construct using com.google.api.OAuthRequirements.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(); - canonicalScopes_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.AuthProto.internal_static_google_api_OAuthRequirements_descriptor; - } - - public com.google.api.OAuthRequirements getDefaultInstanceForType() { - return com.google.api.OAuthRequirements.getDefaultInstance(); - } - - public com.google.api.OAuthRequirements build() { - com.google.api.OAuthRequirements result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.OAuthRequirements buildPartial() { - com.google.api.OAuthRequirements result = new com.google.api.OAuthRequirements(this); - result.canonicalScopes_ = canonicalScopes_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.OAuthRequirements) { - return mergeFrom((com.google.api.OAuthRequirements)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.OAuthRequirements other) { - if (other == com.google.api.OAuthRequirements.getDefaultInstance()) return this; - if (!other.getCanonicalScopes().isEmpty()) { - canonicalScopes_ = other.canonicalScopes_; - 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.OAuthRequirements parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.OAuthRequirements) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object canonicalScopes_ = ""; - /** - * optional string canonical_scopes = 1; - * - *
-     * The list of publicly documented OAuth scopes that are allowed access. An
-     * OAuth token containing any of these scopes will be accepted.
-     * Example:
-     *      canonical_scopes: https://www.googleapis.com/auth/calendar,
-     *                        https://www.googleapis.com/auth/calendar.read
-     * 
- */ - public java.lang.String getCanonicalScopes() { - java.lang.Object ref = canonicalScopes_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - canonicalScopes_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string canonical_scopes = 1; - * - *
-     * The list of publicly documented OAuth scopes that are allowed access. An
-     * OAuth token containing any of these scopes will be accepted.
-     * Example:
-     *      canonical_scopes: https://www.googleapis.com/auth/calendar,
-     *                        https://www.googleapis.com/auth/calendar.read
-     * 
- */ - public com.google.protobuf.ByteString - getCanonicalScopesBytes() { - java.lang.Object ref = canonicalScopes_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - canonicalScopes_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string canonical_scopes = 1; - * - *
-     * The list of publicly documented OAuth scopes that are allowed access. An
-     * OAuth token containing any of these scopes will be accepted.
-     * Example:
-     *      canonical_scopes: https://www.googleapis.com/auth/calendar,
-     *                        https://www.googleapis.com/auth/calendar.read
-     * 
- */ - public Builder setCanonicalScopes( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - canonicalScopes_ = value; - onChanged(); - return this; - } - /** - * optional string canonical_scopes = 1; - * - *
-     * The list of publicly documented OAuth scopes that are allowed access. An
-     * OAuth token containing any of these scopes will be accepted.
-     * Example:
-     *      canonical_scopes: https://www.googleapis.com/auth/calendar,
-     *                        https://www.googleapis.com/auth/calendar.read
-     * 
- */ - public Builder clearCanonicalScopes() { - - canonicalScopes_ = getDefaultInstance().getCanonicalScopes(); - onChanged(); - return this; - } - /** - * optional string canonical_scopes = 1; - * - *
-     * The list of publicly documented OAuth scopes that are allowed access. An
-     * OAuth token containing any of these scopes will be accepted.
-     * Example:
-     *      canonical_scopes: https://www.googleapis.com/auth/calendar,
-     *                        https://www.googleapis.com/auth/calendar.read
-     * 
- */ - public Builder setCanonicalScopesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - canonicalScopes_ = 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.OAuthRequirements) - } - - // @@protoc_insertion_point(class_scope:google.api.OAuthRequirements) - private static final com.google.api.OAuthRequirements DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.OAuthRequirements(); - } - - public static com.google.api.OAuthRequirements getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public OAuthRequirements parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new OAuthRequirements(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.OAuthRequirements getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/OAuthRequirementsOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/OAuthRequirementsOrBuilder.java deleted file mode 100644 index eaec6e43bf52..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/OAuthRequirementsOrBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/auth.proto - -package com.google.api; - -public interface OAuthRequirementsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.OAuthRequirements) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string canonical_scopes = 1; - * - *
-   * The list of publicly documented OAuth scopes that are allowed access. An
-   * OAuth token containing any of these scopes will be accepted.
-   * Example:
-   *      canonical_scopes: https://www.googleapis.com/auth/calendar,
-   *                        https://www.googleapis.com/auth/calendar.read
-   * 
- */ - java.lang.String getCanonicalScopes(); - /** - * optional string canonical_scopes = 1; - * - *
-   * The list of publicly documented OAuth scopes that are allowed access. An
-   * OAuth token containing any of these scopes will be accepted.
-   * Example:
-   *      canonical_scopes: https://www.googleapis.com/auth/calendar,
-   *                        https://www.googleapis.com/auth/calendar.read
-   * 
- */ - com.google.protobuf.ByteString - getCanonicalScopesBytes(); -} 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 dc6630982d66..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/Service.java +++ /dev/null @@ -1,7113 +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(); - logs_ = java.util.Collections.emptyList(); - metrics_ = java.util.Collections.emptyList(); - monitoredResources_ = 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 90: { - com.google.api.Authentication.Builder subBuilder = null; - if (authentication_ != null) { - subBuilder = authentication_.toBuilder(); - } - authentication_ = input.readMessage(com.google.api.Authentication.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(authentication_); - authentication_ = 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 122: { - com.google.api.Usage.Builder subBuilder = null; - if (usage_ != null) { - subBuilder = usage_.toBuilder(); - } - usage_ = input.readMessage(com.google.api.Usage.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(usage_); - usage_ = 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 170: { - com.google.api.Control.Builder subBuilder = null; - if (control_ != null) { - subBuilder = control_.toBuilder(); - } - control_ = input.readMessage(com.google.api.Control.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(control_); - control_ = subBuilder.buildPartial(); - } - - break; - } - case 178: { - String s = input.readStringRequireUtf8(); - - producerProjectId_ = s; - break; - } - case 186: { - if (!((mutable_bitField0_ & 0x00008000) == 0x00008000)) { - logs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00008000; - } - logs_.add(input.readMessage(com.google.api.LogDescriptor.parser(), extensionRegistry)); - break; - } - case 194: { - if (!((mutable_bitField0_ & 0x00010000) == 0x00010000)) { - metrics_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00010000; - } - metrics_.add(input.readMessage(com.google.api.MetricDescriptor.parser(), extensionRegistry)); - break; - } - case 202: { - if (!((mutable_bitField0_ & 0x00020000) == 0x00020000)) { - monitoredResources_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00020000; - } - monitoredResources_.add(input.readMessage(com.google.api.MonitoredResourceDescriptor.parser(), extensionRegistry)); - break; - } - case 218: { - com.google.api.Logging.Builder subBuilder = null; - if (logging_ != null) { - subBuilder = logging_.toBuilder(); - } - logging_ = input.readMessage(com.google.api.Logging.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(logging_); - logging_ = subBuilder.buildPartial(); - } - - break; - } - case 226: { - com.google.api.Monitoring.Builder subBuilder = null; - if (monitoring_ != null) { - subBuilder = monitoring_.toBuilder(); - } - monitoring_ = input.readMessage(com.google.api.Monitoring.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(monitoring_); - monitoring_ = subBuilder.buildPartial(); - } - - 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_ & 0x00200000) == 0x00200000)) { - systemTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00200000; - } - 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_ & 0x00008000) == 0x00008000)) { - logs_ = java.util.Collections.unmodifiableList(logs_); - } - if (((mutable_bitField0_ & 0x00010000) == 0x00010000)) { - metrics_ = java.util.Collections.unmodifiableList(metrics_); - } - if (((mutable_bitField0_ & 0x00020000) == 0x00020000)) { - monitoredResources_ = java.util.Collections.unmodifiableList(monitoredResources_); - } - if (((mutable_bitField0_ & 0x00200000) == 0x00200000)) { - 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 AUTHENTICATION_FIELD_NUMBER = 11; - private com.google.api.Authentication authentication_; - /** - * optional .google.api.Authentication authentication = 11; - * - *
-   * Auth configuration.
-   * 
- */ - public boolean hasAuthentication() { - return authentication_ != null; - } - /** - * optional .google.api.Authentication authentication = 11; - * - *
-   * Auth configuration.
-   * 
- */ - public com.google.api.Authentication getAuthentication() { - return authentication_ == null ? com.google.api.Authentication.getDefaultInstance() : authentication_; - } - /** - * optional .google.api.Authentication authentication = 11; - * - *
-   * Auth configuration.
-   * 
- */ - public com.google.api.AuthenticationOrBuilder getAuthenticationOrBuilder() { - return getAuthentication(); - } - - 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 USAGE_FIELD_NUMBER = 15; - private com.google.api.Usage usage_; - /** - * optional .google.api.Usage usage = 15; - * - *
-   * Configuration controlling usage of this service.
-   * 
- */ - public boolean hasUsage() { - return usage_ != null; - } - /** - * optional .google.api.Usage usage = 15; - * - *
-   * Configuration controlling usage of this service.
-   * 
- */ - public com.google.api.Usage getUsage() { - return usage_ == null ? com.google.api.Usage.getDefaultInstance() : usage_; - } - /** - * optional .google.api.Usage usage = 15; - * - *
-   * Configuration controlling usage of this service.
-   * 
- */ - public com.google.api.UsageOrBuilder getUsageOrBuilder() { - return getUsage(); - } - - 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 CONTROL_FIELD_NUMBER = 21; - private com.google.api.Control control_; - /** - * optional .google.api.Control control = 21; - * - *
-   * Configuration for the service control plane.
-   * 
- */ - public boolean hasControl() { - return control_ != null; - } - /** - * optional .google.api.Control control = 21; - * - *
-   * Configuration for the service control plane.
-   * 
- */ - public com.google.api.Control getControl() { - return control_ == null ? com.google.api.Control.getDefaultInstance() : control_; - } - /** - * optional .google.api.Control control = 21; - * - *
-   * Configuration for the service control plane.
-   * 
- */ - public com.google.api.ControlOrBuilder getControlOrBuilder() { - return getControl(); - } - - public static final int LOGS_FIELD_NUMBER = 23; - private java.util.List logs_; - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-   * Defines the logs used by this service.
-   * 
- */ - public java.util.List getLogsList() { - return logs_; - } - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-   * Defines the logs used by this service.
-   * 
- */ - public java.util.List - getLogsOrBuilderList() { - return logs_; - } - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-   * Defines the logs used by this service.
-   * 
- */ - public int getLogsCount() { - return logs_.size(); - } - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-   * Defines the logs used by this service.
-   * 
- */ - public com.google.api.LogDescriptor getLogs(int index) { - return logs_.get(index); - } - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-   * Defines the logs used by this service.
-   * 
- */ - public com.google.api.LogDescriptorOrBuilder getLogsOrBuilder( - int index) { - return logs_.get(index); - } - - public static final int METRICS_FIELD_NUMBER = 24; - private java.util.List metrics_; - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-   * Defines the metrics used by this service.
-   * 
- */ - public java.util.List getMetricsList() { - return metrics_; - } - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-   * Defines the metrics used by this service.
-   * 
- */ - public java.util.List - getMetricsOrBuilderList() { - return metrics_; - } - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-   * Defines the metrics used by this service.
-   * 
- */ - public int getMetricsCount() { - return metrics_.size(); - } - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-   * Defines the metrics used by this service.
-   * 
- */ - public com.google.api.MetricDescriptor getMetrics(int index) { - return metrics_.get(index); - } - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-   * Defines the metrics used by this service.
-   * 
- */ - public com.google.api.MetricDescriptorOrBuilder getMetricsOrBuilder( - int index) { - return metrics_.get(index); - } - - public static final int MONITORED_RESOURCES_FIELD_NUMBER = 25; - private java.util.List monitoredResources_; - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-   * Defines the monitored resources used by this service. This is required
-   * by the [Service.monitoring][] configuration.
-   * (-- GOOGLE_INTERNAL: owners of Google services must review their
-   * monitored resource configuration with Monarch team and Chemist team
-   * to ensure consistency. See go/new-cloud-monitoring-howto and
-   * go/chemist-onboarding for details, and contact chemist-dev@google.com
-   * for help. --)
-   * 
- */ - public java.util.List getMonitoredResourcesList() { - return monitoredResources_; - } - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-   * Defines the monitored resources used by this service. This is required
-   * by the [Service.monitoring][] configuration.
-   * (-- GOOGLE_INTERNAL: owners of Google services must review their
-   * monitored resource configuration with Monarch team and Chemist team
-   * to ensure consistency. See go/new-cloud-monitoring-howto and
-   * go/chemist-onboarding for details, and contact chemist-dev@google.com
-   * for help. --)
-   * 
- */ - public java.util.List - getMonitoredResourcesOrBuilderList() { - return monitoredResources_; - } - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-   * Defines the monitored resources used by this service. This is required
-   * by the [Service.monitoring][] configuration.
-   * (-- GOOGLE_INTERNAL: owners of Google services must review their
-   * monitored resource configuration with Monarch team and Chemist team
-   * to ensure consistency. See go/new-cloud-monitoring-howto and
-   * go/chemist-onboarding for details, and contact chemist-dev@google.com
-   * for help. --)
-   * 
- */ - public int getMonitoredResourcesCount() { - return monitoredResources_.size(); - } - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-   * Defines the monitored resources used by this service. This is required
-   * by the [Service.monitoring][] configuration.
-   * (-- GOOGLE_INTERNAL: owners of Google services must review their
-   * monitored resource configuration with Monarch team and Chemist team
-   * to ensure consistency. See go/new-cloud-monitoring-howto and
-   * go/chemist-onboarding for details, and contact chemist-dev@google.com
-   * for help. --)
-   * 
- */ - public com.google.api.MonitoredResourceDescriptor getMonitoredResources(int index) { - return monitoredResources_.get(index); - } - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-   * Defines the monitored resources used by this service. This is required
-   * by the [Service.monitoring][] configuration.
-   * (-- GOOGLE_INTERNAL: owners of Google services must review their
-   * monitored resource configuration with Monarch team and Chemist team
-   * to ensure consistency. See go/new-cloud-monitoring-howto and
-   * go/chemist-onboarding for details, and contact chemist-dev@google.com
-   * for help. --)
-   * 
- */ - public com.google.api.MonitoredResourceDescriptorOrBuilder getMonitoredResourcesOrBuilder( - int index) { - return monitoredResources_.get(index); - } - - public static final int LOGGING_FIELD_NUMBER = 27; - private com.google.api.Logging logging_; - /** - * optional .google.api.Logging logging = 27; - * - *
-   * Logging configuration of the service.
-   * 
- */ - public boolean hasLogging() { - return logging_ != null; - } - /** - * optional .google.api.Logging logging = 27; - * - *
-   * Logging configuration of the service.
-   * 
- */ - public com.google.api.Logging getLogging() { - return logging_ == null ? com.google.api.Logging.getDefaultInstance() : logging_; - } - /** - * optional .google.api.Logging logging = 27; - * - *
-   * Logging configuration of the service.
-   * 
- */ - public com.google.api.LoggingOrBuilder getLoggingOrBuilder() { - return getLogging(); - } - - public static final int MONITORING_FIELD_NUMBER = 28; - private com.google.api.Monitoring monitoring_; - /** - * optional .google.api.Monitoring monitoring = 28; - * - *
-   * Monitoring configuration of the service.
-   * 
- */ - public boolean hasMonitoring() { - return monitoring_ != null; - } - /** - * optional .google.api.Monitoring monitoring = 28; - * - *
-   * Monitoring configuration of the service.
-   * 
- */ - public com.google.api.Monitoring getMonitoring() { - return monitoring_ == null ? com.google.api.Monitoring.getDefaultInstance() : monitoring_; - } - /** - * optional .google.api.Monitoring monitoring = 28; - * - *
-   * Monitoring configuration of the service.
-   * 
- */ - public com.google.api.MonitoringOrBuilder getMonitoringOrBuilder() { - return getMonitoring(); - } - - 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 (authentication_ != null) { - output.writeMessage(11, getAuthentication()); - } - if (context_ != null) { - output.writeMessage(12, getContext()); - } - if (usage_ != null) { - output.writeMessage(15, getUsage()); - } - if (customError_ != null) { - output.writeMessage(16, getCustomError()); - } - if (configVersion_ != null) { - output.writeMessage(20, getConfigVersion()); - } - if (control_ != null) { - output.writeMessage(21, getControl()); - } - if (!getProducerProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 22, producerProjectId_); - } - for (int i = 0; i < logs_.size(); i++) { - output.writeMessage(23, logs_.get(i)); - } - for (int i = 0; i < metrics_.size(); i++) { - output.writeMessage(24, metrics_.get(i)); - } - for (int i = 0; i < monitoredResources_.size(); i++) { - output.writeMessage(25, monitoredResources_.get(i)); - } - if (logging_ != null) { - output.writeMessage(27, getLogging()); - } - if (monitoring_ != null) { - output.writeMessage(28, getMonitoring()); - } - 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 (authentication_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, getAuthentication()); - } - if (context_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, getContext()); - } - if (usage_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(15, getUsage()); - } - if (customError_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(16, getCustomError()); - } - if (configVersion_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(20, getConfigVersion()); - } - if (control_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(21, getControl()); - } - if (!getProducerProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(22, producerProjectId_); - } - for (int i = 0; i < logs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(23, logs_.get(i)); - } - for (int i = 0; i < metrics_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(24, metrics_.get(i)); - } - for (int i = 0; i < monitoredResources_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(25, monitoredResources_.get(i)); - } - if (logging_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(27, getLogging()); - } - if (monitoring_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(28, getMonitoring()); - } - 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(); - getLogsFieldBuilder(); - getMetricsFieldBuilder(); - getMonitoredResourcesFieldBuilder(); - 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 (authenticationBuilder_ == null) { - authentication_ = null; - } else { - authentication_ = null; - authenticationBuilder_ = null; - } - if (contextBuilder_ == null) { - context_ = null; - } else { - context_ = null; - contextBuilder_ = null; - } - if (usageBuilder_ == null) { - usage_ = null; - } else { - usage_ = null; - usageBuilder_ = null; - } - if (customErrorBuilder_ == null) { - customError_ = null; - } else { - customError_ = null; - customErrorBuilder_ = null; - } - if (controlBuilder_ == null) { - control_ = null; - } else { - control_ = null; - controlBuilder_ = null; - } - if (logsBuilder_ == null) { - logs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00008000); - } else { - logsBuilder_.clear(); - } - if (metricsBuilder_ == null) { - metrics_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00010000); - } else { - metricsBuilder_.clear(); - } - if (monitoredResourcesBuilder_ == null) { - monitoredResources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00020000); - } else { - monitoredResourcesBuilder_.clear(); - } - if (loggingBuilder_ == null) { - logging_ = null; - } else { - logging_ = null; - loggingBuilder_ = null; - } - if (monitoringBuilder_ == null) { - monitoring_ = null; - } else { - monitoring_ = null; - monitoringBuilder_ = null; - } - if (derivedDataBuilder_ == null) { - derivedData_ = null; - } else { - derivedData_ = null; - derivedDataBuilder_ = null; - } - if (systemTypesBuilder_ == null) { - systemTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00200000); - } 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 (authenticationBuilder_ == null) { - result.authentication_ = authentication_; - } else { - result.authentication_ = authenticationBuilder_.build(); - } - if (contextBuilder_ == null) { - result.context_ = context_; - } else { - result.context_ = contextBuilder_.build(); - } - if (usageBuilder_ == null) { - result.usage_ = usage_; - } else { - result.usage_ = usageBuilder_.build(); - } - if (customErrorBuilder_ == null) { - result.customError_ = customError_; - } else { - result.customError_ = customErrorBuilder_.build(); - } - if (controlBuilder_ == null) { - result.control_ = control_; - } else { - result.control_ = controlBuilder_.build(); - } - if (logsBuilder_ == null) { - if (((bitField0_ & 0x00008000) == 0x00008000)) { - logs_ = java.util.Collections.unmodifiableList(logs_); - bitField0_ = (bitField0_ & ~0x00008000); - } - result.logs_ = logs_; - } else { - result.logs_ = logsBuilder_.build(); - } - if (metricsBuilder_ == null) { - if (((bitField0_ & 0x00010000) == 0x00010000)) { - metrics_ = java.util.Collections.unmodifiableList(metrics_); - bitField0_ = (bitField0_ & ~0x00010000); - } - result.metrics_ = metrics_; - } else { - result.metrics_ = metricsBuilder_.build(); - } - if (monitoredResourcesBuilder_ == null) { - if (((bitField0_ & 0x00020000) == 0x00020000)) { - monitoredResources_ = java.util.Collections.unmodifiableList(monitoredResources_); - bitField0_ = (bitField0_ & ~0x00020000); - } - result.monitoredResources_ = monitoredResources_; - } else { - result.monitoredResources_ = monitoredResourcesBuilder_.build(); - } - if (loggingBuilder_ == null) { - result.logging_ = logging_; - } else { - result.logging_ = loggingBuilder_.build(); - } - if (monitoringBuilder_ == null) { - result.monitoring_ = monitoring_; - } else { - result.monitoring_ = monitoringBuilder_.build(); - } - if (derivedDataBuilder_ == null) { - result.derivedData_ = derivedData_; - } else { - result.derivedData_ = derivedDataBuilder_.build(); - } - if (systemTypesBuilder_ == null) { - if (((bitField0_ & 0x00200000) == 0x00200000)) { - systemTypes_ = java.util.Collections.unmodifiableList(systemTypes_); - bitField0_ = (bitField0_ & ~0x00200000); - } - 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.hasAuthentication()) { - mergeAuthentication(other.getAuthentication()); - } - if (other.hasContext()) { - mergeContext(other.getContext()); - } - if (other.hasUsage()) { - mergeUsage(other.getUsage()); - } - if (other.hasCustomError()) { - mergeCustomError(other.getCustomError()); - } - if (other.hasControl()) { - mergeControl(other.getControl()); - } - if (logsBuilder_ == null) { - if (!other.logs_.isEmpty()) { - if (logs_.isEmpty()) { - logs_ = other.logs_; - bitField0_ = (bitField0_ & ~0x00008000); - } else { - ensureLogsIsMutable(); - logs_.addAll(other.logs_); - } - onChanged(); - } - } else { - if (!other.logs_.isEmpty()) { - if (logsBuilder_.isEmpty()) { - logsBuilder_.dispose(); - logsBuilder_ = null; - logs_ = other.logs_; - bitField0_ = (bitField0_ & ~0x00008000); - logsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getLogsFieldBuilder() : null; - } else { - logsBuilder_.addAllMessages(other.logs_); - } - } - } - if (metricsBuilder_ == null) { - if (!other.metrics_.isEmpty()) { - if (metrics_.isEmpty()) { - metrics_ = other.metrics_; - bitField0_ = (bitField0_ & ~0x00010000); - } else { - ensureMetricsIsMutable(); - metrics_.addAll(other.metrics_); - } - onChanged(); - } - } else { - if (!other.metrics_.isEmpty()) { - if (metricsBuilder_.isEmpty()) { - metricsBuilder_.dispose(); - metricsBuilder_ = null; - metrics_ = other.metrics_; - bitField0_ = (bitField0_ & ~0x00010000); - metricsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getMetricsFieldBuilder() : null; - } else { - metricsBuilder_.addAllMessages(other.metrics_); - } - } - } - if (monitoredResourcesBuilder_ == null) { - if (!other.monitoredResources_.isEmpty()) { - if (monitoredResources_.isEmpty()) { - monitoredResources_ = other.monitoredResources_; - bitField0_ = (bitField0_ & ~0x00020000); - } else { - ensureMonitoredResourcesIsMutable(); - monitoredResources_.addAll(other.monitoredResources_); - } - onChanged(); - } - } else { - if (!other.monitoredResources_.isEmpty()) { - if (monitoredResourcesBuilder_.isEmpty()) { - monitoredResourcesBuilder_.dispose(); - monitoredResourcesBuilder_ = null; - monitoredResources_ = other.monitoredResources_; - bitField0_ = (bitField0_ & ~0x00020000); - monitoredResourcesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getMonitoredResourcesFieldBuilder() : null; - } else { - monitoredResourcesBuilder_.addAllMessages(other.monitoredResources_); - } - } - } - if (other.hasLogging()) { - mergeLogging(other.getLogging()); - } - if (other.hasMonitoring()) { - mergeMonitoring(other.getMonitoring()); - } - if (other.hasDerivedData()) { - mergeDerivedData(other.getDerivedData()); - } - if (systemTypesBuilder_ == null) { - if (!other.systemTypes_.isEmpty()) { - if (systemTypes_.isEmpty()) { - systemTypes_ = other.systemTypes_; - bitField0_ = (bitField0_ & ~0x00200000); - } else { - ensureSystemTypesIsMutable(); - systemTypes_.addAll(other.systemTypes_); - } - onChanged(); - } - } else { - if (!other.systemTypes_.isEmpty()) { - if (systemTypesBuilder_.isEmpty()) { - systemTypesBuilder_.dispose(); - systemTypesBuilder_ = null; - systemTypes_ = other.systemTypes_; - bitField0_ = (bitField0_ & ~0x00200000); - 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.Authentication authentication_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.api.Authentication, com.google.api.Authentication.Builder, com.google.api.AuthenticationOrBuilder> authenticationBuilder_; - /** - * optional .google.api.Authentication authentication = 11; - * - *
-     * Auth configuration.
-     * 
- */ - public boolean hasAuthentication() { - return authenticationBuilder_ != null || authentication_ != null; - } - /** - * optional .google.api.Authentication authentication = 11; - * - *
-     * Auth configuration.
-     * 
- */ - public com.google.api.Authentication getAuthentication() { - if (authenticationBuilder_ == null) { - return authentication_ == null ? com.google.api.Authentication.getDefaultInstance() : authentication_; - } else { - return authenticationBuilder_.getMessage(); - } - } - /** - * optional .google.api.Authentication authentication = 11; - * - *
-     * Auth configuration.
-     * 
- */ - public Builder setAuthentication(com.google.api.Authentication value) { - if (authenticationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - authentication_ = value; - onChanged(); - } else { - authenticationBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.api.Authentication authentication = 11; - * - *
-     * Auth configuration.
-     * 
- */ - public Builder setAuthentication( - com.google.api.Authentication.Builder builderForValue) { - if (authenticationBuilder_ == null) { - authentication_ = builderForValue.build(); - onChanged(); - } else { - authenticationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.api.Authentication authentication = 11; - * - *
-     * Auth configuration.
-     * 
- */ - public Builder mergeAuthentication(com.google.api.Authentication value) { - if (authenticationBuilder_ == null) { - if (authentication_ != null) { - authentication_ = - com.google.api.Authentication.newBuilder(authentication_).mergeFrom(value).buildPartial(); - } else { - authentication_ = value; - } - onChanged(); - } else { - authenticationBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.api.Authentication authentication = 11; - * - *
-     * Auth configuration.
-     * 
- */ - public Builder clearAuthentication() { - if (authenticationBuilder_ == null) { - authentication_ = null; - onChanged(); - } else { - authentication_ = null; - authenticationBuilder_ = null; - } - - return this; - } - /** - * optional .google.api.Authentication authentication = 11; - * - *
-     * Auth configuration.
-     * 
- */ - public com.google.api.Authentication.Builder getAuthenticationBuilder() { - - onChanged(); - return getAuthenticationFieldBuilder().getBuilder(); - } - /** - * optional .google.api.Authentication authentication = 11; - * - *
-     * Auth configuration.
-     * 
- */ - public com.google.api.AuthenticationOrBuilder getAuthenticationOrBuilder() { - if (authenticationBuilder_ != null) { - return authenticationBuilder_.getMessageOrBuilder(); - } else { - return authentication_ == null ? - com.google.api.Authentication.getDefaultInstance() : authentication_; - } - } - /** - * optional .google.api.Authentication authentication = 11; - * - *
-     * Auth configuration.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.api.Authentication, com.google.api.Authentication.Builder, com.google.api.AuthenticationOrBuilder> - getAuthenticationFieldBuilder() { - if (authenticationBuilder_ == null) { - authenticationBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.api.Authentication, com.google.api.Authentication.Builder, com.google.api.AuthenticationOrBuilder>( - getAuthentication(), - getParentForChildren(), - isClean()); - authentication_ = null; - } - return authenticationBuilder_; - } - - 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.Usage usage_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.api.Usage, com.google.api.Usage.Builder, com.google.api.UsageOrBuilder> usageBuilder_; - /** - * optional .google.api.Usage usage = 15; - * - *
-     * Configuration controlling usage of this service.
-     * 
- */ - public boolean hasUsage() { - return usageBuilder_ != null || usage_ != null; - } - /** - * optional .google.api.Usage usage = 15; - * - *
-     * Configuration controlling usage of this service.
-     * 
- */ - public com.google.api.Usage getUsage() { - if (usageBuilder_ == null) { - return usage_ == null ? com.google.api.Usage.getDefaultInstance() : usage_; - } else { - return usageBuilder_.getMessage(); - } - } - /** - * optional .google.api.Usage usage = 15; - * - *
-     * Configuration controlling usage of this service.
-     * 
- */ - public Builder setUsage(com.google.api.Usage value) { - if (usageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - usage_ = value; - onChanged(); - } else { - usageBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.api.Usage usage = 15; - * - *
-     * Configuration controlling usage of this service.
-     * 
- */ - public Builder setUsage( - com.google.api.Usage.Builder builderForValue) { - if (usageBuilder_ == null) { - usage_ = builderForValue.build(); - onChanged(); - } else { - usageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.api.Usage usage = 15; - * - *
-     * Configuration controlling usage of this service.
-     * 
- */ - public Builder mergeUsage(com.google.api.Usage value) { - if (usageBuilder_ == null) { - if (usage_ != null) { - usage_ = - com.google.api.Usage.newBuilder(usage_).mergeFrom(value).buildPartial(); - } else { - usage_ = value; - } - onChanged(); - } else { - usageBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.api.Usage usage = 15; - * - *
-     * Configuration controlling usage of this service.
-     * 
- */ - public Builder clearUsage() { - if (usageBuilder_ == null) { - usage_ = null; - onChanged(); - } else { - usage_ = null; - usageBuilder_ = null; - } - - return this; - } - /** - * optional .google.api.Usage usage = 15; - * - *
-     * Configuration controlling usage of this service.
-     * 
- */ - public com.google.api.Usage.Builder getUsageBuilder() { - - onChanged(); - return getUsageFieldBuilder().getBuilder(); - } - /** - * optional .google.api.Usage usage = 15; - * - *
-     * Configuration controlling usage of this service.
-     * 
- */ - public com.google.api.UsageOrBuilder getUsageOrBuilder() { - if (usageBuilder_ != null) { - return usageBuilder_.getMessageOrBuilder(); - } else { - return usage_ == null ? - com.google.api.Usage.getDefaultInstance() : usage_; - } - } - /** - * optional .google.api.Usage usage = 15; - * - *
-     * Configuration controlling usage of this service.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.api.Usage, com.google.api.Usage.Builder, com.google.api.UsageOrBuilder> - getUsageFieldBuilder() { - if (usageBuilder_ == null) { - usageBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.api.Usage, com.google.api.Usage.Builder, com.google.api.UsageOrBuilder>( - getUsage(), - getParentForChildren(), - isClean()); - usage_ = null; - } - return usageBuilder_; - } - - 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.api.Control control_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.api.Control, com.google.api.Control.Builder, com.google.api.ControlOrBuilder> controlBuilder_; - /** - * optional .google.api.Control control = 21; - * - *
-     * Configuration for the service control plane.
-     * 
- */ - public boolean hasControl() { - return controlBuilder_ != null || control_ != null; - } - /** - * optional .google.api.Control control = 21; - * - *
-     * Configuration for the service control plane.
-     * 
- */ - public com.google.api.Control getControl() { - if (controlBuilder_ == null) { - return control_ == null ? com.google.api.Control.getDefaultInstance() : control_; - } else { - return controlBuilder_.getMessage(); - } - } - /** - * optional .google.api.Control control = 21; - * - *
-     * Configuration for the service control plane.
-     * 
- */ - public Builder setControl(com.google.api.Control value) { - if (controlBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - control_ = value; - onChanged(); - } else { - controlBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.api.Control control = 21; - * - *
-     * Configuration for the service control plane.
-     * 
- */ - public Builder setControl( - com.google.api.Control.Builder builderForValue) { - if (controlBuilder_ == null) { - control_ = builderForValue.build(); - onChanged(); - } else { - controlBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.api.Control control = 21; - * - *
-     * Configuration for the service control plane.
-     * 
- */ - public Builder mergeControl(com.google.api.Control value) { - if (controlBuilder_ == null) { - if (control_ != null) { - control_ = - com.google.api.Control.newBuilder(control_).mergeFrom(value).buildPartial(); - } else { - control_ = value; - } - onChanged(); - } else { - controlBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.api.Control control = 21; - * - *
-     * Configuration for the service control plane.
-     * 
- */ - public Builder clearControl() { - if (controlBuilder_ == null) { - control_ = null; - onChanged(); - } else { - control_ = null; - controlBuilder_ = null; - } - - return this; - } - /** - * optional .google.api.Control control = 21; - * - *
-     * Configuration for the service control plane.
-     * 
- */ - public com.google.api.Control.Builder getControlBuilder() { - - onChanged(); - return getControlFieldBuilder().getBuilder(); - } - /** - * optional .google.api.Control control = 21; - * - *
-     * Configuration for the service control plane.
-     * 
- */ - public com.google.api.ControlOrBuilder getControlOrBuilder() { - if (controlBuilder_ != null) { - return controlBuilder_.getMessageOrBuilder(); - } else { - return control_ == null ? - com.google.api.Control.getDefaultInstance() : control_; - } - } - /** - * optional .google.api.Control control = 21; - * - *
-     * Configuration for the service control plane.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.api.Control, com.google.api.Control.Builder, com.google.api.ControlOrBuilder> - getControlFieldBuilder() { - if (controlBuilder_ == null) { - controlBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.api.Control, com.google.api.Control.Builder, com.google.api.ControlOrBuilder>( - getControl(), - getParentForChildren(), - isClean()); - control_ = null; - } - return controlBuilder_; - } - - private java.util.List logs_ = - java.util.Collections.emptyList(); - private void ensureLogsIsMutable() { - if (!((bitField0_ & 0x00008000) == 0x00008000)) { - logs_ = new java.util.ArrayList(logs_); - bitField0_ |= 0x00008000; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.LogDescriptor, com.google.api.LogDescriptor.Builder, com.google.api.LogDescriptorOrBuilder> logsBuilder_; - - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-     * Defines the logs used by this service.
-     * 
- */ - public java.util.List getLogsList() { - if (logsBuilder_ == null) { - return java.util.Collections.unmodifiableList(logs_); - } else { - return logsBuilder_.getMessageList(); - } - } - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-     * Defines the logs used by this service.
-     * 
- */ - public int getLogsCount() { - if (logsBuilder_ == null) { - return logs_.size(); - } else { - return logsBuilder_.getCount(); - } - } - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-     * Defines the logs used by this service.
-     * 
- */ - public com.google.api.LogDescriptor getLogs(int index) { - if (logsBuilder_ == null) { - return logs_.get(index); - } else { - return logsBuilder_.getMessage(index); - } - } - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-     * Defines the logs used by this service.
-     * 
- */ - public Builder setLogs( - int index, com.google.api.LogDescriptor value) { - if (logsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLogsIsMutable(); - logs_.set(index, value); - onChanged(); - } else { - logsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-     * Defines the logs used by this service.
-     * 
- */ - public Builder setLogs( - int index, com.google.api.LogDescriptor.Builder builderForValue) { - if (logsBuilder_ == null) { - ensureLogsIsMutable(); - logs_.set(index, builderForValue.build()); - onChanged(); - } else { - logsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-     * Defines the logs used by this service.
-     * 
- */ - public Builder addLogs(com.google.api.LogDescriptor value) { - if (logsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLogsIsMutable(); - logs_.add(value); - onChanged(); - } else { - logsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-     * Defines the logs used by this service.
-     * 
- */ - public Builder addLogs( - int index, com.google.api.LogDescriptor value) { - if (logsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLogsIsMutable(); - logs_.add(index, value); - onChanged(); - } else { - logsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-     * Defines the logs used by this service.
-     * 
- */ - public Builder addLogs( - com.google.api.LogDescriptor.Builder builderForValue) { - if (logsBuilder_ == null) { - ensureLogsIsMutable(); - logs_.add(builderForValue.build()); - onChanged(); - } else { - logsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-     * Defines the logs used by this service.
-     * 
- */ - public Builder addLogs( - int index, com.google.api.LogDescriptor.Builder builderForValue) { - if (logsBuilder_ == null) { - ensureLogsIsMutable(); - logs_.add(index, builderForValue.build()); - onChanged(); - } else { - logsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-     * Defines the logs used by this service.
-     * 
- */ - public Builder addAllLogs( - java.lang.Iterable values) { - if (logsBuilder_ == null) { - ensureLogsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, logs_); - onChanged(); - } else { - logsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-     * Defines the logs used by this service.
-     * 
- */ - public Builder clearLogs() { - if (logsBuilder_ == null) { - logs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00008000); - onChanged(); - } else { - logsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-     * Defines the logs used by this service.
-     * 
- */ - public Builder removeLogs(int index) { - if (logsBuilder_ == null) { - ensureLogsIsMutable(); - logs_.remove(index); - onChanged(); - } else { - logsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-     * Defines the logs used by this service.
-     * 
- */ - public com.google.api.LogDescriptor.Builder getLogsBuilder( - int index) { - return getLogsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-     * Defines the logs used by this service.
-     * 
- */ - public com.google.api.LogDescriptorOrBuilder getLogsOrBuilder( - int index) { - if (logsBuilder_ == null) { - return logs_.get(index); } else { - return logsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-     * Defines the logs used by this service.
-     * 
- */ - public java.util.List - getLogsOrBuilderList() { - if (logsBuilder_ != null) { - return logsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(logs_); - } - } - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-     * Defines the logs used by this service.
-     * 
- */ - public com.google.api.LogDescriptor.Builder addLogsBuilder() { - return getLogsFieldBuilder().addBuilder( - com.google.api.LogDescriptor.getDefaultInstance()); - } - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-     * Defines the logs used by this service.
-     * 
- */ - public com.google.api.LogDescriptor.Builder addLogsBuilder( - int index) { - return getLogsFieldBuilder().addBuilder( - index, com.google.api.LogDescriptor.getDefaultInstance()); - } - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-     * Defines the logs used by this service.
-     * 
- */ - public java.util.List - getLogsBuilderList() { - return getLogsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.LogDescriptor, com.google.api.LogDescriptor.Builder, com.google.api.LogDescriptorOrBuilder> - getLogsFieldBuilder() { - if (logsBuilder_ == null) { - logsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.api.LogDescriptor, com.google.api.LogDescriptor.Builder, com.google.api.LogDescriptorOrBuilder>( - logs_, - ((bitField0_ & 0x00008000) == 0x00008000), - getParentForChildren(), - isClean()); - logs_ = null; - } - return logsBuilder_; - } - - private java.util.List metrics_ = - java.util.Collections.emptyList(); - private void ensureMetricsIsMutable() { - if (!((bitField0_ & 0x00010000) == 0x00010000)) { - metrics_ = new java.util.ArrayList(metrics_); - bitField0_ |= 0x00010000; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.MetricDescriptor, com.google.api.MetricDescriptor.Builder, com.google.api.MetricDescriptorOrBuilder> metricsBuilder_; - - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-     * Defines the metrics used by this service.
-     * 
- */ - public java.util.List getMetricsList() { - if (metricsBuilder_ == null) { - return java.util.Collections.unmodifiableList(metrics_); - } else { - return metricsBuilder_.getMessageList(); - } - } - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-     * Defines the metrics used by this service.
-     * 
- */ - public int getMetricsCount() { - if (metricsBuilder_ == null) { - return metrics_.size(); - } else { - return metricsBuilder_.getCount(); - } - } - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-     * Defines the metrics used by this service.
-     * 
- */ - public com.google.api.MetricDescriptor getMetrics(int index) { - if (metricsBuilder_ == null) { - return metrics_.get(index); - } else { - return metricsBuilder_.getMessage(index); - } - } - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-     * Defines the metrics used by this service.
-     * 
- */ - public Builder setMetrics( - int index, com.google.api.MetricDescriptor value) { - if (metricsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetricsIsMutable(); - metrics_.set(index, value); - onChanged(); - } else { - metricsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-     * Defines the metrics used by this service.
-     * 
- */ - public Builder setMetrics( - int index, com.google.api.MetricDescriptor.Builder builderForValue) { - if (metricsBuilder_ == null) { - ensureMetricsIsMutable(); - metrics_.set(index, builderForValue.build()); - onChanged(); - } else { - metricsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-     * Defines the metrics used by this service.
-     * 
- */ - public Builder addMetrics(com.google.api.MetricDescriptor value) { - if (metricsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetricsIsMutable(); - metrics_.add(value); - onChanged(); - } else { - metricsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-     * Defines the metrics used by this service.
-     * 
- */ - public Builder addMetrics( - int index, com.google.api.MetricDescriptor value) { - if (metricsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetricsIsMutable(); - metrics_.add(index, value); - onChanged(); - } else { - metricsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-     * Defines the metrics used by this service.
-     * 
- */ - public Builder addMetrics( - com.google.api.MetricDescriptor.Builder builderForValue) { - if (metricsBuilder_ == null) { - ensureMetricsIsMutable(); - metrics_.add(builderForValue.build()); - onChanged(); - } else { - metricsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-     * Defines the metrics used by this service.
-     * 
- */ - public Builder addMetrics( - int index, com.google.api.MetricDescriptor.Builder builderForValue) { - if (metricsBuilder_ == null) { - ensureMetricsIsMutable(); - metrics_.add(index, builderForValue.build()); - onChanged(); - } else { - metricsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-     * Defines the metrics used by this service.
-     * 
- */ - public Builder addAllMetrics( - java.lang.Iterable values) { - if (metricsBuilder_ == null) { - ensureMetricsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, metrics_); - onChanged(); - } else { - metricsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-     * Defines the metrics used by this service.
-     * 
- */ - public Builder clearMetrics() { - if (metricsBuilder_ == null) { - metrics_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00010000); - onChanged(); - } else { - metricsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-     * Defines the metrics used by this service.
-     * 
- */ - public Builder removeMetrics(int index) { - if (metricsBuilder_ == null) { - ensureMetricsIsMutable(); - metrics_.remove(index); - onChanged(); - } else { - metricsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-     * Defines the metrics used by this service.
-     * 
- */ - public com.google.api.MetricDescriptor.Builder getMetricsBuilder( - int index) { - return getMetricsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-     * Defines the metrics used by this service.
-     * 
- */ - public com.google.api.MetricDescriptorOrBuilder getMetricsOrBuilder( - int index) { - if (metricsBuilder_ == null) { - return metrics_.get(index); } else { - return metricsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-     * Defines the metrics used by this service.
-     * 
- */ - public java.util.List - getMetricsOrBuilderList() { - if (metricsBuilder_ != null) { - return metricsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(metrics_); - } - } - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-     * Defines the metrics used by this service.
-     * 
- */ - public com.google.api.MetricDescriptor.Builder addMetricsBuilder() { - return getMetricsFieldBuilder().addBuilder( - com.google.api.MetricDescriptor.getDefaultInstance()); - } - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-     * Defines the metrics used by this service.
-     * 
- */ - public com.google.api.MetricDescriptor.Builder addMetricsBuilder( - int index) { - return getMetricsFieldBuilder().addBuilder( - index, com.google.api.MetricDescriptor.getDefaultInstance()); - } - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-     * Defines the metrics used by this service.
-     * 
- */ - public java.util.List - getMetricsBuilderList() { - return getMetricsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.MetricDescriptor, com.google.api.MetricDescriptor.Builder, com.google.api.MetricDescriptorOrBuilder> - getMetricsFieldBuilder() { - if (metricsBuilder_ == null) { - metricsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.api.MetricDescriptor, com.google.api.MetricDescriptor.Builder, com.google.api.MetricDescriptorOrBuilder>( - metrics_, - ((bitField0_ & 0x00010000) == 0x00010000), - getParentForChildren(), - isClean()); - metrics_ = null; - } - return metricsBuilder_; - } - - private java.util.List monitoredResources_ = - java.util.Collections.emptyList(); - private void ensureMonitoredResourcesIsMutable() { - if (!((bitField0_ & 0x00020000) == 0x00020000)) { - monitoredResources_ = new java.util.ArrayList(monitoredResources_); - bitField0_ |= 0x00020000; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.MonitoredResourceDescriptor, com.google.api.MonitoredResourceDescriptor.Builder, com.google.api.MonitoredResourceDescriptorOrBuilder> monitoredResourcesBuilder_; - - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-     * Defines the monitored resources used by this service. This is required
-     * by the [Service.monitoring][] configuration.
-     * (-- GOOGLE_INTERNAL: owners of Google services must review their
-     * monitored resource configuration with Monarch team and Chemist team
-     * to ensure consistency. See go/new-cloud-monitoring-howto and
-     * go/chemist-onboarding for details, and contact chemist-dev@google.com
-     * for help. --)
-     * 
- */ - public java.util.List getMonitoredResourcesList() { - if (monitoredResourcesBuilder_ == null) { - return java.util.Collections.unmodifiableList(monitoredResources_); - } else { - return monitoredResourcesBuilder_.getMessageList(); - } - } - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-     * Defines the monitored resources used by this service. This is required
-     * by the [Service.monitoring][] configuration.
-     * (-- GOOGLE_INTERNAL: owners of Google services must review their
-     * monitored resource configuration with Monarch team and Chemist team
-     * to ensure consistency. See go/new-cloud-monitoring-howto and
-     * go/chemist-onboarding for details, and contact chemist-dev@google.com
-     * for help. --)
-     * 
- */ - public int getMonitoredResourcesCount() { - if (monitoredResourcesBuilder_ == null) { - return monitoredResources_.size(); - } else { - return monitoredResourcesBuilder_.getCount(); - } - } - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-     * Defines the monitored resources used by this service. This is required
-     * by the [Service.monitoring][] configuration.
-     * (-- GOOGLE_INTERNAL: owners of Google services must review their
-     * monitored resource configuration with Monarch team and Chemist team
-     * to ensure consistency. See go/new-cloud-monitoring-howto and
-     * go/chemist-onboarding for details, and contact chemist-dev@google.com
-     * for help. --)
-     * 
- */ - public com.google.api.MonitoredResourceDescriptor getMonitoredResources(int index) { - if (monitoredResourcesBuilder_ == null) { - return monitoredResources_.get(index); - } else { - return monitoredResourcesBuilder_.getMessage(index); - } - } - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-     * Defines the monitored resources used by this service. This is required
-     * by the [Service.monitoring][] configuration.
-     * (-- GOOGLE_INTERNAL: owners of Google services must review their
-     * monitored resource configuration with Monarch team and Chemist team
-     * to ensure consistency. See go/new-cloud-monitoring-howto and
-     * go/chemist-onboarding for details, and contact chemist-dev@google.com
-     * for help. --)
-     * 
- */ - public Builder setMonitoredResources( - int index, com.google.api.MonitoredResourceDescriptor value) { - if (monitoredResourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMonitoredResourcesIsMutable(); - monitoredResources_.set(index, value); - onChanged(); - } else { - monitoredResourcesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-     * Defines the monitored resources used by this service. This is required
-     * by the [Service.monitoring][] configuration.
-     * (-- GOOGLE_INTERNAL: owners of Google services must review their
-     * monitored resource configuration with Monarch team and Chemist team
-     * to ensure consistency. See go/new-cloud-monitoring-howto and
-     * go/chemist-onboarding for details, and contact chemist-dev@google.com
-     * for help. --)
-     * 
- */ - public Builder setMonitoredResources( - int index, com.google.api.MonitoredResourceDescriptor.Builder builderForValue) { - if (monitoredResourcesBuilder_ == null) { - ensureMonitoredResourcesIsMutable(); - monitoredResources_.set(index, builderForValue.build()); - onChanged(); - } else { - monitoredResourcesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-     * Defines the monitored resources used by this service. This is required
-     * by the [Service.monitoring][] configuration.
-     * (-- GOOGLE_INTERNAL: owners of Google services must review their
-     * monitored resource configuration with Monarch team and Chemist team
-     * to ensure consistency. See go/new-cloud-monitoring-howto and
-     * go/chemist-onboarding for details, and contact chemist-dev@google.com
-     * for help. --)
-     * 
- */ - public Builder addMonitoredResources(com.google.api.MonitoredResourceDescriptor value) { - if (monitoredResourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMonitoredResourcesIsMutable(); - monitoredResources_.add(value); - onChanged(); - } else { - monitoredResourcesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-     * Defines the monitored resources used by this service. This is required
-     * by the [Service.monitoring][] configuration.
-     * (-- GOOGLE_INTERNAL: owners of Google services must review their
-     * monitored resource configuration with Monarch team and Chemist team
-     * to ensure consistency. See go/new-cloud-monitoring-howto and
-     * go/chemist-onboarding for details, and contact chemist-dev@google.com
-     * for help. --)
-     * 
- */ - public Builder addMonitoredResources( - int index, com.google.api.MonitoredResourceDescriptor value) { - if (monitoredResourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMonitoredResourcesIsMutable(); - monitoredResources_.add(index, value); - onChanged(); - } else { - monitoredResourcesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-     * Defines the monitored resources used by this service. This is required
-     * by the [Service.monitoring][] configuration.
-     * (-- GOOGLE_INTERNAL: owners of Google services must review their
-     * monitored resource configuration with Monarch team and Chemist team
-     * to ensure consistency. See go/new-cloud-monitoring-howto and
-     * go/chemist-onboarding for details, and contact chemist-dev@google.com
-     * for help. --)
-     * 
- */ - public Builder addMonitoredResources( - com.google.api.MonitoredResourceDescriptor.Builder builderForValue) { - if (monitoredResourcesBuilder_ == null) { - ensureMonitoredResourcesIsMutable(); - monitoredResources_.add(builderForValue.build()); - onChanged(); - } else { - monitoredResourcesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-     * Defines the monitored resources used by this service. This is required
-     * by the [Service.monitoring][] configuration.
-     * (-- GOOGLE_INTERNAL: owners of Google services must review their
-     * monitored resource configuration with Monarch team and Chemist team
-     * to ensure consistency. See go/new-cloud-monitoring-howto and
-     * go/chemist-onboarding for details, and contact chemist-dev@google.com
-     * for help. --)
-     * 
- */ - public Builder addMonitoredResources( - int index, com.google.api.MonitoredResourceDescriptor.Builder builderForValue) { - if (monitoredResourcesBuilder_ == null) { - ensureMonitoredResourcesIsMutable(); - monitoredResources_.add(index, builderForValue.build()); - onChanged(); - } else { - monitoredResourcesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-     * Defines the monitored resources used by this service. This is required
-     * by the [Service.monitoring][] configuration.
-     * (-- GOOGLE_INTERNAL: owners of Google services must review their
-     * monitored resource configuration with Monarch team and Chemist team
-     * to ensure consistency. See go/new-cloud-monitoring-howto and
-     * go/chemist-onboarding for details, and contact chemist-dev@google.com
-     * for help. --)
-     * 
- */ - public Builder addAllMonitoredResources( - java.lang.Iterable values) { - if (monitoredResourcesBuilder_ == null) { - ensureMonitoredResourcesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, monitoredResources_); - onChanged(); - } else { - monitoredResourcesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-     * Defines the monitored resources used by this service. This is required
-     * by the [Service.monitoring][] configuration.
-     * (-- GOOGLE_INTERNAL: owners of Google services must review their
-     * monitored resource configuration with Monarch team and Chemist team
-     * to ensure consistency. See go/new-cloud-monitoring-howto and
-     * go/chemist-onboarding for details, and contact chemist-dev@google.com
-     * for help. --)
-     * 
- */ - public Builder clearMonitoredResources() { - if (monitoredResourcesBuilder_ == null) { - monitoredResources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00020000); - onChanged(); - } else { - monitoredResourcesBuilder_.clear(); - } - return this; - } - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-     * Defines the monitored resources used by this service. This is required
-     * by the [Service.monitoring][] configuration.
-     * (-- GOOGLE_INTERNAL: owners of Google services must review their
-     * monitored resource configuration with Monarch team and Chemist team
-     * to ensure consistency. See go/new-cloud-monitoring-howto and
-     * go/chemist-onboarding for details, and contact chemist-dev@google.com
-     * for help. --)
-     * 
- */ - public Builder removeMonitoredResources(int index) { - if (monitoredResourcesBuilder_ == null) { - ensureMonitoredResourcesIsMutable(); - monitoredResources_.remove(index); - onChanged(); - } else { - monitoredResourcesBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-     * Defines the monitored resources used by this service. This is required
-     * by the [Service.monitoring][] configuration.
-     * (-- GOOGLE_INTERNAL: owners of Google services must review their
-     * monitored resource configuration with Monarch team and Chemist team
-     * to ensure consistency. See go/new-cloud-monitoring-howto and
-     * go/chemist-onboarding for details, and contact chemist-dev@google.com
-     * for help. --)
-     * 
- */ - public com.google.api.MonitoredResourceDescriptor.Builder getMonitoredResourcesBuilder( - int index) { - return getMonitoredResourcesFieldBuilder().getBuilder(index); - } - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-     * Defines the monitored resources used by this service. This is required
-     * by the [Service.monitoring][] configuration.
-     * (-- GOOGLE_INTERNAL: owners of Google services must review their
-     * monitored resource configuration with Monarch team and Chemist team
-     * to ensure consistency. See go/new-cloud-monitoring-howto and
-     * go/chemist-onboarding for details, and contact chemist-dev@google.com
-     * for help. --)
-     * 
- */ - public com.google.api.MonitoredResourceDescriptorOrBuilder getMonitoredResourcesOrBuilder( - int index) { - if (monitoredResourcesBuilder_ == null) { - return monitoredResources_.get(index); } else { - return monitoredResourcesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-     * Defines the monitored resources used by this service. This is required
-     * by the [Service.monitoring][] configuration.
-     * (-- GOOGLE_INTERNAL: owners of Google services must review their
-     * monitored resource configuration with Monarch team and Chemist team
-     * to ensure consistency. See go/new-cloud-monitoring-howto and
-     * go/chemist-onboarding for details, and contact chemist-dev@google.com
-     * for help. --)
-     * 
- */ - public java.util.List - getMonitoredResourcesOrBuilderList() { - if (monitoredResourcesBuilder_ != null) { - return monitoredResourcesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(monitoredResources_); - } - } - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-     * Defines the monitored resources used by this service. This is required
-     * by the [Service.monitoring][] configuration.
-     * (-- GOOGLE_INTERNAL: owners of Google services must review their
-     * monitored resource configuration with Monarch team and Chemist team
-     * to ensure consistency. See go/new-cloud-monitoring-howto and
-     * go/chemist-onboarding for details, and contact chemist-dev@google.com
-     * for help. --)
-     * 
- */ - public com.google.api.MonitoredResourceDescriptor.Builder addMonitoredResourcesBuilder() { - return getMonitoredResourcesFieldBuilder().addBuilder( - com.google.api.MonitoredResourceDescriptor.getDefaultInstance()); - } - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-     * Defines the monitored resources used by this service. This is required
-     * by the [Service.monitoring][] configuration.
-     * (-- GOOGLE_INTERNAL: owners of Google services must review their
-     * monitored resource configuration with Monarch team and Chemist team
-     * to ensure consistency. See go/new-cloud-monitoring-howto and
-     * go/chemist-onboarding for details, and contact chemist-dev@google.com
-     * for help. --)
-     * 
- */ - public com.google.api.MonitoredResourceDescriptor.Builder addMonitoredResourcesBuilder( - int index) { - return getMonitoredResourcesFieldBuilder().addBuilder( - index, com.google.api.MonitoredResourceDescriptor.getDefaultInstance()); - } - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-     * Defines the monitored resources used by this service. This is required
-     * by the [Service.monitoring][] configuration.
-     * (-- GOOGLE_INTERNAL: owners of Google services must review their
-     * monitored resource configuration with Monarch team and Chemist team
-     * to ensure consistency. See go/new-cloud-monitoring-howto and
-     * go/chemist-onboarding for details, and contact chemist-dev@google.com
-     * for help. --)
-     * 
- */ - public java.util.List - getMonitoredResourcesBuilderList() { - return getMonitoredResourcesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.MonitoredResourceDescriptor, com.google.api.MonitoredResourceDescriptor.Builder, com.google.api.MonitoredResourceDescriptorOrBuilder> - getMonitoredResourcesFieldBuilder() { - if (monitoredResourcesBuilder_ == null) { - monitoredResourcesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.api.MonitoredResourceDescriptor, com.google.api.MonitoredResourceDescriptor.Builder, com.google.api.MonitoredResourceDescriptorOrBuilder>( - monitoredResources_, - ((bitField0_ & 0x00020000) == 0x00020000), - getParentForChildren(), - isClean()); - monitoredResources_ = null; - } - return monitoredResourcesBuilder_; - } - - private com.google.api.Logging logging_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.api.Logging, com.google.api.Logging.Builder, com.google.api.LoggingOrBuilder> loggingBuilder_; - /** - * optional .google.api.Logging logging = 27; - * - *
-     * Logging configuration of the service.
-     * 
- */ - public boolean hasLogging() { - return loggingBuilder_ != null || logging_ != null; - } - /** - * optional .google.api.Logging logging = 27; - * - *
-     * Logging configuration of the service.
-     * 
- */ - public com.google.api.Logging getLogging() { - if (loggingBuilder_ == null) { - return logging_ == null ? com.google.api.Logging.getDefaultInstance() : logging_; - } else { - return loggingBuilder_.getMessage(); - } - } - /** - * optional .google.api.Logging logging = 27; - * - *
-     * Logging configuration of the service.
-     * 
- */ - public Builder setLogging(com.google.api.Logging value) { - if (loggingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - logging_ = value; - onChanged(); - } else { - loggingBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.api.Logging logging = 27; - * - *
-     * Logging configuration of the service.
-     * 
- */ - public Builder setLogging( - com.google.api.Logging.Builder builderForValue) { - if (loggingBuilder_ == null) { - logging_ = builderForValue.build(); - onChanged(); - } else { - loggingBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.api.Logging logging = 27; - * - *
-     * Logging configuration of the service.
-     * 
- */ - public Builder mergeLogging(com.google.api.Logging value) { - if (loggingBuilder_ == null) { - if (logging_ != null) { - logging_ = - com.google.api.Logging.newBuilder(logging_).mergeFrom(value).buildPartial(); - } else { - logging_ = value; - } - onChanged(); - } else { - loggingBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.api.Logging logging = 27; - * - *
-     * Logging configuration of the service.
-     * 
- */ - public Builder clearLogging() { - if (loggingBuilder_ == null) { - logging_ = null; - onChanged(); - } else { - logging_ = null; - loggingBuilder_ = null; - } - - return this; - } - /** - * optional .google.api.Logging logging = 27; - * - *
-     * Logging configuration of the service.
-     * 
- */ - public com.google.api.Logging.Builder getLoggingBuilder() { - - onChanged(); - return getLoggingFieldBuilder().getBuilder(); - } - /** - * optional .google.api.Logging logging = 27; - * - *
-     * Logging configuration of the service.
-     * 
- */ - public com.google.api.LoggingOrBuilder getLoggingOrBuilder() { - if (loggingBuilder_ != null) { - return loggingBuilder_.getMessageOrBuilder(); - } else { - return logging_ == null ? - com.google.api.Logging.getDefaultInstance() : logging_; - } - } - /** - * optional .google.api.Logging logging = 27; - * - *
-     * Logging configuration of the service.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.api.Logging, com.google.api.Logging.Builder, com.google.api.LoggingOrBuilder> - getLoggingFieldBuilder() { - if (loggingBuilder_ == null) { - loggingBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.api.Logging, com.google.api.Logging.Builder, com.google.api.LoggingOrBuilder>( - getLogging(), - getParentForChildren(), - isClean()); - logging_ = null; - } - return loggingBuilder_; - } - - private com.google.api.Monitoring monitoring_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.api.Monitoring, com.google.api.Monitoring.Builder, com.google.api.MonitoringOrBuilder> monitoringBuilder_; - /** - * optional .google.api.Monitoring monitoring = 28; - * - *
-     * Monitoring configuration of the service.
-     * 
- */ - public boolean hasMonitoring() { - return monitoringBuilder_ != null || monitoring_ != null; - } - /** - * optional .google.api.Monitoring monitoring = 28; - * - *
-     * Monitoring configuration of the service.
-     * 
- */ - public com.google.api.Monitoring getMonitoring() { - if (monitoringBuilder_ == null) { - return monitoring_ == null ? com.google.api.Monitoring.getDefaultInstance() : monitoring_; - } else { - return monitoringBuilder_.getMessage(); - } - } - /** - * optional .google.api.Monitoring monitoring = 28; - * - *
-     * Monitoring configuration of the service.
-     * 
- */ - public Builder setMonitoring(com.google.api.Monitoring value) { - if (monitoringBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - monitoring_ = value; - onChanged(); - } else { - monitoringBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.api.Monitoring monitoring = 28; - * - *
-     * Monitoring configuration of the service.
-     * 
- */ - public Builder setMonitoring( - com.google.api.Monitoring.Builder builderForValue) { - if (monitoringBuilder_ == null) { - monitoring_ = builderForValue.build(); - onChanged(); - } else { - monitoringBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.api.Monitoring monitoring = 28; - * - *
-     * Monitoring configuration of the service.
-     * 
- */ - public Builder mergeMonitoring(com.google.api.Monitoring value) { - if (monitoringBuilder_ == null) { - if (monitoring_ != null) { - monitoring_ = - com.google.api.Monitoring.newBuilder(monitoring_).mergeFrom(value).buildPartial(); - } else { - monitoring_ = value; - } - onChanged(); - } else { - monitoringBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.api.Monitoring monitoring = 28; - * - *
-     * Monitoring configuration of the service.
-     * 
- */ - public Builder clearMonitoring() { - if (monitoringBuilder_ == null) { - monitoring_ = null; - onChanged(); - } else { - monitoring_ = null; - monitoringBuilder_ = null; - } - - return this; - } - /** - * optional .google.api.Monitoring monitoring = 28; - * - *
-     * Monitoring configuration of the service.
-     * 
- */ - public com.google.api.Monitoring.Builder getMonitoringBuilder() { - - onChanged(); - return getMonitoringFieldBuilder().getBuilder(); - } - /** - * optional .google.api.Monitoring monitoring = 28; - * - *
-     * Monitoring configuration of the service.
-     * 
- */ - public com.google.api.MonitoringOrBuilder getMonitoringOrBuilder() { - if (monitoringBuilder_ != null) { - return monitoringBuilder_.getMessageOrBuilder(); - } else { - return monitoring_ == null ? - com.google.api.Monitoring.getDefaultInstance() : monitoring_; - } - } - /** - * optional .google.api.Monitoring monitoring = 28; - * - *
-     * Monitoring configuration of the service.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.api.Monitoring, com.google.api.Monitoring.Builder, com.google.api.MonitoringOrBuilder> - getMonitoringFieldBuilder() { - if (monitoringBuilder_ == null) { - monitoringBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.api.Monitoring, com.google.api.Monitoring.Builder, com.google.api.MonitoringOrBuilder>( - getMonitoring(), - getParentForChildren(), - isClean()); - monitoring_ = null; - } - return monitoringBuilder_; - } - - 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_ & 0x00200000) == 0x00200000)) { - systemTypes_ = new java.util.ArrayList(systemTypes_); - bitField0_ |= 0x00200000; - } - } - - 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_ & ~0x00200000); - 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_ & 0x00200000) == 0x00200000), - 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/ServiceControlAccessProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceControlAccessProto.java deleted file mode 100644 index 5b8085b2ee6a..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceControlAccessProto.java +++ /dev/null @@ -1,42 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/service_control_access.proto - -package com.google.api; - -public final class ServiceControlAccessProto { - private ServiceControlAccessProto() {} - 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\'google/api/service_control_access.prot" + - "o\022\ngoogle.api\032\034google/api/annotations.pr" + - "otoB-\n\016com.google.apiB\031ServiceControlAcc" + - "essProtoP\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(), - }, assigner); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} 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 25840a6ba84b..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceOrBuilder.java +++ /dev/null @@ -1,817 +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.Authentication authentication = 11; - * - *
-   * Auth configuration.
-   * 
- */ - boolean hasAuthentication(); - /** - * optional .google.api.Authentication authentication = 11; - * - *
-   * Auth configuration.
-   * 
- */ - com.google.api.Authentication getAuthentication(); - /** - * optional .google.api.Authentication authentication = 11; - * - *
-   * Auth configuration.
-   * 
- */ - com.google.api.AuthenticationOrBuilder getAuthenticationOrBuilder(); - - /** - * 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.Usage usage = 15; - * - *
-   * Configuration controlling usage of this service.
-   * 
- */ - boolean hasUsage(); - /** - * optional .google.api.Usage usage = 15; - * - *
-   * Configuration controlling usage of this service.
-   * 
- */ - com.google.api.Usage getUsage(); - /** - * optional .google.api.Usage usage = 15; - * - *
-   * Configuration controlling usage of this service.
-   * 
- */ - com.google.api.UsageOrBuilder getUsageOrBuilder(); - - /** - * 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.api.Control control = 21; - * - *
-   * Configuration for the service control plane.
-   * 
- */ - boolean hasControl(); - /** - * optional .google.api.Control control = 21; - * - *
-   * Configuration for the service control plane.
-   * 
- */ - com.google.api.Control getControl(); - /** - * optional .google.api.Control control = 21; - * - *
-   * Configuration for the service control plane.
-   * 
- */ - com.google.api.ControlOrBuilder getControlOrBuilder(); - - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-   * Defines the logs used by this service.
-   * 
- */ - java.util.List - getLogsList(); - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-   * Defines the logs used by this service.
-   * 
- */ - com.google.api.LogDescriptor getLogs(int index); - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-   * Defines the logs used by this service.
-   * 
- */ - int getLogsCount(); - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-   * Defines the logs used by this service.
-   * 
- */ - java.util.List - getLogsOrBuilderList(); - /** - * repeated .google.api.LogDescriptor logs = 23; - * - *
-   * Defines the logs used by this service.
-   * 
- */ - com.google.api.LogDescriptorOrBuilder getLogsOrBuilder( - int index); - - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-   * Defines the metrics used by this service.
-   * 
- */ - java.util.List - getMetricsList(); - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-   * Defines the metrics used by this service.
-   * 
- */ - com.google.api.MetricDescriptor getMetrics(int index); - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-   * Defines the metrics used by this service.
-   * 
- */ - int getMetricsCount(); - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-   * Defines the metrics used by this service.
-   * 
- */ - java.util.List - getMetricsOrBuilderList(); - /** - * repeated .google.api.MetricDescriptor metrics = 24; - * - *
-   * Defines the metrics used by this service.
-   * 
- */ - com.google.api.MetricDescriptorOrBuilder getMetricsOrBuilder( - int index); - - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-   * Defines the monitored resources used by this service. This is required
-   * by the [Service.monitoring][] configuration.
-   * (-- GOOGLE_INTERNAL: owners of Google services must review their
-   * monitored resource configuration with Monarch team and Chemist team
-   * to ensure consistency. See go/new-cloud-monitoring-howto and
-   * go/chemist-onboarding for details, and contact chemist-dev@google.com
-   * for help. --)
-   * 
- */ - java.util.List - getMonitoredResourcesList(); - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-   * Defines the monitored resources used by this service. This is required
-   * by the [Service.monitoring][] configuration.
-   * (-- GOOGLE_INTERNAL: owners of Google services must review their
-   * monitored resource configuration with Monarch team and Chemist team
-   * to ensure consistency. See go/new-cloud-monitoring-howto and
-   * go/chemist-onboarding for details, and contact chemist-dev@google.com
-   * for help. --)
-   * 
- */ - com.google.api.MonitoredResourceDescriptor getMonitoredResources(int index); - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-   * Defines the monitored resources used by this service. This is required
-   * by the [Service.monitoring][] configuration.
-   * (-- GOOGLE_INTERNAL: owners of Google services must review their
-   * monitored resource configuration with Monarch team and Chemist team
-   * to ensure consistency. See go/new-cloud-monitoring-howto and
-   * go/chemist-onboarding for details, and contact chemist-dev@google.com
-   * for help. --)
-   * 
- */ - int getMonitoredResourcesCount(); - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-   * Defines the monitored resources used by this service. This is required
-   * by the [Service.monitoring][] configuration.
-   * (-- GOOGLE_INTERNAL: owners of Google services must review their
-   * monitored resource configuration with Monarch team and Chemist team
-   * to ensure consistency. See go/new-cloud-monitoring-howto and
-   * go/chemist-onboarding for details, and contact chemist-dev@google.com
-   * for help. --)
-   * 
- */ - java.util.List - getMonitoredResourcesOrBuilderList(); - /** - * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; - * - *
-   * Defines the monitored resources used by this service. This is required
-   * by the [Service.monitoring][] configuration.
-   * (-- GOOGLE_INTERNAL: owners of Google services must review their
-   * monitored resource configuration with Monarch team and Chemist team
-   * to ensure consistency. See go/new-cloud-monitoring-howto and
-   * go/chemist-onboarding for details, and contact chemist-dev@google.com
-   * for help. --)
-   * 
- */ - com.google.api.MonitoredResourceDescriptorOrBuilder getMonitoredResourcesOrBuilder( - int index); - - /** - * optional .google.api.Logging logging = 27; - * - *
-   * Logging configuration of the service.
-   * 
- */ - boolean hasLogging(); - /** - * optional .google.api.Logging logging = 27; - * - *
-   * Logging configuration of the service.
-   * 
- */ - com.google.api.Logging getLogging(); - /** - * optional .google.api.Logging logging = 27; - * - *
-   * Logging configuration of the service.
-   * 
- */ - com.google.api.LoggingOrBuilder getLoggingOrBuilder(); - - /** - * optional .google.api.Monitoring monitoring = 28; - * - *
-   * Monitoring configuration of the service.
-   * 
- */ - boolean hasMonitoring(); - /** - * optional .google.api.Monitoring monitoring = 28; - * - *
-   * Monitoring configuration of the service.
-   * 
- */ - com.google.api.Monitoring getMonitoring(); - /** - * optional .google.api.Monitoring monitoring = 28; - * - *
-   * Monitoring configuration of the service.
-   * 
- */ - com.google.api.MonitoringOrBuilder getMonitoringOrBuilder(); - - /** - * 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 eb49ec2b0d6b..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceProto.java +++ /dev/null @@ -1,126 +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\025google/api/auth." + - "proto\032\030google/api/context.proto\032\030google/" + - "api/control.proto\032\036google/api/documentat" + - "ion.proto\032\026google/api/error.proto\032\025googl" + - "e/api/http.proto\032\024google/api/log.proto\032\030" + - "google/api/logging.proto\032\027google/api/met", - "ric.proto\032#google/api/monitored_resource" + - ".proto\032\033google/api/monitoring.proto\032\026goo" + - "gle/api/usage.proto\032\033google/api/visibili" + - "ty.proto\"\227\007\n\007Service\0224\n\016config_version\030\024" + - " \001(\0132\034.google.protobuf.UInt32Value\022\014\n\004na" + - "me\030\001 \001(\t\022\r\n\005title\030\002 \001(\t\022\033\n\023producer_proj" + - "ect_id\030\026 \001(\t\022\"\n\004apis\030\003 \003(\0132\024.google.prot" + - "obuf.Api\022$\n\005types\030\004 \003(\0132\025.google.protobu" + - "f.Type\022$\n\005enums\030\005 \003(\0132\025.google.protobuf." + - "Enum\0220\n\rdocumentation\030\006 \001(\0132\031.google.api", - ".Documentation\022*\n\nvisibility\030\007 \001(\0132\026.goo" + - "gle.api.Visibility\022\036\n\004http\030\t \001(\0132\020.googl" + - "e.api.Http\0222\n\016authentication\030\013 \001(\0132\032.goo" + - "gle.api.Authentication\022$\n\007context\030\014 \001(\0132" + - "\023.google.api.Context\022 \n\005usage\030\017 \001(\0132\021.go" + - "ogle.api.Usage\022-\n\014custom_error\030\020 \001(\0132\027.g" + - "oogle.api.CustomError\022$\n\007control\030\025 \001(\0132\023" + - ".google.api.Control\022\'\n\004logs\030\027 \003(\0132\031.goog" + - "le.api.LogDescriptor\022-\n\007metrics\030\030 \003(\0132\034." + - "google.api.MetricDescriptor\022D\n\023monitored", - "_resources\030\031 \003(\0132\'.google.api.MonitoredR" + - "esourceDescriptor\022$\n\007logging\030\033 \001(\0132\023.goo" + - "gle.api.Logging\022*\n\nmonitoring\030\034 \001(\0132\026.go" + - "ogle.api.Monitoring\022@\n\014derived_data\030d \001(" + - "\0132\024.google.protobuf.AnyB\024\372\322\344\223\002\016\022\014GOOGLE_" + - "TOOLS\022+\n\014system_types\030f \003(\0132\025.google.pro" + - "tobuf.TypeB \n\016com.google.apiB\014ServicePro" + - "toP\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.AuthProto.getDescriptor(), - com.google.api.ContextProto.getDescriptor(), - com.google.api.ControlProto.getDescriptor(), - com.google.api.DocumentationProto.getDescriptor(), - com.google.api.ErrorFormatProto.getDescriptor(), - com.google.api.HttpProto.getDescriptor(), - com.google.api.LogProto.getDescriptor(), - com.google.api.LoggingProto.getDescriptor(), - com.google.api.MetricProto.getDescriptor(), - com.google.api.MonitoredResourceProto.getDescriptor(), - com.google.api.MonitoringProto.getDescriptor(), - com.google.api.UsageProto.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", "Authentication", "Context", "Usage", "CustomError", "Control", "Logs", "Metrics", "MonitoredResources", "Logging", "Monitoring", "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.AuthProto.getDescriptor(); - com.google.api.ContextProto.getDescriptor(); - com.google.api.ControlProto.getDescriptor(); - com.google.api.DocumentationProto.getDescriptor(); - com.google.api.ErrorFormatProto.getDescriptor(); - com.google.api.HttpProto.getDescriptor(); - com.google.api.LogProto.getDescriptor(); - com.google.api.LoggingProto.getDescriptor(); - com.google.api.MetricProto.getDescriptor(); - com.google.api.MonitoredResourceProto.getDescriptor(); - com.google.api.MonitoringProto.getDescriptor(); - com.google.api.UsageProto.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/Usage.java b/gcloud-java-gax/generated/src/main/java/com/google/api/Usage.java deleted file mode 100644 index 2c98bd847a24..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/Usage.java +++ /dev/null @@ -1,2088 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/usage.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.Usage} - * - *
- * Configuration controlling usage of a service.
- * 
- */ -public final class Usage extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.Usage) - UsageOrBuilder { - // Use Usage.newBuilder() to construct. - private Usage(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Usage() { - serviceAccess_ = 0; - requirements_ = com.google.protobuf.LazyStringArrayList.EMPTY; - dependsOnServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; - activationHooks_ = com.google.protobuf.LazyStringArrayList.EMPTY; - deactivationHooks_ = com.google.protobuf.LazyStringArrayList.EMPTY; - rules_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Usage( - 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_ & 0x00000002) == 0x00000002)) { - requirements_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - requirements_.add(s); - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - dependsOnServices_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - dependsOnServices_.add(s); - break; - } - case 26: { - String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - activationHooks_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - activationHooks_.add(s); - break; - } - case 32: { - int rawValue = input.readEnum(); - - serviceAccess_ = rawValue; - break; - } - case 42: { - String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - deactivationHooks_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000010; - } - deactivationHooks_.add(s); - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - rules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - rules_.add(input.readMessage(com.google.api.UsageRule.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)) { - requirements_ = requirements_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - dependsOnServices_ = dependsOnServices_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - activationHooks_ = activationHooks_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - deactivationHooks_ = deactivationHooks_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.UsageProto.internal_static_google_api_Usage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.UsageProto.internal_static_google_api_Usage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Usage.class, com.google.api.Usage.Builder.class); - } - - /** - * Protobuf enum {@code google.api.Usage.ServiceAccess} - * - *
-   * Service access types.
-   * Access to restricted API features is always controlled by
-   * [visibility][google.api.Visibility], independent of the ServiceAccess type.
-   * (--GOOGLE_INTERNAL: Services using one of the ORG_ options will be
-   * restricted to everyone@google.com --)
-   * 
- */ - public enum ServiceAccess - implements com.google.protobuf.ProtocolMessageEnum { - /** - * RESTRICTED = 0; - * - *
-     * The service can only be seen/used by users identified in the service's
-     * access control policy.
-     * If the service has not been whitelisted by your domain administrator
-     * for out-of-org publishing, then this mode will be treated like
-     * ORG_RESTRICTED.
-     * 
- */ - RESTRICTED(0, 0), - /** - * PUBLIC = 1; - * - *
-     * The service can be seen/used by anyone.
-     * If the service has not been whitelisted by your domain administrator
-     * for out-of-org publishing, then this mode will be treated like
-     * ORG_PUBLIC.
-     * The discovery document for the service will also be public and allow
-     * allow unregistered access.
-     * 
- */ - PUBLIC(1, 1), - /** - * ORG_RESTRICTED = 2; - * - *
-     * The service can be seen/used by users identified in the service's
-     * access control policy.  Access is further constrained to the group
-     * controlled by the administrator of the project/org that owns the
-     * service.
-     * 
- */ - ORG_RESTRICTED(2, 2), - /** - * ORG_PUBLIC = 3; - * - *
-     * The service can be seen/used by the group of users controlled by the
-     * administrator of the project/org that owns the service.
-     * 
- */ - ORG_PUBLIC(3, 3), - UNRECOGNIZED(-1, -1), - ; - - /** - * RESTRICTED = 0; - * - *
-     * The service can only be seen/used by users identified in the service's
-     * access control policy.
-     * If the service has not been whitelisted by your domain administrator
-     * for out-of-org publishing, then this mode will be treated like
-     * ORG_RESTRICTED.
-     * 
- */ - public static final int RESTRICTED_VALUE = 0; - /** - * PUBLIC = 1; - * - *
-     * The service can be seen/used by anyone.
-     * If the service has not been whitelisted by your domain administrator
-     * for out-of-org publishing, then this mode will be treated like
-     * ORG_PUBLIC.
-     * The discovery document for the service will also be public and allow
-     * allow unregistered access.
-     * 
- */ - public static final int PUBLIC_VALUE = 1; - /** - * ORG_RESTRICTED = 2; - * - *
-     * The service can be seen/used by users identified in the service's
-     * access control policy.  Access is further constrained to the group
-     * controlled by the administrator of the project/org that owns the
-     * service.
-     * 
- */ - public static final int ORG_RESTRICTED_VALUE = 2; - /** - * ORG_PUBLIC = 3; - * - *
-     * The service can be seen/used by the group of users controlled by the
-     * administrator of the project/org that owns the service.
-     * 
- */ - public static final int ORG_PUBLIC_VALUE = 3; - - - 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 ServiceAccess valueOf(int value) { - switch (value) { - case 0: return RESTRICTED; - case 1: return PUBLIC; - case 2: return ORG_RESTRICTED; - case 3: return ORG_PUBLIC; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ServiceAccess> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ServiceAccess findValueByNumber(int number) { - return ServiceAccess.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.api.Usage.getDescriptor().getEnumTypes().get(0); - } - - private static final ServiceAccess[] VALUES = values(); - - public static ServiceAccess 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 ServiceAccess(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.api.Usage.ServiceAccess) - } - - private int bitField0_; - public static final int SERVICE_ACCESS_FIELD_NUMBER = 4; - private int serviceAccess_; - /** - * optional .google.api.Usage.ServiceAccess service_access = 4; - * - *
-   * Controls which users can see or activate the service.
-   * 
- */ - public int getServiceAccessValue() { - return serviceAccess_; - } - /** - * optional .google.api.Usage.ServiceAccess service_access = 4; - * - *
-   * Controls which users can see or activate the service.
-   * 
- */ - public com.google.api.Usage.ServiceAccess getServiceAccess() { - com.google.api.Usage.ServiceAccess result = com.google.api.Usage.ServiceAccess.valueOf(serviceAccess_); - return result == null ? com.google.api.Usage.ServiceAccess.UNRECOGNIZED : result; - } - - public static final int REQUIREMENTS_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList requirements_; - /** - * repeated string requirements = 1; - * - *
-   * Requirements that must be satisfied before a consumer project can use the
-   * service. Each requirement is of the form <service.name>/<requirement-id>;
-   * for example 'serviceusage.googleapis.com/billing-enabled'.
-   * 
- */ - public com.google.protobuf.ProtocolStringList - getRequirementsList() { - return requirements_; - } - /** - * repeated string requirements = 1; - * - *
-   * Requirements that must be satisfied before a consumer project can use the
-   * service. Each requirement is of the form <service.name>/<requirement-id>;
-   * for example 'serviceusage.googleapis.com/billing-enabled'.
-   * 
- */ - public int getRequirementsCount() { - return requirements_.size(); - } - /** - * repeated string requirements = 1; - * - *
-   * Requirements that must be satisfied before a consumer project can use the
-   * service. Each requirement is of the form <service.name>/<requirement-id>;
-   * for example 'serviceusage.googleapis.com/billing-enabled'.
-   * 
- */ - public java.lang.String getRequirements(int index) { - return requirements_.get(index); - } - /** - * repeated string requirements = 1; - * - *
-   * Requirements that must be satisfied before a consumer project can use the
-   * service. Each requirement is of the form <service.name>/<requirement-id>;
-   * for example 'serviceusage.googleapis.com/billing-enabled'.
-   * 
- */ - public com.google.protobuf.ByteString - getRequirementsBytes(int index) { - return requirements_.getByteString(index); - } - - public static final int DEPENDS_ON_SERVICES_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList dependsOnServices_; - /** - * repeated string depends_on_services = 2; - * - *
-   * Services that must be activated in order for this service to be used.
-   * The set of services activated as a result of these relations are all
-   * activated in parallel with no guaranteed order of activation.
-   * Each string is a service name, e.g. `calendar.googleapis.com`.
-   * 
- */ - public com.google.protobuf.ProtocolStringList - getDependsOnServicesList() { - return dependsOnServices_; - } - /** - * repeated string depends_on_services = 2; - * - *
-   * Services that must be activated in order for this service to be used.
-   * The set of services activated as a result of these relations are all
-   * activated in parallel with no guaranteed order of activation.
-   * Each string is a service name, e.g. `calendar.googleapis.com`.
-   * 
- */ - public int getDependsOnServicesCount() { - return dependsOnServices_.size(); - } - /** - * repeated string depends_on_services = 2; - * - *
-   * Services that must be activated in order for this service to be used.
-   * The set of services activated as a result of these relations are all
-   * activated in parallel with no guaranteed order of activation.
-   * Each string is a service name, e.g. `calendar.googleapis.com`.
-   * 
- */ - public java.lang.String getDependsOnServices(int index) { - return dependsOnServices_.get(index); - } - /** - * repeated string depends_on_services = 2; - * - *
-   * Services that must be activated in order for this service to be used.
-   * The set of services activated as a result of these relations are all
-   * activated in parallel with no guaranteed order of activation.
-   * Each string is a service name, e.g. `calendar.googleapis.com`.
-   * 
- */ - public com.google.protobuf.ByteString - getDependsOnServicesBytes(int index) { - return dependsOnServices_.getByteString(index); - } - - public static final int ACTIVATION_HOOKS_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList activationHooks_; - /** - * repeated string activation_hooks = 3; - * - *
-   * Services that must be contacted before a consumer can begin using the
-   * service. Each service will be contacted in sequence, and, if any activation
-   * call fails, the entire activation will fail. Each hook is of the form
-   * <service.name>/<hook-id>, where <hook-id> is optional; for example:
-   * 'robotservice.googleapis.com/default'.
-   * 
- */ - public com.google.protobuf.ProtocolStringList - getActivationHooksList() { - return activationHooks_; - } - /** - * repeated string activation_hooks = 3; - * - *
-   * Services that must be contacted before a consumer can begin using the
-   * service. Each service will be contacted in sequence, and, if any activation
-   * call fails, the entire activation will fail. Each hook is of the form
-   * <service.name>/<hook-id>, where <hook-id> is optional; for example:
-   * 'robotservice.googleapis.com/default'.
-   * 
- */ - public int getActivationHooksCount() { - return activationHooks_.size(); - } - /** - * repeated string activation_hooks = 3; - * - *
-   * Services that must be contacted before a consumer can begin using the
-   * service. Each service will be contacted in sequence, and, if any activation
-   * call fails, the entire activation will fail. Each hook is of the form
-   * <service.name>/<hook-id>, where <hook-id> is optional; for example:
-   * 'robotservice.googleapis.com/default'.
-   * 
- */ - public java.lang.String getActivationHooks(int index) { - return activationHooks_.get(index); - } - /** - * repeated string activation_hooks = 3; - * - *
-   * Services that must be contacted before a consumer can begin using the
-   * service. Each service will be contacted in sequence, and, if any activation
-   * call fails, the entire activation will fail. Each hook is of the form
-   * <service.name>/<hook-id>, where <hook-id> is optional; for example:
-   * 'robotservice.googleapis.com/default'.
-   * 
- */ - public com.google.protobuf.ByteString - getActivationHooksBytes(int index) { - return activationHooks_.getByteString(index); - } - - public static final int DEACTIVATION_HOOKS_FIELD_NUMBER = 5; - private com.google.protobuf.LazyStringList deactivationHooks_; - /** - * repeated string deactivation_hooks = 5; - * - *
-   * Services that must be contacted before a consumer can deactivate a
-   * service. Each service will be contacted in sequence, and, if any
-   * deactivation call fails, the entire deactivation will fail. Each hook is
-   * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
-   * example:
-   * 'compute.googleapis.com/'.
-   * 
- */ - public com.google.protobuf.ProtocolStringList - getDeactivationHooksList() { - return deactivationHooks_; - } - /** - * repeated string deactivation_hooks = 5; - * - *
-   * Services that must be contacted before a consumer can deactivate a
-   * service. Each service will be contacted in sequence, and, if any
-   * deactivation call fails, the entire deactivation will fail. Each hook is
-   * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
-   * example:
-   * 'compute.googleapis.com/'.
-   * 
- */ - public int getDeactivationHooksCount() { - return deactivationHooks_.size(); - } - /** - * repeated string deactivation_hooks = 5; - * - *
-   * Services that must be contacted before a consumer can deactivate a
-   * service. Each service will be contacted in sequence, and, if any
-   * deactivation call fails, the entire deactivation will fail. Each hook is
-   * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
-   * example:
-   * 'compute.googleapis.com/'.
-   * 
- */ - public java.lang.String getDeactivationHooks(int index) { - return deactivationHooks_.get(index); - } - /** - * repeated string deactivation_hooks = 5; - * - *
-   * Services that must be contacted before a consumer can deactivate a
-   * service. Each service will be contacted in sequence, and, if any
-   * deactivation call fails, the entire deactivation will fail. Each hook is
-   * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
-   * example:
-   * 'compute.googleapis.com/'.
-   * 
- */ - public com.google.protobuf.ByteString - getDeactivationHooksBytes(int index) { - return deactivationHooks_.getByteString(index); - } - - public static final int RULES_FIELD_NUMBER = 6; - private java.util.List rules_; - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-   * Individual rules for configuring usage on selected methods.
-   * 
- */ - public java.util.List getRulesList() { - return rules_; - } - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-   * Individual rules for configuring usage on selected methods.
-   * 
- */ - public java.util.List - getRulesOrBuilderList() { - return rules_; - } - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-   * Individual rules for configuring usage on selected methods.
-   * 
- */ - public int getRulesCount() { - return rules_.size(); - } - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-   * Individual rules for configuring usage on selected methods.
-   * 
- */ - public com.google.api.UsageRule getRules(int index) { - return rules_.get(index); - } - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-   * Individual rules for configuring usage on selected methods.
-   * 
- */ - public com.google.api.UsageRuleOrBuilder 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 < requirements_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, requirements_.getRaw(i)); - } - for (int i = 0; i < dependsOnServices_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, dependsOnServices_.getRaw(i)); - } - for (int i = 0; i < activationHooks_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, activationHooks_.getRaw(i)); - } - if (serviceAccess_ != com.google.api.Usage.ServiceAccess.RESTRICTED.getNumber()) { - output.writeEnum(4, serviceAccess_); - } - for (int i = 0; i < deactivationHooks_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 5, deactivationHooks_.getRaw(i)); - } - for (int i = 0; i < rules_.size(); i++) { - output.writeMessage(6, rules_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < requirements_.size(); i++) { - dataSize += computeStringSizeNoTag(requirements_.getRaw(i)); - } - size += dataSize; - size += 1 * getRequirementsList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < dependsOnServices_.size(); i++) { - dataSize += computeStringSizeNoTag(dependsOnServices_.getRaw(i)); - } - size += dataSize; - size += 1 * getDependsOnServicesList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < activationHooks_.size(); i++) { - dataSize += computeStringSizeNoTag(activationHooks_.getRaw(i)); - } - size += dataSize; - size += 1 * getActivationHooksList().size(); - } - if (serviceAccess_ != com.google.api.Usage.ServiceAccess.RESTRICTED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, serviceAccess_); - } - { - int dataSize = 0; - for (int i = 0; i < deactivationHooks_.size(); i++) { - dataSize += computeStringSizeNoTag(deactivationHooks_.getRaw(i)); - } - size += dataSize; - size += 1 * getDeactivationHooksList().size(); - } - for (int i = 0; i < rules_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, rules_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.Usage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Usage 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.Usage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Usage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.Usage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Usage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.Usage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.Usage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.Usage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Usage 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.Usage 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.Usage} - * - *
-   * Configuration controlling usage of a service.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.Usage) - com.google.api.UsageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.UsageProto.internal_static_google_api_Usage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.UsageProto.internal_static_google_api_Usage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Usage.class, com.google.api.Usage.Builder.class); - } - - // Construct using com.google.api.Usage.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(); - serviceAccess_ = 0; - - requirements_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - dependsOnServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - activationHooks_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - deactivationHooks_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - if (rulesBuilder_ == null) { - rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - rulesBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.UsageProto.internal_static_google_api_Usage_descriptor; - } - - public com.google.api.Usage getDefaultInstanceForType() { - return com.google.api.Usage.getDefaultInstance(); - } - - public com.google.api.Usage build() { - com.google.api.Usage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.Usage buildPartial() { - com.google.api.Usage result = new com.google.api.Usage(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.serviceAccess_ = serviceAccess_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - requirements_ = requirements_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.requirements_ = requirements_; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - dependsOnServices_ = dependsOnServices_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.dependsOnServices_ = dependsOnServices_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - activationHooks_ = activationHooks_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.activationHooks_ = activationHooks_; - if (((bitField0_ & 0x00000010) == 0x00000010)) { - deactivationHooks_ = deactivationHooks_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.deactivationHooks_ = deactivationHooks_; - if (rulesBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.rules_ = rules_; - } else { - result.rules_ = rulesBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.Usage) { - return mergeFrom((com.google.api.Usage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.Usage other) { - if (other == com.google.api.Usage.getDefaultInstance()) return this; - if (other.serviceAccess_ != 0) { - setServiceAccessValue(other.getServiceAccessValue()); - } - if (!other.requirements_.isEmpty()) { - if (requirements_.isEmpty()) { - requirements_ = other.requirements_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureRequirementsIsMutable(); - requirements_.addAll(other.requirements_); - } - onChanged(); - } - if (!other.dependsOnServices_.isEmpty()) { - if (dependsOnServices_.isEmpty()) { - dependsOnServices_ = other.dependsOnServices_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureDependsOnServicesIsMutable(); - dependsOnServices_.addAll(other.dependsOnServices_); - } - onChanged(); - } - if (!other.activationHooks_.isEmpty()) { - if (activationHooks_.isEmpty()) { - activationHooks_ = other.activationHooks_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureActivationHooksIsMutable(); - activationHooks_.addAll(other.activationHooks_); - } - onChanged(); - } - if (!other.deactivationHooks_.isEmpty()) { - if (deactivationHooks_.isEmpty()) { - deactivationHooks_ = other.deactivationHooks_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureDeactivationHooksIsMutable(); - deactivationHooks_.addAll(other.deactivationHooks_); - } - onChanged(); - } - if (rulesBuilder_ == null) { - if (!other.rules_.isEmpty()) { - if (rules_.isEmpty()) { - rules_ = other.rules_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureRulesIsMutable(); - rules_.addAll(other.rules_); - } - onChanged(); - } - } else { - if (!other.rules_.isEmpty()) { - if (rulesBuilder_.isEmpty()) { - rulesBuilder_.dispose(); - rulesBuilder_ = null; - rules_ = other.rules_; - bitField0_ = (bitField0_ & ~0x00000020); - 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.Usage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.Usage) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int serviceAccess_ = 0; - /** - * optional .google.api.Usage.ServiceAccess service_access = 4; - * - *
-     * Controls which users can see or activate the service.
-     * 
- */ - public int getServiceAccessValue() { - return serviceAccess_; - } - /** - * optional .google.api.Usage.ServiceAccess service_access = 4; - * - *
-     * Controls which users can see or activate the service.
-     * 
- */ - public Builder setServiceAccessValue(int value) { - serviceAccess_ = value; - onChanged(); - return this; - } - /** - * optional .google.api.Usage.ServiceAccess service_access = 4; - * - *
-     * Controls which users can see or activate the service.
-     * 
- */ - public com.google.api.Usage.ServiceAccess getServiceAccess() { - com.google.api.Usage.ServiceAccess result = com.google.api.Usage.ServiceAccess.valueOf(serviceAccess_); - return result == null ? com.google.api.Usage.ServiceAccess.UNRECOGNIZED : result; - } - /** - * optional .google.api.Usage.ServiceAccess service_access = 4; - * - *
-     * Controls which users can see or activate the service.
-     * 
- */ - public Builder setServiceAccess(com.google.api.Usage.ServiceAccess value) { - if (value == null) { - throw new NullPointerException(); - } - - serviceAccess_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .google.api.Usage.ServiceAccess service_access = 4; - * - *
-     * Controls which users can see or activate the service.
-     * 
- */ - public Builder clearServiceAccess() { - - serviceAccess_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList requirements_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureRequirementsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - requirements_ = new com.google.protobuf.LazyStringArrayList(requirements_); - bitField0_ |= 0x00000002; - } - } - /** - * repeated string requirements = 1; - * - *
-     * Requirements that must be satisfied before a consumer project can use the
-     * service. Each requirement is of the form <service.name>/<requirement-id>;
-     * for example 'serviceusage.googleapis.com/billing-enabled'.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getRequirementsList() { - return requirements_.getUnmodifiableView(); - } - /** - * repeated string requirements = 1; - * - *
-     * Requirements that must be satisfied before a consumer project can use the
-     * service. Each requirement is of the form <service.name>/<requirement-id>;
-     * for example 'serviceusage.googleapis.com/billing-enabled'.
-     * 
- */ - public int getRequirementsCount() { - return requirements_.size(); - } - /** - * repeated string requirements = 1; - * - *
-     * Requirements that must be satisfied before a consumer project can use the
-     * service. Each requirement is of the form <service.name>/<requirement-id>;
-     * for example 'serviceusage.googleapis.com/billing-enabled'.
-     * 
- */ - public java.lang.String getRequirements(int index) { - return requirements_.get(index); - } - /** - * repeated string requirements = 1; - * - *
-     * Requirements that must be satisfied before a consumer project can use the
-     * service. Each requirement is of the form <service.name>/<requirement-id>;
-     * for example 'serviceusage.googleapis.com/billing-enabled'.
-     * 
- */ - public com.google.protobuf.ByteString - getRequirementsBytes(int index) { - return requirements_.getByteString(index); - } - /** - * repeated string requirements = 1; - * - *
-     * Requirements that must be satisfied before a consumer project can use the
-     * service. Each requirement is of the form <service.name>/<requirement-id>;
-     * for example 'serviceusage.googleapis.com/billing-enabled'.
-     * 
- */ - public Builder setRequirements( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequirementsIsMutable(); - requirements_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string requirements = 1; - * - *
-     * Requirements that must be satisfied before a consumer project can use the
-     * service. Each requirement is of the form <service.name>/<requirement-id>;
-     * for example 'serviceusage.googleapis.com/billing-enabled'.
-     * 
- */ - public Builder addRequirements( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequirementsIsMutable(); - requirements_.add(value); - onChanged(); - return this; - } - /** - * repeated string requirements = 1; - * - *
-     * Requirements that must be satisfied before a consumer project can use the
-     * service. Each requirement is of the form <service.name>/<requirement-id>;
-     * for example 'serviceusage.googleapis.com/billing-enabled'.
-     * 
- */ - public Builder addAllRequirements( - java.lang.Iterable values) { - ensureRequirementsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, requirements_); - onChanged(); - return this; - } - /** - * repeated string requirements = 1; - * - *
-     * Requirements that must be satisfied before a consumer project can use the
-     * service. Each requirement is of the form <service.name>/<requirement-id>;
-     * for example 'serviceusage.googleapis.com/billing-enabled'.
-     * 
- */ - public Builder clearRequirements() { - requirements_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * repeated string requirements = 1; - * - *
-     * Requirements that must be satisfied before a consumer project can use the
-     * service. Each requirement is of the form <service.name>/<requirement-id>;
-     * for example 'serviceusage.googleapis.com/billing-enabled'.
-     * 
- */ - public Builder addRequirementsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureRequirementsIsMutable(); - requirements_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList dependsOnServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureDependsOnServicesIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - dependsOnServices_ = new com.google.protobuf.LazyStringArrayList(dependsOnServices_); - bitField0_ |= 0x00000004; - } - } - /** - * repeated string depends_on_services = 2; - * - *
-     * Services that must be activated in order for this service to be used.
-     * The set of services activated as a result of these relations are all
-     * activated in parallel with no guaranteed order of activation.
-     * Each string is a service name, e.g. `calendar.googleapis.com`.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getDependsOnServicesList() { - return dependsOnServices_.getUnmodifiableView(); - } - /** - * repeated string depends_on_services = 2; - * - *
-     * Services that must be activated in order for this service to be used.
-     * The set of services activated as a result of these relations are all
-     * activated in parallel with no guaranteed order of activation.
-     * Each string is a service name, e.g. `calendar.googleapis.com`.
-     * 
- */ - public int getDependsOnServicesCount() { - return dependsOnServices_.size(); - } - /** - * repeated string depends_on_services = 2; - * - *
-     * Services that must be activated in order for this service to be used.
-     * The set of services activated as a result of these relations are all
-     * activated in parallel with no guaranteed order of activation.
-     * Each string is a service name, e.g. `calendar.googleapis.com`.
-     * 
- */ - public java.lang.String getDependsOnServices(int index) { - return dependsOnServices_.get(index); - } - /** - * repeated string depends_on_services = 2; - * - *
-     * Services that must be activated in order for this service to be used.
-     * The set of services activated as a result of these relations are all
-     * activated in parallel with no guaranteed order of activation.
-     * Each string is a service name, e.g. `calendar.googleapis.com`.
-     * 
- */ - public com.google.protobuf.ByteString - getDependsOnServicesBytes(int index) { - return dependsOnServices_.getByteString(index); - } - /** - * repeated string depends_on_services = 2; - * - *
-     * Services that must be activated in order for this service to be used.
-     * The set of services activated as a result of these relations are all
-     * activated in parallel with no guaranteed order of activation.
-     * Each string is a service name, e.g. `calendar.googleapis.com`.
-     * 
- */ - public Builder setDependsOnServices( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDependsOnServicesIsMutable(); - dependsOnServices_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string depends_on_services = 2; - * - *
-     * Services that must be activated in order for this service to be used.
-     * The set of services activated as a result of these relations are all
-     * activated in parallel with no guaranteed order of activation.
-     * Each string is a service name, e.g. `calendar.googleapis.com`.
-     * 
- */ - public Builder addDependsOnServices( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDependsOnServicesIsMutable(); - dependsOnServices_.add(value); - onChanged(); - return this; - } - /** - * repeated string depends_on_services = 2; - * - *
-     * Services that must be activated in order for this service to be used.
-     * The set of services activated as a result of these relations are all
-     * activated in parallel with no guaranteed order of activation.
-     * Each string is a service name, e.g. `calendar.googleapis.com`.
-     * 
- */ - public Builder addAllDependsOnServices( - java.lang.Iterable values) { - ensureDependsOnServicesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, dependsOnServices_); - onChanged(); - return this; - } - /** - * repeated string depends_on_services = 2; - * - *
-     * Services that must be activated in order for this service to be used.
-     * The set of services activated as a result of these relations are all
-     * activated in parallel with no guaranteed order of activation.
-     * Each string is a service name, e.g. `calendar.googleapis.com`.
-     * 
- */ - public Builder clearDependsOnServices() { - dependsOnServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * repeated string depends_on_services = 2; - * - *
-     * Services that must be activated in order for this service to be used.
-     * The set of services activated as a result of these relations are all
-     * activated in parallel with no guaranteed order of activation.
-     * Each string is a service name, e.g. `calendar.googleapis.com`.
-     * 
- */ - public Builder addDependsOnServicesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureDependsOnServicesIsMutable(); - dependsOnServices_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList activationHooks_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureActivationHooksIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - activationHooks_ = new com.google.protobuf.LazyStringArrayList(activationHooks_); - bitField0_ |= 0x00000008; - } - } - /** - * repeated string activation_hooks = 3; - * - *
-     * Services that must be contacted before a consumer can begin using the
-     * service. Each service will be contacted in sequence, and, if any activation
-     * call fails, the entire activation will fail. Each hook is of the form
-     * <service.name>/<hook-id>, where <hook-id> is optional; for example:
-     * 'robotservice.googleapis.com/default'.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getActivationHooksList() { - return activationHooks_.getUnmodifiableView(); - } - /** - * repeated string activation_hooks = 3; - * - *
-     * Services that must be contacted before a consumer can begin using the
-     * service. Each service will be contacted in sequence, and, if any activation
-     * call fails, the entire activation will fail. Each hook is of the form
-     * <service.name>/<hook-id>, where <hook-id> is optional; for example:
-     * 'robotservice.googleapis.com/default'.
-     * 
- */ - public int getActivationHooksCount() { - return activationHooks_.size(); - } - /** - * repeated string activation_hooks = 3; - * - *
-     * Services that must be contacted before a consumer can begin using the
-     * service. Each service will be contacted in sequence, and, if any activation
-     * call fails, the entire activation will fail. Each hook is of the form
-     * <service.name>/<hook-id>, where <hook-id> is optional; for example:
-     * 'robotservice.googleapis.com/default'.
-     * 
- */ - public java.lang.String getActivationHooks(int index) { - return activationHooks_.get(index); - } - /** - * repeated string activation_hooks = 3; - * - *
-     * Services that must be contacted before a consumer can begin using the
-     * service. Each service will be contacted in sequence, and, if any activation
-     * call fails, the entire activation will fail. Each hook is of the form
-     * <service.name>/<hook-id>, where <hook-id> is optional; for example:
-     * 'robotservice.googleapis.com/default'.
-     * 
- */ - public com.google.protobuf.ByteString - getActivationHooksBytes(int index) { - return activationHooks_.getByteString(index); - } - /** - * repeated string activation_hooks = 3; - * - *
-     * Services that must be contacted before a consumer can begin using the
-     * service. Each service will be contacted in sequence, and, if any activation
-     * call fails, the entire activation will fail. Each hook is of the form
-     * <service.name>/<hook-id>, where <hook-id> is optional; for example:
-     * 'robotservice.googleapis.com/default'.
-     * 
- */ - public Builder setActivationHooks( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureActivationHooksIsMutable(); - activationHooks_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string activation_hooks = 3; - * - *
-     * Services that must be contacted before a consumer can begin using the
-     * service. Each service will be contacted in sequence, and, if any activation
-     * call fails, the entire activation will fail. Each hook is of the form
-     * <service.name>/<hook-id>, where <hook-id> is optional; for example:
-     * 'robotservice.googleapis.com/default'.
-     * 
- */ - public Builder addActivationHooks( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureActivationHooksIsMutable(); - activationHooks_.add(value); - onChanged(); - return this; - } - /** - * repeated string activation_hooks = 3; - * - *
-     * Services that must be contacted before a consumer can begin using the
-     * service. Each service will be contacted in sequence, and, if any activation
-     * call fails, the entire activation will fail. Each hook is of the form
-     * <service.name>/<hook-id>, where <hook-id> is optional; for example:
-     * 'robotservice.googleapis.com/default'.
-     * 
- */ - public Builder addAllActivationHooks( - java.lang.Iterable values) { - ensureActivationHooksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, activationHooks_); - onChanged(); - return this; - } - /** - * repeated string activation_hooks = 3; - * - *
-     * Services that must be contacted before a consumer can begin using the
-     * service. Each service will be contacted in sequence, and, if any activation
-     * call fails, the entire activation will fail. Each hook is of the form
-     * <service.name>/<hook-id>, where <hook-id> is optional; for example:
-     * 'robotservice.googleapis.com/default'.
-     * 
- */ - public Builder clearActivationHooks() { - activationHooks_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * repeated string activation_hooks = 3; - * - *
-     * Services that must be contacted before a consumer can begin using the
-     * service. Each service will be contacted in sequence, and, if any activation
-     * call fails, the entire activation will fail. Each hook is of the form
-     * <service.name>/<hook-id>, where <hook-id> is optional; for example:
-     * 'robotservice.googleapis.com/default'.
-     * 
- */ - public Builder addActivationHooksBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureActivationHooksIsMutable(); - activationHooks_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList deactivationHooks_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureDeactivationHooksIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { - deactivationHooks_ = new com.google.protobuf.LazyStringArrayList(deactivationHooks_); - bitField0_ |= 0x00000010; - } - } - /** - * repeated string deactivation_hooks = 5; - * - *
-     * Services that must be contacted before a consumer can deactivate a
-     * service. Each service will be contacted in sequence, and, if any
-     * deactivation call fails, the entire deactivation will fail. Each hook is
-     * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
-     * example:
-     * 'compute.googleapis.com/'.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getDeactivationHooksList() { - return deactivationHooks_.getUnmodifiableView(); - } - /** - * repeated string deactivation_hooks = 5; - * - *
-     * Services that must be contacted before a consumer can deactivate a
-     * service. Each service will be contacted in sequence, and, if any
-     * deactivation call fails, the entire deactivation will fail. Each hook is
-     * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
-     * example:
-     * 'compute.googleapis.com/'.
-     * 
- */ - public int getDeactivationHooksCount() { - return deactivationHooks_.size(); - } - /** - * repeated string deactivation_hooks = 5; - * - *
-     * Services that must be contacted before a consumer can deactivate a
-     * service. Each service will be contacted in sequence, and, if any
-     * deactivation call fails, the entire deactivation will fail. Each hook is
-     * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
-     * example:
-     * 'compute.googleapis.com/'.
-     * 
- */ - public java.lang.String getDeactivationHooks(int index) { - return deactivationHooks_.get(index); - } - /** - * repeated string deactivation_hooks = 5; - * - *
-     * Services that must be contacted before a consumer can deactivate a
-     * service. Each service will be contacted in sequence, and, if any
-     * deactivation call fails, the entire deactivation will fail. Each hook is
-     * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
-     * example:
-     * 'compute.googleapis.com/'.
-     * 
- */ - public com.google.protobuf.ByteString - getDeactivationHooksBytes(int index) { - return deactivationHooks_.getByteString(index); - } - /** - * repeated string deactivation_hooks = 5; - * - *
-     * Services that must be contacted before a consumer can deactivate a
-     * service. Each service will be contacted in sequence, and, if any
-     * deactivation call fails, the entire deactivation will fail. Each hook is
-     * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
-     * example:
-     * 'compute.googleapis.com/'.
-     * 
- */ - public Builder setDeactivationHooks( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeactivationHooksIsMutable(); - deactivationHooks_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string deactivation_hooks = 5; - * - *
-     * Services that must be contacted before a consumer can deactivate a
-     * service. Each service will be contacted in sequence, and, if any
-     * deactivation call fails, the entire deactivation will fail. Each hook is
-     * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
-     * example:
-     * 'compute.googleapis.com/'.
-     * 
- */ - public Builder addDeactivationHooks( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeactivationHooksIsMutable(); - deactivationHooks_.add(value); - onChanged(); - return this; - } - /** - * repeated string deactivation_hooks = 5; - * - *
-     * Services that must be contacted before a consumer can deactivate a
-     * service. Each service will be contacted in sequence, and, if any
-     * deactivation call fails, the entire deactivation will fail. Each hook is
-     * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
-     * example:
-     * 'compute.googleapis.com/'.
-     * 
- */ - public Builder addAllDeactivationHooks( - java.lang.Iterable values) { - ensureDeactivationHooksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, deactivationHooks_); - onChanged(); - return this; - } - /** - * repeated string deactivation_hooks = 5; - * - *
-     * Services that must be contacted before a consumer can deactivate a
-     * service. Each service will be contacted in sequence, and, if any
-     * deactivation call fails, the entire deactivation will fail. Each hook is
-     * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
-     * example:
-     * 'compute.googleapis.com/'.
-     * 
- */ - public Builder clearDeactivationHooks() { - deactivationHooks_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * repeated string deactivation_hooks = 5; - * - *
-     * Services that must be contacted before a consumer can deactivate a
-     * service. Each service will be contacted in sequence, and, if any
-     * deactivation call fails, the entire deactivation will fail. Each hook is
-     * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
-     * example:
-     * 'compute.googleapis.com/'.
-     * 
- */ - public Builder addDeactivationHooksBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureDeactivationHooksIsMutable(); - deactivationHooks_.add(value); - onChanged(); - return this; - } - - private java.util.List rules_ = - java.util.Collections.emptyList(); - private void ensureRulesIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - rules_ = new java.util.ArrayList(rules_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.UsageRule, com.google.api.UsageRule.Builder, com.google.api.UsageRuleOrBuilder> rulesBuilder_; - - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-     * Individual rules for configuring usage on selected methods.
-     * 
- */ - public java.util.List getRulesList() { - if (rulesBuilder_ == null) { - return java.util.Collections.unmodifiableList(rules_); - } else { - return rulesBuilder_.getMessageList(); - } - } - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-     * Individual rules for configuring usage on selected methods.
-     * 
- */ - public int getRulesCount() { - if (rulesBuilder_ == null) { - return rules_.size(); - } else { - return rulesBuilder_.getCount(); - } - } - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-     * Individual rules for configuring usage on selected methods.
-     * 
- */ - public com.google.api.UsageRule getRules(int index) { - if (rulesBuilder_ == null) { - return rules_.get(index); - } else { - return rulesBuilder_.getMessage(index); - } - } - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-     * Individual rules for configuring usage on selected methods.
-     * 
- */ - public Builder setRules( - int index, com.google.api.UsageRule 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.UsageRule rules = 6; - * - *
-     * Individual rules for configuring usage on selected methods.
-     * 
- */ - public Builder setRules( - int index, com.google.api.UsageRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.set(index, builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-     * Individual rules for configuring usage on selected methods.
-     * 
- */ - public Builder addRules(com.google.api.UsageRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.add(value); - onChanged(); - } else { - rulesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-     * Individual rules for configuring usage on selected methods.
-     * 
- */ - public Builder addRules( - int index, com.google.api.UsageRule 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.UsageRule rules = 6; - * - *
-     * Individual rules for configuring usage on selected methods.
-     * 
- */ - public Builder addRules( - com.google.api.UsageRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-     * Individual rules for configuring usage on selected methods.
-     * 
- */ - public Builder addRules( - int index, com.google.api.UsageRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(index, builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-     * Individual rules for configuring usage on selected 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.UsageRule rules = 6; - * - *
-     * Individual rules for configuring usage on selected methods.
-     * 
- */ - public Builder clearRules() { - if (rulesBuilder_ == null) { - rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - rulesBuilder_.clear(); - } - return this; - } - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-     * Individual rules for configuring usage on selected methods.
-     * 
- */ - public Builder removeRules(int index) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.remove(index); - onChanged(); - } else { - rulesBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-     * Individual rules for configuring usage on selected methods.
-     * 
- */ - public com.google.api.UsageRule.Builder getRulesBuilder( - int index) { - return getRulesFieldBuilder().getBuilder(index); - } - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-     * Individual rules for configuring usage on selected methods.
-     * 
- */ - public com.google.api.UsageRuleOrBuilder getRulesOrBuilder( - int index) { - if (rulesBuilder_ == null) { - return rules_.get(index); } else { - return rulesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-     * Individual rules for configuring usage on selected methods.
-     * 
- */ - public java.util.List - getRulesOrBuilderList() { - if (rulesBuilder_ != null) { - return rulesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(rules_); - } - } - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-     * Individual rules for configuring usage on selected methods.
-     * 
- */ - public com.google.api.UsageRule.Builder addRulesBuilder() { - return getRulesFieldBuilder().addBuilder( - com.google.api.UsageRule.getDefaultInstance()); - } - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-     * Individual rules for configuring usage on selected methods.
-     * 
- */ - public com.google.api.UsageRule.Builder addRulesBuilder( - int index) { - return getRulesFieldBuilder().addBuilder( - index, com.google.api.UsageRule.getDefaultInstance()); - } - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-     * Individual rules for configuring usage on selected methods.
-     * 
- */ - public java.util.List - getRulesBuilderList() { - return getRulesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.UsageRule, com.google.api.UsageRule.Builder, com.google.api.UsageRuleOrBuilder> - getRulesFieldBuilder() { - if (rulesBuilder_ == null) { - rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.api.UsageRule, com.google.api.UsageRule.Builder, com.google.api.UsageRuleOrBuilder>( - rules_, - ((bitField0_ & 0x00000020) == 0x00000020), - 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.Usage) - } - - // @@protoc_insertion_point(class_scope:google.api.Usage) - private static final com.google.api.Usage DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.Usage(); - } - - public static com.google.api.Usage getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Usage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Usage(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.Usage getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/UsageOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/UsageOrBuilder.java deleted file mode 100644 index 283a6dbfcaa9..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/UsageOrBuilder.java +++ /dev/null @@ -1,266 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/usage.proto - -package com.google.api; - -public interface UsageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.Usage) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .google.api.Usage.ServiceAccess service_access = 4; - * - *
-   * Controls which users can see or activate the service.
-   * 
- */ - int getServiceAccessValue(); - /** - * optional .google.api.Usage.ServiceAccess service_access = 4; - * - *
-   * Controls which users can see or activate the service.
-   * 
- */ - com.google.api.Usage.ServiceAccess getServiceAccess(); - - /** - * repeated string requirements = 1; - * - *
-   * Requirements that must be satisfied before a consumer project can use the
-   * service. Each requirement is of the form <service.name>/<requirement-id>;
-   * for example 'serviceusage.googleapis.com/billing-enabled'.
-   * 
- */ - com.google.protobuf.ProtocolStringList - getRequirementsList(); - /** - * repeated string requirements = 1; - * - *
-   * Requirements that must be satisfied before a consumer project can use the
-   * service. Each requirement is of the form <service.name>/<requirement-id>;
-   * for example 'serviceusage.googleapis.com/billing-enabled'.
-   * 
- */ - int getRequirementsCount(); - /** - * repeated string requirements = 1; - * - *
-   * Requirements that must be satisfied before a consumer project can use the
-   * service. Each requirement is of the form <service.name>/<requirement-id>;
-   * for example 'serviceusage.googleapis.com/billing-enabled'.
-   * 
- */ - java.lang.String getRequirements(int index); - /** - * repeated string requirements = 1; - * - *
-   * Requirements that must be satisfied before a consumer project can use the
-   * service. Each requirement is of the form <service.name>/<requirement-id>;
-   * for example 'serviceusage.googleapis.com/billing-enabled'.
-   * 
- */ - com.google.protobuf.ByteString - getRequirementsBytes(int index); - - /** - * repeated string depends_on_services = 2; - * - *
-   * Services that must be activated in order for this service to be used.
-   * The set of services activated as a result of these relations are all
-   * activated in parallel with no guaranteed order of activation.
-   * Each string is a service name, e.g. `calendar.googleapis.com`.
-   * 
- */ - com.google.protobuf.ProtocolStringList - getDependsOnServicesList(); - /** - * repeated string depends_on_services = 2; - * - *
-   * Services that must be activated in order for this service to be used.
-   * The set of services activated as a result of these relations are all
-   * activated in parallel with no guaranteed order of activation.
-   * Each string is a service name, e.g. `calendar.googleapis.com`.
-   * 
- */ - int getDependsOnServicesCount(); - /** - * repeated string depends_on_services = 2; - * - *
-   * Services that must be activated in order for this service to be used.
-   * The set of services activated as a result of these relations are all
-   * activated in parallel with no guaranteed order of activation.
-   * Each string is a service name, e.g. `calendar.googleapis.com`.
-   * 
- */ - java.lang.String getDependsOnServices(int index); - /** - * repeated string depends_on_services = 2; - * - *
-   * Services that must be activated in order for this service to be used.
-   * The set of services activated as a result of these relations are all
-   * activated in parallel with no guaranteed order of activation.
-   * Each string is a service name, e.g. `calendar.googleapis.com`.
-   * 
- */ - com.google.protobuf.ByteString - getDependsOnServicesBytes(int index); - - /** - * repeated string activation_hooks = 3; - * - *
-   * Services that must be contacted before a consumer can begin using the
-   * service. Each service will be contacted in sequence, and, if any activation
-   * call fails, the entire activation will fail. Each hook is of the form
-   * <service.name>/<hook-id>, where <hook-id> is optional; for example:
-   * 'robotservice.googleapis.com/default'.
-   * 
- */ - com.google.protobuf.ProtocolStringList - getActivationHooksList(); - /** - * repeated string activation_hooks = 3; - * - *
-   * Services that must be contacted before a consumer can begin using the
-   * service. Each service will be contacted in sequence, and, if any activation
-   * call fails, the entire activation will fail. Each hook is of the form
-   * <service.name>/<hook-id>, where <hook-id> is optional; for example:
-   * 'robotservice.googleapis.com/default'.
-   * 
- */ - int getActivationHooksCount(); - /** - * repeated string activation_hooks = 3; - * - *
-   * Services that must be contacted before a consumer can begin using the
-   * service. Each service will be contacted in sequence, and, if any activation
-   * call fails, the entire activation will fail. Each hook is of the form
-   * <service.name>/<hook-id>, where <hook-id> is optional; for example:
-   * 'robotservice.googleapis.com/default'.
-   * 
- */ - java.lang.String getActivationHooks(int index); - /** - * repeated string activation_hooks = 3; - * - *
-   * Services that must be contacted before a consumer can begin using the
-   * service. Each service will be contacted in sequence, and, if any activation
-   * call fails, the entire activation will fail. Each hook is of the form
-   * <service.name>/<hook-id>, where <hook-id> is optional; for example:
-   * 'robotservice.googleapis.com/default'.
-   * 
- */ - com.google.protobuf.ByteString - getActivationHooksBytes(int index); - - /** - * repeated string deactivation_hooks = 5; - * - *
-   * Services that must be contacted before a consumer can deactivate a
-   * service. Each service will be contacted in sequence, and, if any
-   * deactivation call fails, the entire deactivation will fail. Each hook is
-   * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
-   * example:
-   * 'compute.googleapis.com/'.
-   * 
- */ - com.google.protobuf.ProtocolStringList - getDeactivationHooksList(); - /** - * repeated string deactivation_hooks = 5; - * - *
-   * Services that must be contacted before a consumer can deactivate a
-   * service. Each service will be contacted in sequence, and, if any
-   * deactivation call fails, the entire deactivation will fail. Each hook is
-   * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
-   * example:
-   * 'compute.googleapis.com/'.
-   * 
- */ - int getDeactivationHooksCount(); - /** - * repeated string deactivation_hooks = 5; - * - *
-   * Services that must be contacted before a consumer can deactivate a
-   * service. Each service will be contacted in sequence, and, if any
-   * deactivation call fails, the entire deactivation will fail. Each hook is
-   * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
-   * example:
-   * 'compute.googleapis.com/'.
-   * 
- */ - java.lang.String getDeactivationHooks(int index); - /** - * repeated string deactivation_hooks = 5; - * - *
-   * Services that must be contacted before a consumer can deactivate a
-   * service. Each service will be contacted in sequence, and, if any
-   * deactivation call fails, the entire deactivation will fail. Each hook is
-   * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
-   * example:
-   * 'compute.googleapis.com/'.
-   * 
- */ - com.google.protobuf.ByteString - getDeactivationHooksBytes(int index); - - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-   * Individual rules for configuring usage on selected methods.
-   * 
- */ - java.util.List - getRulesList(); - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-   * Individual rules for configuring usage on selected methods.
-   * 
- */ - com.google.api.UsageRule getRules(int index); - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-   * Individual rules for configuring usage on selected methods.
-   * 
- */ - int getRulesCount(); - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-   * Individual rules for configuring usage on selected methods.
-   * 
- */ - java.util.List - getRulesOrBuilderList(); - /** - * repeated .google.api.UsageRule rules = 6; - * - *
-   * Individual rules for configuring usage on selected methods.
-   * 
- */ - com.google.api.UsageRuleOrBuilder getRulesOrBuilder( - int index); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/UsageProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/UsageProto.java deleted file mode 100644 index 17ad592e6a09..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/UsageProto.java +++ /dev/null @@ -1,69 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/usage.proto - -package com.google.api; - -public final class UsageProto { - private UsageProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_Usage_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_Usage_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_UsageRule_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_UsageRule_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/usage.proto\022\ngoogle.api\"\240\002\n" + - "\005Usage\0227\n\016service_access\030\004 \001(\0162\037.google." + - "api.Usage.ServiceAccess\022\024\n\014requirements\030" + - "\001 \003(\t\022\033\n\023depends_on_services\030\002 \003(\t\022\030\n\020ac" + - "tivation_hooks\030\003 \003(\t\022\032\n\022deactivation_hoo" + - "ks\030\005 \003(\t\022$\n\005rules\030\006 \003(\0132\025.google.api.Usa" + - "geRule\"O\n\rServiceAccess\022\016\n\nRESTRICTED\020\000\022" + - "\n\n\006PUBLIC\020\001\022\022\n\016ORG_RESTRICTED\020\002\022\016\n\nORG_P" + - "UBLIC\020\003\"?\n\tUsageRule\022\020\n\010selector\030\001 \001(\t\022 " + - "\n\030allow_unregistered_calls\030\002 \001(\010B\036\n\016com.", - "google.apiB\nUsageProtoP\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_Usage_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_api_Usage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_Usage_descriptor, - new java.lang.String[] { "ServiceAccess", "Requirements", "DependsOnServices", "ActivationHooks", "DeactivationHooks", "Rules", }); - internal_static_google_api_UsageRule_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_api_UsageRule_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_UsageRule_descriptor, - new java.lang.String[] { "Selector", "AllowUnregisteredCalls", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/UsageRule.java b/gcloud-java-gax/generated/src/main/java/com/google/api/UsageRule.java deleted file mode 100644 index 228393c7cc58..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/UsageRule.java +++ /dev/null @@ -1,600 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/usage.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.UsageRule} - * - *
- * Usage configuration rules for the service.
- * NOTE: Under development.
- * (--GOOGLE_INTERNAL: There are no current plans to support this for ESF based
- * services. If you require unregistered calls to an ESF based service please
- * contact the one platform team and let us know your use case. --)
- * Use this rule to configure unregistered calls for the service. Unregistered
- * calls are calls that do not contain consumer project identity.
- * (Example: calls that do not contain an API key).
- * By default, API methods do not allow unregistered calls, and each method call
- * must be identified by a consumer project identity. Use this rule to
- * allow/disallow unregistered calls.
- * Example of an API that wants to allow unregistered calls for entire service.
- *     usage:
- *       rules:
- *       - selector: "*"
- *         allow_unregistered_calls: true
- * Example of a method that wants to allow unregistered calls.
- *     usage:
- *       rules:
- *       - selector: "google.example.library.v1.LibraryService.CreateBook"
- *         allow_unregistered_calls: true
- * 
- */ -public final class UsageRule extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.UsageRule) - UsageRuleOrBuilder { - // Use UsageRule.newBuilder() to construct. - private UsageRule(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UsageRule() { - selector_ = ""; - allowUnregisteredCalls_ = false; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private UsageRule( - 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: { - - allowUnregisteredCalls_ = 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.UsageProto.internal_static_google_api_UsageRule_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.UsageProto.internal_static_google_api_UsageRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.UsageRule.class, com.google.api.UsageRule.Builder.class); - } - - 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. Use '*' to indicate all
-   * methods in all APIs.
-   * 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. Use '*' to indicate all
-   * methods in all APIs.
-   * 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 ALLOW_UNREGISTERED_CALLS_FIELD_NUMBER = 2; - private boolean allowUnregisteredCalls_; - /** - * optional bool allow_unregistered_calls = 2; - * - *
-   * True, if the method allows unregistered calls; false otherwise.
-   * 
- */ - public boolean getAllowUnregisteredCalls() { - return allowUnregisteredCalls_; - } - - 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 (allowUnregisteredCalls_ != false) { - output.writeBool(2, allowUnregisteredCalls_); - } - } - - 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 (allowUnregisteredCalls_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, allowUnregisteredCalls_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.UsageRule parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.UsageRule 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.UsageRule parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.UsageRule parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.UsageRule parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.UsageRule parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.UsageRule parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.UsageRule parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.UsageRule parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.UsageRule 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.UsageRule 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.UsageRule} - * - *
-   * Usage configuration rules for the service.
-   * NOTE: Under development.
-   * (--GOOGLE_INTERNAL: There are no current plans to support this for ESF based
-   * services. If you require unregistered calls to an ESF based service please
-   * contact the one platform team and let us know your use case. --)
-   * Use this rule to configure unregistered calls for the service. Unregistered
-   * calls are calls that do not contain consumer project identity.
-   * (Example: calls that do not contain an API key).
-   * By default, API methods do not allow unregistered calls, and each method call
-   * must be identified by a consumer project identity. Use this rule to
-   * allow/disallow unregistered calls.
-   * Example of an API that wants to allow unregistered calls for entire service.
-   *     usage:
-   *       rules:
-   *       - selector: "*"
-   *         allow_unregistered_calls: true
-   * Example of a method that wants to allow unregistered calls.
-   *     usage:
-   *       rules:
-   *       - selector: "google.example.library.v1.LibraryService.CreateBook"
-   *         allow_unregistered_calls: true
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.UsageRule) - com.google.api.UsageRuleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.UsageProto.internal_static_google_api_UsageRule_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.UsageProto.internal_static_google_api_UsageRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.UsageRule.class, com.google.api.UsageRule.Builder.class); - } - - // Construct using com.google.api.UsageRule.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_ = ""; - - allowUnregisteredCalls_ = false; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.UsageProto.internal_static_google_api_UsageRule_descriptor; - } - - public com.google.api.UsageRule getDefaultInstanceForType() { - return com.google.api.UsageRule.getDefaultInstance(); - } - - public com.google.api.UsageRule build() { - com.google.api.UsageRule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.UsageRule buildPartial() { - com.google.api.UsageRule result = new com.google.api.UsageRule(this); - result.selector_ = selector_; - result.allowUnregisteredCalls_ = allowUnregisteredCalls_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.UsageRule) { - return mergeFrom((com.google.api.UsageRule)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.UsageRule other) { - if (other == com.google.api.UsageRule.getDefaultInstance()) return this; - if (!other.getSelector().isEmpty()) { - selector_ = other.selector_; - onChanged(); - } - if (other.getAllowUnregisteredCalls() != false) { - setAllowUnregisteredCalls(other.getAllowUnregisteredCalls()); - } - 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.UsageRule parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.UsageRule) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object selector_ = ""; - /** - * optional string selector = 1; - * - *
-     * Selects the methods to which this rule applies. Use '*' to indicate all
-     * methods in all APIs.
-     * 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. Use '*' to indicate all
-     * methods in all APIs.
-     * 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. Use '*' to indicate all
-     * methods in all APIs.
-     * 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. Use '*' to indicate all
-     * methods in all APIs.
-     * 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. Use '*' to indicate all
-     * methods in all APIs.
-     * 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 boolean allowUnregisteredCalls_ ; - /** - * optional bool allow_unregistered_calls = 2; - * - *
-     * True, if the method allows unregistered calls; false otherwise.
-     * 
- */ - public boolean getAllowUnregisteredCalls() { - return allowUnregisteredCalls_; - } - /** - * optional bool allow_unregistered_calls = 2; - * - *
-     * True, if the method allows unregistered calls; false otherwise.
-     * 
- */ - public Builder setAllowUnregisteredCalls(boolean value) { - - allowUnregisteredCalls_ = value; - onChanged(); - return this; - } - /** - * optional bool allow_unregistered_calls = 2; - * - *
-     * True, if the method allows unregistered calls; false otherwise.
-     * 
- */ - public Builder clearAllowUnregisteredCalls() { - - allowUnregisteredCalls_ = 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.UsageRule) - } - - // @@protoc_insertion_point(class_scope:google.api.UsageRule) - private static final com.google.api.UsageRule DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.UsageRule(); - } - - public static com.google.api.UsageRule getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public UsageRule parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new UsageRule(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.UsageRule getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/UsageRuleOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/UsageRuleOrBuilder.java deleted file mode 100644 index 56d05570d01f..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/UsageRuleOrBuilder.java +++ /dev/null @@ -1,40 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/usage.proto - -package com.google.api; - -public interface UsageRuleOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.UsageRule) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string selector = 1; - * - *
-   * Selects the methods to which this rule applies. Use '*' to indicate all
-   * methods in all APIs.
-   * Refer to [selector][DocumentationRule.selector] for syntax details.
-   * 
- */ - java.lang.String getSelector(); - /** - * optional string selector = 1; - * - *
-   * Selects the methods to which this rule applies. Use '*' to indicate all
-   * methods in all APIs.
-   * Refer to [selector][DocumentationRule.selector] for syntax details.
-   * 
- */ - com.google.protobuf.ByteString - getSelectorBytes(); - - /** - * optional bool allow_unregistered_calls = 2; - * - *
-   * True, if the method allows unregistered calls; false otherwise.
-   * 
- */ - boolean getAllowUnregisteredCalls(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Any.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Any.java deleted file mode 100644 index bc8c82383acf..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Any.java +++ /dev/null @@ -1,810 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/any.proto - -package com.google.protobuf; - -/** - * Protobuf type {@code google.protobuf.Any} - * - *
- * `Any` contains an arbitrary serialized message along with a URL
- * that describes the type of the serialized message.
- * (--GOOGLE_INTERNAL: The proto runtimes and/or compiler will eventually
- *  provide utilities to pack/unpack Any values (projected Q4/15). See
- *  http://goto/proto3-impl-status for each language status. --)
- * JSON
- * ====
- * The JSON representation of an `Any` value uses the regular
- * representation of the deserialized, embedded message, with an
- * additional field `@type` which contains the type URL. Example:
- *     package google.profile;
- *     message Person {
- *       string first_name = 1;
- *       string last_name = 2;
- *     }
- *     {
- *       "@type": "type.googleapis.com/google.profile.Person",
- *       "firstName": <string>,
- *       "lastName": <string>
- *     }
- * If the embedded message type is well-known and has a custom JSON
- * representation, that representation will be embedded adding a field
- * `value` which holds the custom JSON in addition to the the `@type`
- * field. Example (for message [google.protobuf.Duration][]):
- *     {
- *       "@type": "type.googleapis.com/google.protobuf.Duration",
- *       "value": "1.212s"
- *     }
- * 
- */ -public final class Any extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.protobuf.Any) - AnyOrBuilder { - // Use Any.newBuilder() to construct. - private Any(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Any() { - typeUrl_ = ""; - value_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Any( - 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(); - - typeUrl_ = s; - break; - } - case 18: { - - value_ = input.readBytes(); - 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.protobuf.AnyProto.internal_static_google_protobuf_Any_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.AnyProto.internal_static_google_protobuf_Any_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.Any.class, com.google.protobuf.Any.Builder.class); - } - - private static String getTypeUrl( - com.google.protobuf.Descriptors.Descriptor descriptor) { - return "type.googleapis.com/" + descriptor.getFullName(); - } - - public static Any pack( - T message) { - return Any.newBuilder() - .setTypeUrl(getTypeUrl(message.getDescriptorForType())) - .setValue(message.toByteString()) - .build(); - } - - public boolean is( - java.lang.Class clazz) { - T defaultInstance = - com.google.protobuf.Internal.getDefaultInstance(clazz); - return getTypeUrl().equals( - getTypeUrl(defaultInstance.getDescriptorForType())); - } - - private volatile com.google.protobuf.Message cachedUnpackValue; - - public T unpack( - java.lang.Class clazz) - throws com.google.protobuf.InvalidProtocolBufferException { - if (!is(clazz)) { - throw new com.google.protobuf.InvalidProtocolBufferException( - "Type of the Any message does not match the given class."); - } - if (cachedUnpackValue != null) { - return (T) cachedUnpackValue; - } - T defaultInstance = - com.google.protobuf.Internal.getDefaultInstance(clazz); - T result = (T) defaultInstance.getParserForType() - .parseFrom(getValue()); - cachedUnpackValue = result; - return result; - } - public static final int TYPE_URL_FIELD_NUMBER = 1; - private volatile java.lang.Object typeUrl_; - /** - * optional string type_url = 1 [ctype = STRING_PIECE]; - * - *
-   * A URL/resource name whose content describes the type of the
-   * serialized message.
-   * For URLs which use the schema `http`, `https`, or no schema, the
-   * following restrictions and interpretations apply:
-   * * If no schema is provided, `https` is assumed.
-   * * The last segment of the URL's path must represent the fully
-   *   qualified name of the type (as in `path/google.protobuf.Duration`).
-   * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
-   *   value in binary format, or produce an error.
-   * * Applications are allowed to cache lookup results based on the
-   *   URL, or have them precompiled into a binary to avoid any
-   *   lookup. Therefore, binary compatibility needs to be preserved
-   *   on changes to types. (Use versioned type names to manage
-   *   breaking changes.)
-   * Schemas other than `http`, `https` (or the empty schema) might be
-   * used with implementation specific semantics.
-   * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
-   * namespace should use `type.googleapis.com/full.type.name` (without
-   * schema and path). A type service will eventually become available which
-   * serves those URLs (projected Q2/15). --)
-   * 
- */ - public java.lang.String getTypeUrl() { - java.lang.Object ref = typeUrl_; - 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(); - typeUrl_ = s; - return s; - } - } - /** - * optional string type_url = 1 [ctype = STRING_PIECE]; - * - *
-   * A URL/resource name whose content describes the type of the
-   * serialized message.
-   * For URLs which use the schema `http`, `https`, or no schema, the
-   * following restrictions and interpretations apply:
-   * * If no schema is provided, `https` is assumed.
-   * * The last segment of the URL's path must represent the fully
-   *   qualified name of the type (as in `path/google.protobuf.Duration`).
-   * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
-   *   value in binary format, or produce an error.
-   * * Applications are allowed to cache lookup results based on the
-   *   URL, or have them precompiled into a binary to avoid any
-   *   lookup. Therefore, binary compatibility needs to be preserved
-   *   on changes to types. (Use versioned type names to manage
-   *   breaking changes.)
-   * Schemas other than `http`, `https` (or the empty schema) might be
-   * used with implementation specific semantics.
-   * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
-   * namespace should use `type.googleapis.com/full.type.name` (without
-   * schema and path). A type service will eventually become available which
-   * serves those URLs (projected Q2/15). --)
-   * 
- */ - public com.google.protobuf.ByteString - getTypeUrlBytes() { - java.lang.Object ref = typeUrl_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - typeUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VALUE_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString value_; - /** - * optional bytes value = 2 [ctype = CORD]; - * - *
-   * Must be valid serialized data of the above specified type.
-   * 
- */ - public com.google.protobuf.ByteString getValue() { - return value_; - } - - 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 (!getTypeUrlBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, typeUrl_); - } - if (!value_.isEmpty()) { - output.writeBytes(2, value_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getTypeUrlBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, typeUrl_); - } - if (!value_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, value_); - } - 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.protobuf.Any)) { - return super.equals(obj); - } - com.google.protobuf.Any other = (com.google.protobuf.Any) obj; - - boolean result = true; - result = result && getTypeUrl() - .equals(other.getTypeUrl()); - result = result && getValue() - .equals(other.getValue()); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); - hash = (37 * hash) + TYPE_URL_FIELD_NUMBER; - hash = (53 * hash) + getTypeUrl().hashCode(); - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protobuf.Any parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Any 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.protobuf.Any parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Any parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.protobuf.Any parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.Any parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.protobuf.Any parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.protobuf.Any parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.protobuf.Any parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.Any 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.protobuf.Any 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.protobuf.Any} - * - *
-   * `Any` contains an arbitrary serialized message along with a URL
-   * that describes the type of the serialized message.
-   * (--GOOGLE_INTERNAL: The proto runtimes and/or compiler will eventually
-   *  provide utilities to pack/unpack Any values (projected Q4/15). See
-   *  http://goto/proto3-impl-status for each language status. --)
-   * JSON
-   * ====
-   * The JSON representation of an `Any` value uses the regular
-   * representation of the deserialized, embedded message, with an
-   * additional field `@type` which contains the type URL. Example:
-   *     package google.profile;
-   *     message Person {
-   *       string first_name = 1;
-   *       string last_name = 2;
-   *     }
-   *     {
-   *       "@type": "type.googleapis.com/google.profile.Person",
-   *       "firstName": <string>,
-   *       "lastName": <string>
-   *     }
-   * If the embedded message type is well-known and has a custom JSON
-   * representation, that representation will be embedded adding a field
-   * `value` which holds the custom JSON in addition to the the `@type`
-   * field. Example (for message [google.protobuf.Duration][]):
-   *     {
-   *       "@type": "type.googleapis.com/google.protobuf.Duration",
-   *       "value": "1.212s"
-   *     }
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.protobuf.Any) - com.google.protobuf.AnyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.AnyProto.internal_static_google_protobuf_Any_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.AnyProto.internal_static_google_protobuf_Any_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.Any.class, com.google.protobuf.Any.Builder.class); - } - - // Construct using com.google.protobuf.Any.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(); - typeUrl_ = ""; - - value_ = com.google.protobuf.ByteString.EMPTY; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.protobuf.AnyProto.internal_static_google_protobuf_Any_descriptor; - } - - public com.google.protobuf.Any getDefaultInstanceForType() { - return com.google.protobuf.Any.getDefaultInstance(); - } - - public com.google.protobuf.Any build() { - com.google.protobuf.Any result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.protobuf.Any buildPartial() { - com.google.protobuf.Any result = new com.google.protobuf.Any(this); - result.typeUrl_ = typeUrl_; - result.value_ = value_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.protobuf.Any) { - return mergeFrom((com.google.protobuf.Any)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.protobuf.Any other) { - if (other == com.google.protobuf.Any.getDefaultInstance()) return this; - if (!other.getTypeUrl().isEmpty()) { - typeUrl_ = other.typeUrl_; - onChanged(); - } - if (other.getValue() != com.google.protobuf.ByteString.EMPTY) { - setValue(other.getValue()); - } - 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.protobuf.Any parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.protobuf.Any) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object typeUrl_ = ""; - /** - * optional string type_url = 1 [ctype = STRING_PIECE]; - * - *
-     * A URL/resource name whose content describes the type of the
-     * serialized message.
-     * For URLs which use the schema `http`, `https`, or no schema, the
-     * following restrictions and interpretations apply:
-     * * If no schema is provided, `https` is assumed.
-     * * The last segment of the URL's path must represent the fully
-     *   qualified name of the type (as in `path/google.protobuf.Duration`).
-     * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
-     *   value in binary format, or produce an error.
-     * * Applications are allowed to cache lookup results based on the
-     *   URL, or have them precompiled into a binary to avoid any
-     *   lookup. Therefore, binary compatibility needs to be preserved
-     *   on changes to types. (Use versioned type names to manage
-     *   breaking changes.)
-     * Schemas other than `http`, `https` (or the empty schema) might be
-     * used with implementation specific semantics.
-     * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
-     * namespace should use `type.googleapis.com/full.type.name` (without
-     * schema and path). A type service will eventually become available which
-     * serves those URLs (projected Q2/15). --)
-     * 
- */ - public java.lang.String getTypeUrl() { - java.lang.Object ref = typeUrl_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - typeUrl_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string type_url = 1 [ctype = STRING_PIECE]; - * - *
-     * A URL/resource name whose content describes the type of the
-     * serialized message.
-     * For URLs which use the schema `http`, `https`, or no schema, the
-     * following restrictions and interpretations apply:
-     * * If no schema is provided, `https` is assumed.
-     * * The last segment of the URL's path must represent the fully
-     *   qualified name of the type (as in `path/google.protobuf.Duration`).
-     * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
-     *   value in binary format, or produce an error.
-     * * Applications are allowed to cache lookup results based on the
-     *   URL, or have them precompiled into a binary to avoid any
-     *   lookup. Therefore, binary compatibility needs to be preserved
-     *   on changes to types. (Use versioned type names to manage
-     *   breaking changes.)
-     * Schemas other than `http`, `https` (or the empty schema) might be
-     * used with implementation specific semantics.
-     * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
-     * namespace should use `type.googleapis.com/full.type.name` (without
-     * schema and path). A type service will eventually become available which
-     * serves those URLs (projected Q2/15). --)
-     * 
- */ - public com.google.protobuf.ByteString - getTypeUrlBytes() { - java.lang.Object ref = typeUrl_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - typeUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string type_url = 1 [ctype = STRING_PIECE]; - * - *
-     * A URL/resource name whose content describes the type of the
-     * serialized message.
-     * For URLs which use the schema `http`, `https`, or no schema, the
-     * following restrictions and interpretations apply:
-     * * If no schema is provided, `https` is assumed.
-     * * The last segment of the URL's path must represent the fully
-     *   qualified name of the type (as in `path/google.protobuf.Duration`).
-     * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
-     *   value in binary format, or produce an error.
-     * * Applications are allowed to cache lookup results based on the
-     *   URL, or have them precompiled into a binary to avoid any
-     *   lookup. Therefore, binary compatibility needs to be preserved
-     *   on changes to types. (Use versioned type names to manage
-     *   breaking changes.)
-     * Schemas other than `http`, `https` (or the empty schema) might be
-     * used with implementation specific semantics.
-     * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
-     * namespace should use `type.googleapis.com/full.type.name` (without
-     * schema and path). A type service will eventually become available which
-     * serves those URLs (projected Q2/15). --)
-     * 
- */ - public Builder setTypeUrl( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - typeUrl_ = value; - onChanged(); - return this; - } - /** - * optional string type_url = 1 [ctype = STRING_PIECE]; - * - *
-     * A URL/resource name whose content describes the type of the
-     * serialized message.
-     * For URLs which use the schema `http`, `https`, or no schema, the
-     * following restrictions and interpretations apply:
-     * * If no schema is provided, `https` is assumed.
-     * * The last segment of the URL's path must represent the fully
-     *   qualified name of the type (as in `path/google.protobuf.Duration`).
-     * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
-     *   value in binary format, or produce an error.
-     * * Applications are allowed to cache lookup results based on the
-     *   URL, or have them precompiled into a binary to avoid any
-     *   lookup. Therefore, binary compatibility needs to be preserved
-     *   on changes to types. (Use versioned type names to manage
-     *   breaking changes.)
-     * Schemas other than `http`, `https` (or the empty schema) might be
-     * used with implementation specific semantics.
-     * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
-     * namespace should use `type.googleapis.com/full.type.name` (without
-     * schema and path). A type service will eventually become available which
-     * serves those URLs (projected Q2/15). --)
-     * 
- */ - public Builder clearTypeUrl() { - - typeUrl_ = getDefaultInstance().getTypeUrl(); - onChanged(); - return this; - } - /** - * optional string type_url = 1 [ctype = STRING_PIECE]; - * - *
-     * A URL/resource name whose content describes the type of the
-     * serialized message.
-     * For URLs which use the schema `http`, `https`, or no schema, the
-     * following restrictions and interpretations apply:
-     * * If no schema is provided, `https` is assumed.
-     * * The last segment of the URL's path must represent the fully
-     *   qualified name of the type (as in `path/google.protobuf.Duration`).
-     * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
-     *   value in binary format, or produce an error.
-     * * Applications are allowed to cache lookup results based on the
-     *   URL, or have them precompiled into a binary to avoid any
-     *   lookup. Therefore, binary compatibility needs to be preserved
-     *   on changes to types. (Use versioned type names to manage
-     *   breaking changes.)
-     * Schemas other than `http`, `https` (or the empty schema) might be
-     * used with implementation specific semantics.
-     * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
-     * namespace should use `type.googleapis.com/full.type.name` (without
-     * schema and path). A type service will eventually become available which
-     * serves those URLs (projected Q2/15). --)
-     * 
- */ - public Builder setTypeUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - typeUrl_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; - /** - * optional bytes value = 2 [ctype = CORD]; - * - *
-     * Must be valid serialized data of the above specified type.
-     * 
- */ - public com.google.protobuf.ByteString getValue() { - return value_; - } - /** - * optional bytes value = 2 [ctype = CORD]; - * - *
-     * Must be valid serialized data of the above specified type.
-     * 
- */ - public Builder setValue(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - value_ = value; - onChanged(); - return this; - } - /** - * optional bytes value = 2 [ctype = CORD]; - * - *
-     * Must be valid serialized data of the above specified type.
-     * 
- */ - public Builder clearValue() { - - value_ = getDefaultInstance().getValue(); - 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.protobuf.Any) - } - - // @@protoc_insertion_point(class_scope:google.protobuf.Any) - private static final com.google.protobuf.Any DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.protobuf.Any(); - } - - public static com.google.protobuf.Any getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Any parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Any(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.protobuf.Any getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/AnyOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/AnyOrBuilder.java deleted file mode 100644 index e94d7325991d..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/AnyOrBuilder.java +++ /dev/null @@ -1,74 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/any.proto - -package com.google.protobuf; - -public interface AnyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.protobuf.Any) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string type_url = 1 [ctype = STRING_PIECE]; - * - *
-   * A URL/resource name whose content describes the type of the
-   * serialized message.
-   * For URLs which use the schema `http`, `https`, or no schema, the
-   * following restrictions and interpretations apply:
-   * * If no schema is provided, `https` is assumed.
-   * * The last segment of the URL's path must represent the fully
-   *   qualified name of the type (as in `path/google.protobuf.Duration`).
-   * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
-   *   value in binary format, or produce an error.
-   * * Applications are allowed to cache lookup results based on the
-   *   URL, or have them precompiled into a binary to avoid any
-   *   lookup. Therefore, binary compatibility needs to be preserved
-   *   on changes to types. (Use versioned type names to manage
-   *   breaking changes.)
-   * Schemas other than `http`, `https` (or the empty schema) might be
-   * used with implementation specific semantics.
-   * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
-   * namespace should use `type.googleapis.com/full.type.name` (without
-   * schema and path). A type service will eventually become available which
-   * serves those URLs (projected Q2/15). --)
-   * 
- */ - java.lang.String getTypeUrl(); - /** - * optional string type_url = 1 [ctype = STRING_PIECE]; - * - *
-   * A URL/resource name whose content describes the type of the
-   * serialized message.
-   * For URLs which use the schema `http`, `https`, or no schema, the
-   * following restrictions and interpretations apply:
-   * * If no schema is provided, `https` is assumed.
-   * * The last segment of the URL's path must represent the fully
-   *   qualified name of the type (as in `path/google.protobuf.Duration`).
-   * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
-   *   value in binary format, or produce an error.
-   * * Applications are allowed to cache lookup results based on the
-   *   URL, or have them precompiled into a binary to avoid any
-   *   lookup. Therefore, binary compatibility needs to be preserved
-   *   on changes to types. (Use versioned type names to manage
-   *   breaking changes.)
-   * Schemas other than `http`, `https` (or the empty schema) might be
-   * used with implementation specific semantics.
-   * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
-   * namespace should use `type.googleapis.com/full.type.name` (without
-   * schema and path). A type service will eventually become available which
-   * serves those URLs (projected Q2/15). --)
-   * 
- */ - com.google.protobuf.ByteString - getTypeUrlBytes(); - - /** - * optional bytes value = 2 [ctype = CORD]; - * - *
-   * Must be valid serialized data of the above specified type.
-   * 
- */ - com.google.protobuf.ByteString getValue(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/AnyProto.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/AnyProto.java deleted file mode 100644 index fa06d01c52be..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/AnyProto.java +++ /dev/null @@ -1,52 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/any.proto - -package com.google.protobuf; - -public final class AnyProto { - private AnyProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_protobuf_Any_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_protobuf_Any_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\031google/protobuf/any.proto\022\017google.prot" + - "obuf\".\n\003Any\022\024\n\010type_url\030\001 \001(\tB\002\010\002\022\021\n\005val" + - "ue\030\002 \001(\014B\002\010\001BK\n\023com.google.protobufB\010Any" + - "ProtoP\001\240\001\001\242\002\003GPB\252\002\036Google.Protobuf.WellK" + - "nownTypesb\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_protobuf_Any_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_protobuf_Any_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_protobuf_Any_descriptor, - new java.lang.String[] { "TypeUrl", "Value", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Api.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Api.java deleted file mode 100644 index f75ddaf045e1..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Api.java +++ /dev/null @@ -1,2474 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/api.proto - -package com.google.protobuf; - -/** - * Protobuf type {@code google.protobuf.Api} - * - *
- * Api is a light-weight descriptor for a protocol buffer service.
- * 
- */ -public final class Api extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.protobuf.Api) - ApiOrBuilder { - // Use Api.newBuilder() to construct. - private Api(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Api() { - name_ = ""; - methods_ = java.util.Collections.emptyList(); - options_ = java.util.Collections.emptyList(); - version_ = ""; - mixins_ = java.util.Collections.emptyList(); - syntax_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Api( - 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: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - methods_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - methods_.add(input.readMessage(com.google.protobuf.Method.parser(), extensionRegistry)); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - options_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - options_.add(input.readMessage(com.google.protobuf.Option.parser(), extensionRegistry)); - break; - } - case 34: { - String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - case 42: { - com.google.protobuf.SourceContext.Builder subBuilder = null; - if (sourceContext_ != null) { - subBuilder = sourceContext_.toBuilder(); - } - sourceContext_ = input.readMessage(com.google.protobuf.SourceContext.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sourceContext_); - sourceContext_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - mixins_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - mixins_.add(input.readMessage(com.google.protobuf.Mixin.parser(), extensionRegistry)); - break; - } - case 56: { - int rawValue = input.readEnum(); - - syntax_ = rawValue; - 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)) { - methods_ = java.util.Collections.unmodifiableList(methods_); - } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - options_ = java.util.Collections.unmodifiableList(options_); - } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - mixins_ = java.util.Collections.unmodifiableList(mixins_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.ApiProto.internal_static_google_protobuf_Api_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.ApiProto.internal_static_google_protobuf_Api_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.Api.class, com.google.protobuf.Api.Builder.class); - } - - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * optional string name = 1; - * - *
-   * The fully qualified name of this api, including package name
-   * followed by the api's simple name.
-   * 
- */ - 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 fully qualified name of this api, including package name
-   * followed by the api's simple name.
-   * 
- */ - 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 METHODS_FIELD_NUMBER = 2; - private java.util.List methods_; - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-   * The methods of this api, in unspecified order.
-   * 
- */ - public java.util.List getMethodsList() { - return methods_; - } - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-   * The methods of this api, in unspecified order.
-   * 
- */ - public java.util.List - getMethodsOrBuilderList() { - return methods_; - } - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-   * The methods of this api, in unspecified order.
-   * 
- */ - public int getMethodsCount() { - return methods_.size(); - } - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-   * The methods of this api, in unspecified order.
-   * 
- */ - public com.google.protobuf.Method getMethods(int index) { - return methods_.get(index); - } - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-   * The methods of this api, in unspecified order.
-   * 
- */ - public com.google.protobuf.MethodOrBuilder getMethodsOrBuilder( - int index) { - return methods_.get(index); - } - - public static final int OPTIONS_FIELD_NUMBER = 3; - private java.util.List options_; - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Any metadata attached to the API.
-   * 
- */ - public java.util.List getOptionsList() { - return options_; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Any metadata attached to the API.
-   * 
- */ - public java.util.List - getOptionsOrBuilderList() { - return options_; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Any metadata attached to the API.
-   * 
- */ - public int getOptionsCount() { - return options_.size(); - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Any metadata attached to the API.
-   * 
- */ - public com.google.protobuf.Option getOptions(int index) { - return options_.get(index); - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Any metadata attached to the API.
-   * 
- */ - public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( - int index) { - return options_.get(index); - } - - public static final int VERSION_FIELD_NUMBER = 4; - private volatile java.lang.Object version_; - /** - * optional string version = 4; - * - *
-   * A version string for this api. If specified, must have the form
-   * `major-version.minor-version`, as in `1.10`. If the minor version
-   * is omitted, it defaults to zero. If the entire version field is
-   * empty, the major version is derived from the package name, as
-   * outlined below. If the field is not empty, the version in the
-   * package name will be verified to be consistent with what is
-   * provided here.
-   * The versioning schema uses [semantic
-   * versioning](http://semver.org) where the major version number
-   * indicates a breaking change and the minor version an additive,
-   * non-breaking change. Both version numbers are signals to users
-   * what to expect from different versions, and should be carefully
-   * chosen based on the product plan.
-   * The major version is also reflected in the package name of the
-   * API, which must end in `v<major-version>`, as in
-   * `google.feature.v1`. For major versions 0 and 1, the suffix can
-   * be omitted. Zero major versions must only be used for
-   * experimental, none-GA apis.
-   * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
-   * --)
-   * (-- TODO(wgg): determine whether we want to enable specifying
-   * this via an option in the proto file. --)
-   * 
- */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - 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(); - version_ = s; - return s; - } - } - /** - * optional string version = 4; - * - *
-   * A version string for this api. If specified, must have the form
-   * `major-version.minor-version`, as in `1.10`. If the minor version
-   * is omitted, it defaults to zero. If the entire version field is
-   * empty, the major version is derived from the package name, as
-   * outlined below. If the field is not empty, the version in the
-   * package name will be verified to be consistent with what is
-   * provided here.
-   * The versioning schema uses [semantic
-   * versioning](http://semver.org) where the major version number
-   * indicates a breaking change and the minor version an additive,
-   * non-breaking change. Both version numbers are signals to users
-   * what to expect from different versions, and should be carefully
-   * chosen based on the product plan.
-   * The major version is also reflected in the package name of the
-   * API, which must end in `v<major-version>`, as in
-   * `google.feature.v1`. For major versions 0 and 1, the suffix can
-   * be omitted. Zero major versions must only be used for
-   * experimental, none-GA apis.
-   * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
-   * --)
-   * (-- TODO(wgg): determine whether we want to enable specifying
-   * this via an option in the proto file. --)
-   * 
- */ - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SOURCE_CONTEXT_FIELD_NUMBER = 5; - private com.google.protobuf.SourceContext sourceContext_; - /** - * optional .google.protobuf.SourceContext source_context = 5; - * - *
-   * Source context for the protocol buffer service represented by this
-   * message.
-   * 
- */ - public boolean hasSourceContext() { - return sourceContext_ != null; - } - /** - * optional .google.protobuf.SourceContext source_context = 5; - * - *
-   * Source context for the protocol buffer service represented by this
-   * message.
-   * 
- */ - public com.google.protobuf.SourceContext getSourceContext() { - return sourceContext_ == null ? com.google.protobuf.SourceContext.getDefaultInstance() : sourceContext_; - } - /** - * optional .google.protobuf.SourceContext source_context = 5; - * - *
-   * Source context for the protocol buffer service represented by this
-   * message.
-   * 
- */ - public com.google.protobuf.SourceContextOrBuilder getSourceContextOrBuilder() { - return getSourceContext(); - } - - public static final int MIXINS_FIELD_NUMBER = 6; - private java.util.List mixins_; - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-   * Included APIs. See [Mixin][].
-   * 
- */ - public java.util.List getMixinsList() { - return mixins_; - } - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-   * Included APIs. See [Mixin][].
-   * 
- */ - public java.util.List - getMixinsOrBuilderList() { - return mixins_; - } - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-   * Included APIs. See [Mixin][].
-   * 
- */ - public int getMixinsCount() { - return mixins_.size(); - } - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-   * Included APIs. See [Mixin][].
-   * 
- */ - public com.google.protobuf.Mixin getMixins(int index) { - return mixins_.get(index); - } - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-   * Included APIs. See [Mixin][].
-   * 
- */ - public com.google.protobuf.MixinOrBuilder getMixinsOrBuilder( - int index) { - return mixins_.get(index); - } - - public static final int SYNTAX_FIELD_NUMBER = 7; - private int syntax_; - /** - * optional .google.protobuf.Syntax syntax = 7; - * - *
-   * The source syntax of the service.
-   * 
- */ - public int getSyntaxValue() { - return syntax_; - } - /** - * optional .google.protobuf.Syntax syntax = 7; - * - *
-   * The source syntax of the service.
-   * 
- */ - public com.google.protobuf.Syntax getSyntax() { - com.google.protobuf.Syntax result = com.google.protobuf.Syntax.valueOf(syntax_); - return result == null ? com.google.protobuf.Syntax.UNRECOGNIZED : result; - } - - 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_); - } - for (int i = 0; i < methods_.size(); i++) { - output.writeMessage(2, methods_.get(i)); - } - for (int i = 0; i < options_.size(); i++) { - output.writeMessage(3, options_.get(i)); - } - if (!getVersionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, version_); - } - if (sourceContext_ != null) { - output.writeMessage(5, getSourceContext()); - } - for (int i = 0; i < mixins_.size(); i++) { - output.writeMessage(6, mixins_.get(i)); - } - if (syntax_ != com.google.protobuf.Syntax.SYNTAX_PROTO2.getNumber()) { - output.writeEnum(7, syntax_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - for (int i = 0; i < methods_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, methods_.get(i)); - } - for (int i = 0; i < options_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, options_.get(i)); - } - if (!getVersionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, version_); - } - if (sourceContext_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getSourceContext()); - } - for (int i = 0; i < mixins_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, mixins_.get(i)); - } - if (syntax_ != com.google.protobuf.Syntax.SYNTAX_PROTO2.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(7, syntax_); - } - 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.protobuf.Api)) { - return super.equals(obj); - } - com.google.protobuf.Api other = (com.google.protobuf.Api) obj; - - boolean result = true; - result = result && getName() - .equals(other.getName()); - result = result && getMethodsList() - .equals(other.getMethodsList()); - result = result && getOptionsList() - .equals(other.getOptionsList()); - result = result && getVersion() - .equals(other.getVersion()); - result = result && (hasSourceContext() == other.hasSourceContext()); - if (hasSourceContext()) { - result = result && getSourceContext() - .equals(other.getSourceContext()); - } - result = result && getMixinsList() - .equals(other.getMixinsList()); - result = result && syntax_ == other.syntax_; - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getMethodsCount() > 0) { - hash = (37 * hash) + METHODS_FIELD_NUMBER; - hash = (53 * hash) + getMethodsList().hashCode(); - } - if (getOptionsCount() > 0) { - hash = (37 * hash) + OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + getOptionsList().hashCode(); - } - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - if (hasSourceContext()) { - hash = (37 * hash) + SOURCE_CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getSourceContext().hashCode(); - } - if (getMixinsCount() > 0) { - hash = (37 * hash) + MIXINS_FIELD_NUMBER; - hash = (53 * hash) + getMixinsList().hashCode(); - } - hash = (37 * hash) + SYNTAX_FIELD_NUMBER; - hash = (53 * hash) + syntax_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protobuf.Api parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Api 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.protobuf.Api parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Api parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.protobuf.Api parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.Api parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.protobuf.Api parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.protobuf.Api parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.protobuf.Api parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.Api 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.protobuf.Api 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.protobuf.Api} - * - *
-   * Api is a light-weight descriptor for a protocol buffer service.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.protobuf.Api) - com.google.protobuf.ApiOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.ApiProto.internal_static_google_protobuf_Api_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.ApiProto.internal_static_google_protobuf_Api_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.Api.class, com.google.protobuf.Api.Builder.class); - } - - // Construct using com.google.protobuf.Api.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getMethodsFieldBuilder(); - getOptionsFieldBuilder(); - getMixinsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - if (methodsBuilder_ == null) { - methods_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - methodsBuilder_.clear(); - } - if (optionsBuilder_ == null) { - options_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - optionsBuilder_.clear(); - } - version_ = ""; - - if (sourceContextBuilder_ == null) { - sourceContext_ = null; - } else { - sourceContext_ = null; - sourceContextBuilder_ = null; - } - if (mixinsBuilder_ == null) { - mixins_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - mixinsBuilder_.clear(); - } - syntax_ = 0; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.protobuf.ApiProto.internal_static_google_protobuf_Api_descriptor; - } - - public com.google.protobuf.Api getDefaultInstanceForType() { - return com.google.protobuf.Api.getDefaultInstance(); - } - - public com.google.protobuf.Api build() { - com.google.protobuf.Api result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.protobuf.Api buildPartial() { - com.google.protobuf.Api result = new com.google.protobuf.Api(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.name_ = name_; - if (methodsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - methods_ = java.util.Collections.unmodifiableList(methods_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.methods_ = methods_; - } else { - result.methods_ = methodsBuilder_.build(); - } - if (optionsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { - options_ = java.util.Collections.unmodifiableList(options_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.options_ = options_; - } else { - result.options_ = optionsBuilder_.build(); - } - result.version_ = version_; - if (sourceContextBuilder_ == null) { - result.sourceContext_ = sourceContext_; - } else { - result.sourceContext_ = sourceContextBuilder_.build(); - } - if (mixinsBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { - mixins_ = java.util.Collections.unmodifiableList(mixins_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.mixins_ = mixins_; - } else { - result.mixins_ = mixinsBuilder_.build(); - } - result.syntax_ = syntax_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.protobuf.Api) { - return mergeFrom((com.google.protobuf.Api)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.protobuf.Api other) { - if (other == com.google.protobuf.Api.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (methodsBuilder_ == null) { - if (!other.methods_.isEmpty()) { - if (methods_.isEmpty()) { - methods_ = other.methods_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureMethodsIsMutable(); - methods_.addAll(other.methods_); - } - onChanged(); - } - } else { - if (!other.methods_.isEmpty()) { - if (methodsBuilder_.isEmpty()) { - methodsBuilder_.dispose(); - methodsBuilder_ = null; - methods_ = other.methods_; - bitField0_ = (bitField0_ & ~0x00000002); - methodsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getMethodsFieldBuilder() : null; - } else { - methodsBuilder_.addAllMessages(other.methods_); - } - } - } - if (optionsBuilder_ == null) { - if (!other.options_.isEmpty()) { - if (options_.isEmpty()) { - options_ = other.options_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureOptionsIsMutable(); - options_.addAll(other.options_); - } - onChanged(); - } - } else { - if (!other.options_.isEmpty()) { - if (optionsBuilder_.isEmpty()) { - optionsBuilder_.dispose(); - optionsBuilder_ = null; - options_ = other.options_; - bitField0_ = (bitField0_ & ~0x00000004); - optionsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getOptionsFieldBuilder() : null; - } else { - optionsBuilder_.addAllMessages(other.options_); - } - } - } - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - onChanged(); - } - if (other.hasSourceContext()) { - mergeSourceContext(other.getSourceContext()); - } - if (mixinsBuilder_ == null) { - if (!other.mixins_.isEmpty()) { - if (mixins_.isEmpty()) { - mixins_ = other.mixins_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureMixinsIsMutable(); - mixins_.addAll(other.mixins_); - } - onChanged(); - } - } else { - if (!other.mixins_.isEmpty()) { - if (mixinsBuilder_.isEmpty()) { - mixinsBuilder_.dispose(); - mixinsBuilder_ = null; - mixins_ = other.mixins_; - bitField0_ = (bitField0_ & ~0x00000020); - mixinsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getMixinsFieldBuilder() : null; - } else { - mixinsBuilder_.addAllMessages(other.mixins_); - } - } - } - if (other.syntax_ != 0) { - setSyntaxValue(other.getSyntaxValue()); - } - 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.protobuf.Api parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.protobuf.Api) 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 fully qualified name of this api, including package name
-     * followed by the api's simple name.
-     * 
- */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string name = 1; - * - *
-     * The fully qualified name of this api, including package name
-     * followed by the api's simple name.
-     * 
- */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string name = 1; - * - *
-     * The fully qualified name of this api, including package name
-     * followed by the api's simple name.
-     * 
- */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The fully qualified name of this api, including package name
-     * followed by the api's simple name.
-     * 
- */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The fully qualified name of this api, including package name
-     * followed by the api's simple name.
-     * 
- */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.util.List methods_ = - java.util.Collections.emptyList(); - private void ensureMethodsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - methods_ = new java.util.ArrayList(methods_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Method, com.google.protobuf.Method.Builder, com.google.protobuf.MethodOrBuilder> methodsBuilder_; - - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-     * The methods of this api, in unspecified order.
-     * 
- */ - public java.util.List getMethodsList() { - if (methodsBuilder_ == null) { - return java.util.Collections.unmodifiableList(methods_); - } else { - return methodsBuilder_.getMessageList(); - } - } - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-     * The methods of this api, in unspecified order.
-     * 
- */ - public int getMethodsCount() { - if (methodsBuilder_ == null) { - return methods_.size(); - } else { - return methodsBuilder_.getCount(); - } - } - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-     * The methods of this api, in unspecified order.
-     * 
- */ - public com.google.protobuf.Method getMethods(int index) { - if (methodsBuilder_ == null) { - return methods_.get(index); - } else { - return methodsBuilder_.getMessage(index); - } - } - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-     * The methods of this api, in unspecified order.
-     * 
- */ - public Builder setMethods( - int index, com.google.protobuf.Method value) { - if (methodsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMethodsIsMutable(); - methods_.set(index, value); - onChanged(); - } else { - methodsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-     * The methods of this api, in unspecified order.
-     * 
- */ - public Builder setMethods( - int index, com.google.protobuf.Method.Builder builderForValue) { - if (methodsBuilder_ == null) { - ensureMethodsIsMutable(); - methods_.set(index, builderForValue.build()); - onChanged(); - } else { - methodsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-     * The methods of this api, in unspecified order.
-     * 
- */ - public Builder addMethods(com.google.protobuf.Method value) { - if (methodsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMethodsIsMutable(); - methods_.add(value); - onChanged(); - } else { - methodsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-     * The methods of this api, in unspecified order.
-     * 
- */ - public Builder addMethods( - int index, com.google.protobuf.Method value) { - if (methodsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMethodsIsMutable(); - methods_.add(index, value); - onChanged(); - } else { - methodsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-     * The methods of this api, in unspecified order.
-     * 
- */ - public Builder addMethods( - com.google.protobuf.Method.Builder builderForValue) { - if (methodsBuilder_ == null) { - ensureMethodsIsMutable(); - methods_.add(builderForValue.build()); - onChanged(); - } else { - methodsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-     * The methods of this api, in unspecified order.
-     * 
- */ - public Builder addMethods( - int index, com.google.protobuf.Method.Builder builderForValue) { - if (methodsBuilder_ == null) { - ensureMethodsIsMutable(); - methods_.add(index, builderForValue.build()); - onChanged(); - } else { - methodsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-     * The methods of this api, in unspecified order.
-     * 
- */ - public Builder addAllMethods( - java.lang.Iterable values) { - if (methodsBuilder_ == null) { - ensureMethodsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, methods_); - onChanged(); - } else { - methodsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-     * The methods of this api, in unspecified order.
-     * 
- */ - public Builder clearMethods() { - if (methodsBuilder_ == null) { - methods_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - methodsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-     * The methods of this api, in unspecified order.
-     * 
- */ - public Builder removeMethods(int index) { - if (methodsBuilder_ == null) { - ensureMethodsIsMutable(); - methods_.remove(index); - onChanged(); - } else { - methodsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-     * The methods of this api, in unspecified order.
-     * 
- */ - public com.google.protobuf.Method.Builder getMethodsBuilder( - int index) { - return getMethodsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-     * The methods of this api, in unspecified order.
-     * 
- */ - public com.google.protobuf.MethodOrBuilder getMethodsOrBuilder( - int index) { - if (methodsBuilder_ == null) { - return methods_.get(index); } else { - return methodsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-     * The methods of this api, in unspecified order.
-     * 
- */ - public java.util.List - getMethodsOrBuilderList() { - if (methodsBuilder_ != null) { - return methodsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(methods_); - } - } - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-     * The methods of this api, in unspecified order.
-     * 
- */ - public com.google.protobuf.Method.Builder addMethodsBuilder() { - return getMethodsFieldBuilder().addBuilder( - com.google.protobuf.Method.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-     * The methods of this api, in unspecified order.
-     * 
- */ - public com.google.protobuf.Method.Builder addMethodsBuilder( - int index) { - return getMethodsFieldBuilder().addBuilder( - index, com.google.protobuf.Method.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-     * The methods of this api, in unspecified order.
-     * 
- */ - public java.util.List - getMethodsBuilderList() { - return getMethodsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Method, com.google.protobuf.Method.Builder, com.google.protobuf.MethodOrBuilder> - getMethodsFieldBuilder() { - if (methodsBuilder_ == null) { - methodsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Method, com.google.protobuf.Method.Builder, com.google.protobuf.MethodOrBuilder>( - methods_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - methods_ = null; - } - return methodsBuilder_; - } - - private java.util.List options_ = - java.util.Collections.emptyList(); - private void ensureOptionsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - options_ = new java.util.ArrayList(options_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> optionsBuilder_; - - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Any metadata attached to the API.
-     * 
- */ - public java.util.List getOptionsList() { - if (optionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(options_); - } else { - return optionsBuilder_.getMessageList(); - } - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Any metadata attached to the API.
-     * 
- */ - public int getOptionsCount() { - if (optionsBuilder_ == null) { - return options_.size(); - } else { - return optionsBuilder_.getCount(); - } - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Any metadata attached to the API.
-     * 
- */ - public com.google.protobuf.Option getOptions(int index) { - if (optionsBuilder_ == null) { - return options_.get(index); - } else { - return optionsBuilder_.getMessage(index); - } - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Any metadata attached to the API.
-     * 
- */ - public Builder setOptions( - int index, com.google.protobuf.Option value) { - if (optionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOptionsIsMutable(); - options_.set(index, value); - onChanged(); - } else { - optionsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Any metadata attached to the API.
-     * 
- */ - public Builder setOptions( - int index, com.google.protobuf.Option.Builder builderForValue) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - options_.set(index, builderForValue.build()); - onChanged(); - } else { - optionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Any metadata attached to the API.
-     * 
- */ - public Builder addOptions(com.google.protobuf.Option value) { - if (optionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOptionsIsMutable(); - options_.add(value); - onChanged(); - } else { - optionsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Any metadata attached to the API.
-     * 
- */ - public Builder addOptions( - int index, com.google.protobuf.Option value) { - if (optionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOptionsIsMutable(); - options_.add(index, value); - onChanged(); - } else { - optionsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Any metadata attached to the API.
-     * 
- */ - public Builder addOptions( - com.google.protobuf.Option.Builder builderForValue) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - options_.add(builderForValue.build()); - onChanged(); - } else { - optionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Any metadata attached to the API.
-     * 
- */ - public Builder addOptions( - int index, com.google.protobuf.Option.Builder builderForValue) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - options_.add(index, builderForValue.build()); - onChanged(); - } else { - optionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Any metadata attached to the API.
-     * 
- */ - public Builder addAllOptions( - java.lang.Iterable values) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, options_); - onChanged(); - } else { - optionsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Any metadata attached to the API.
-     * 
- */ - public Builder clearOptions() { - if (optionsBuilder_ == null) { - options_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - optionsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Any metadata attached to the API.
-     * 
- */ - public Builder removeOptions(int index) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - options_.remove(index); - onChanged(); - } else { - optionsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Any metadata attached to the API.
-     * 
- */ - public com.google.protobuf.Option.Builder getOptionsBuilder( - int index) { - return getOptionsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Any metadata attached to the API.
-     * 
- */ - public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( - int index) { - if (optionsBuilder_ == null) { - return options_.get(index); } else { - return optionsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Any metadata attached to the API.
-     * 
- */ - public java.util.List - getOptionsOrBuilderList() { - if (optionsBuilder_ != null) { - return optionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(options_); - } - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Any metadata attached to the API.
-     * 
- */ - public com.google.protobuf.Option.Builder addOptionsBuilder() { - return getOptionsFieldBuilder().addBuilder( - com.google.protobuf.Option.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Any metadata attached to the API.
-     * 
- */ - public com.google.protobuf.Option.Builder addOptionsBuilder( - int index) { - return getOptionsFieldBuilder().addBuilder( - index, com.google.protobuf.Option.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Any metadata attached to the API.
-     * 
- */ - public java.util.List - getOptionsBuilderList() { - return getOptionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> - getOptionsFieldBuilder() { - if (optionsBuilder_ == null) { - optionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder>( - options_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); - options_ = null; - } - return optionsBuilder_; - } - - private java.lang.Object version_ = ""; - /** - * optional string version = 4; - * - *
-     * A version string for this api. If specified, must have the form
-     * `major-version.minor-version`, as in `1.10`. If the minor version
-     * is omitted, it defaults to zero. If the entire version field is
-     * empty, the major version is derived from the package name, as
-     * outlined below. If the field is not empty, the version in the
-     * package name will be verified to be consistent with what is
-     * provided here.
-     * The versioning schema uses [semantic
-     * versioning](http://semver.org) where the major version number
-     * indicates a breaking change and the minor version an additive,
-     * non-breaking change. Both version numbers are signals to users
-     * what to expect from different versions, and should be carefully
-     * chosen based on the product plan.
-     * The major version is also reflected in the package name of the
-     * API, which must end in `v<major-version>`, as in
-     * `google.feature.v1`. For major versions 0 and 1, the suffix can
-     * be omitted. Zero major versions must only be used for
-     * experimental, none-GA apis.
-     * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
-     * --)
-     * (-- TODO(wgg): determine whether we want to enable specifying
-     * this via an option in the proto file. --)
-     * 
- */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string version = 4; - * - *
-     * A version string for this api. If specified, must have the form
-     * `major-version.minor-version`, as in `1.10`. If the minor version
-     * is omitted, it defaults to zero. If the entire version field is
-     * empty, the major version is derived from the package name, as
-     * outlined below. If the field is not empty, the version in the
-     * package name will be verified to be consistent with what is
-     * provided here.
-     * The versioning schema uses [semantic
-     * versioning](http://semver.org) where the major version number
-     * indicates a breaking change and the minor version an additive,
-     * non-breaking change. Both version numbers are signals to users
-     * what to expect from different versions, and should be carefully
-     * chosen based on the product plan.
-     * The major version is also reflected in the package name of the
-     * API, which must end in `v<major-version>`, as in
-     * `google.feature.v1`. For major versions 0 and 1, the suffix can
-     * be omitted. Zero major versions must only be used for
-     * experimental, none-GA apis.
-     * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
-     * --)
-     * (-- TODO(wgg): determine whether we want to enable specifying
-     * this via an option in the proto file. --)
-     * 
- */ - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string version = 4; - * - *
-     * A version string for this api. If specified, must have the form
-     * `major-version.minor-version`, as in `1.10`. If the minor version
-     * is omitted, it defaults to zero. If the entire version field is
-     * empty, the major version is derived from the package name, as
-     * outlined below. If the field is not empty, the version in the
-     * package name will be verified to be consistent with what is
-     * provided here.
-     * The versioning schema uses [semantic
-     * versioning](http://semver.org) where the major version number
-     * indicates a breaking change and the minor version an additive,
-     * non-breaking change. Both version numbers are signals to users
-     * what to expect from different versions, and should be carefully
-     * chosen based on the product plan.
-     * The major version is also reflected in the package name of the
-     * API, which must end in `v<major-version>`, as in
-     * `google.feature.v1`. For major versions 0 and 1, the suffix can
-     * be omitted. Zero major versions must only be used for
-     * experimental, none-GA apis.
-     * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
-     * --)
-     * (-- TODO(wgg): determine whether we want to enable specifying
-     * this via an option in the proto file. --)
-     * 
- */ - public Builder setVersion( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - version_ = value; - onChanged(); - return this; - } - /** - * optional string version = 4; - * - *
-     * A version string for this api. If specified, must have the form
-     * `major-version.minor-version`, as in `1.10`. If the minor version
-     * is omitted, it defaults to zero. If the entire version field is
-     * empty, the major version is derived from the package name, as
-     * outlined below. If the field is not empty, the version in the
-     * package name will be verified to be consistent with what is
-     * provided here.
-     * The versioning schema uses [semantic
-     * versioning](http://semver.org) where the major version number
-     * indicates a breaking change and the minor version an additive,
-     * non-breaking change. Both version numbers are signals to users
-     * what to expect from different versions, and should be carefully
-     * chosen based on the product plan.
-     * The major version is also reflected in the package name of the
-     * API, which must end in `v<major-version>`, as in
-     * `google.feature.v1`. For major versions 0 and 1, the suffix can
-     * be omitted. Zero major versions must only be used for
-     * experimental, none-GA apis.
-     * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
-     * --)
-     * (-- TODO(wgg): determine whether we want to enable specifying
-     * this via an option in the proto file. --)
-     * 
- */ - public Builder clearVersion() { - - version_ = getDefaultInstance().getVersion(); - onChanged(); - return this; - } - /** - * optional string version = 4; - * - *
-     * A version string for this api. If specified, must have the form
-     * `major-version.minor-version`, as in `1.10`. If the minor version
-     * is omitted, it defaults to zero. If the entire version field is
-     * empty, the major version is derived from the package name, as
-     * outlined below. If the field is not empty, the version in the
-     * package name will be verified to be consistent with what is
-     * provided here.
-     * The versioning schema uses [semantic
-     * versioning](http://semver.org) where the major version number
-     * indicates a breaking change and the minor version an additive,
-     * non-breaking change. Both version numbers are signals to users
-     * what to expect from different versions, and should be carefully
-     * chosen based on the product plan.
-     * The major version is also reflected in the package name of the
-     * API, which must end in `v<major-version>`, as in
-     * `google.feature.v1`. For major versions 0 and 1, the suffix can
-     * be omitted. Zero major versions must only be used for
-     * experimental, none-GA apis.
-     * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
-     * --)
-     * (-- TODO(wgg): determine whether we want to enable specifying
-     * this via an option in the proto file. --)
-     * 
- */ - public Builder setVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - version_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SourceContext sourceContext_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.SourceContext, com.google.protobuf.SourceContext.Builder, com.google.protobuf.SourceContextOrBuilder> sourceContextBuilder_; - /** - * optional .google.protobuf.SourceContext source_context = 5; - * - *
-     * Source context for the protocol buffer service represented by this
-     * message.
-     * 
- */ - public boolean hasSourceContext() { - return sourceContextBuilder_ != null || sourceContext_ != null; - } - /** - * optional .google.protobuf.SourceContext source_context = 5; - * - *
-     * Source context for the protocol buffer service represented by this
-     * message.
-     * 
- */ - public com.google.protobuf.SourceContext getSourceContext() { - if (sourceContextBuilder_ == null) { - return sourceContext_ == null ? com.google.protobuf.SourceContext.getDefaultInstance() : sourceContext_; - } else { - return sourceContextBuilder_.getMessage(); - } - } - /** - * optional .google.protobuf.SourceContext source_context = 5; - * - *
-     * Source context for the protocol buffer service represented by this
-     * message.
-     * 
- */ - public Builder setSourceContext(com.google.protobuf.SourceContext value) { - if (sourceContextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sourceContext_ = value; - onChanged(); - } else { - sourceContextBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.protobuf.SourceContext source_context = 5; - * - *
-     * Source context for the protocol buffer service represented by this
-     * message.
-     * 
- */ - public Builder setSourceContext( - com.google.protobuf.SourceContext.Builder builderForValue) { - if (sourceContextBuilder_ == null) { - sourceContext_ = builderForValue.build(); - onChanged(); - } else { - sourceContextBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.protobuf.SourceContext source_context = 5; - * - *
-     * Source context for the protocol buffer service represented by this
-     * message.
-     * 
- */ - public Builder mergeSourceContext(com.google.protobuf.SourceContext value) { - if (sourceContextBuilder_ == null) { - if (sourceContext_ != null) { - sourceContext_ = - com.google.protobuf.SourceContext.newBuilder(sourceContext_).mergeFrom(value).buildPartial(); - } else { - sourceContext_ = value; - } - onChanged(); - } else { - sourceContextBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.protobuf.SourceContext source_context = 5; - * - *
-     * Source context for the protocol buffer service represented by this
-     * message.
-     * 
- */ - public Builder clearSourceContext() { - if (sourceContextBuilder_ == null) { - sourceContext_ = null; - onChanged(); - } else { - sourceContext_ = null; - sourceContextBuilder_ = null; - } - - return this; - } - /** - * optional .google.protobuf.SourceContext source_context = 5; - * - *
-     * Source context for the protocol buffer service represented by this
-     * message.
-     * 
- */ - public com.google.protobuf.SourceContext.Builder getSourceContextBuilder() { - - onChanged(); - return getSourceContextFieldBuilder().getBuilder(); - } - /** - * optional .google.protobuf.SourceContext source_context = 5; - * - *
-     * Source context for the protocol buffer service represented by this
-     * message.
-     * 
- */ - public com.google.protobuf.SourceContextOrBuilder getSourceContextOrBuilder() { - if (sourceContextBuilder_ != null) { - return sourceContextBuilder_.getMessageOrBuilder(); - } else { - return sourceContext_ == null ? - com.google.protobuf.SourceContext.getDefaultInstance() : sourceContext_; - } - } - /** - * optional .google.protobuf.SourceContext source_context = 5; - * - *
-     * Source context for the protocol buffer service represented by this
-     * message.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.SourceContext, com.google.protobuf.SourceContext.Builder, com.google.protobuf.SourceContextOrBuilder> - getSourceContextFieldBuilder() { - if (sourceContextBuilder_ == null) { - sourceContextBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.SourceContext, com.google.protobuf.SourceContext.Builder, com.google.protobuf.SourceContextOrBuilder>( - getSourceContext(), - getParentForChildren(), - isClean()); - sourceContext_ = null; - } - return sourceContextBuilder_; - } - - private java.util.List mixins_ = - java.util.Collections.emptyList(); - private void ensureMixinsIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - mixins_ = new java.util.ArrayList(mixins_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Mixin, com.google.protobuf.Mixin.Builder, com.google.protobuf.MixinOrBuilder> mixinsBuilder_; - - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-     * Included APIs. See [Mixin][].
-     * 
- */ - public java.util.List getMixinsList() { - if (mixinsBuilder_ == null) { - return java.util.Collections.unmodifiableList(mixins_); - } else { - return mixinsBuilder_.getMessageList(); - } - } - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-     * Included APIs. See [Mixin][].
-     * 
- */ - public int getMixinsCount() { - if (mixinsBuilder_ == null) { - return mixins_.size(); - } else { - return mixinsBuilder_.getCount(); - } - } - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-     * Included APIs. See [Mixin][].
-     * 
- */ - public com.google.protobuf.Mixin getMixins(int index) { - if (mixinsBuilder_ == null) { - return mixins_.get(index); - } else { - return mixinsBuilder_.getMessage(index); - } - } - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-     * Included APIs. See [Mixin][].
-     * 
- */ - public Builder setMixins( - int index, com.google.protobuf.Mixin value) { - if (mixinsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMixinsIsMutable(); - mixins_.set(index, value); - onChanged(); - } else { - mixinsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-     * Included APIs. See [Mixin][].
-     * 
- */ - public Builder setMixins( - int index, com.google.protobuf.Mixin.Builder builderForValue) { - if (mixinsBuilder_ == null) { - ensureMixinsIsMutable(); - mixins_.set(index, builderForValue.build()); - onChanged(); - } else { - mixinsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-     * Included APIs. See [Mixin][].
-     * 
- */ - public Builder addMixins(com.google.protobuf.Mixin value) { - if (mixinsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMixinsIsMutable(); - mixins_.add(value); - onChanged(); - } else { - mixinsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-     * Included APIs. See [Mixin][].
-     * 
- */ - public Builder addMixins( - int index, com.google.protobuf.Mixin value) { - if (mixinsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMixinsIsMutable(); - mixins_.add(index, value); - onChanged(); - } else { - mixinsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-     * Included APIs. See [Mixin][].
-     * 
- */ - public Builder addMixins( - com.google.protobuf.Mixin.Builder builderForValue) { - if (mixinsBuilder_ == null) { - ensureMixinsIsMutable(); - mixins_.add(builderForValue.build()); - onChanged(); - } else { - mixinsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-     * Included APIs. See [Mixin][].
-     * 
- */ - public Builder addMixins( - int index, com.google.protobuf.Mixin.Builder builderForValue) { - if (mixinsBuilder_ == null) { - ensureMixinsIsMutable(); - mixins_.add(index, builderForValue.build()); - onChanged(); - } else { - mixinsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-     * Included APIs. See [Mixin][].
-     * 
- */ - public Builder addAllMixins( - java.lang.Iterable values) { - if (mixinsBuilder_ == null) { - ensureMixinsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, mixins_); - onChanged(); - } else { - mixinsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-     * Included APIs. See [Mixin][].
-     * 
- */ - public Builder clearMixins() { - if (mixinsBuilder_ == null) { - mixins_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - mixinsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-     * Included APIs. See [Mixin][].
-     * 
- */ - public Builder removeMixins(int index) { - if (mixinsBuilder_ == null) { - ensureMixinsIsMutable(); - mixins_.remove(index); - onChanged(); - } else { - mixinsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-     * Included APIs. See [Mixin][].
-     * 
- */ - public com.google.protobuf.Mixin.Builder getMixinsBuilder( - int index) { - return getMixinsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-     * Included APIs. See [Mixin][].
-     * 
- */ - public com.google.protobuf.MixinOrBuilder getMixinsOrBuilder( - int index) { - if (mixinsBuilder_ == null) { - return mixins_.get(index); } else { - return mixinsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-     * Included APIs. See [Mixin][].
-     * 
- */ - public java.util.List - getMixinsOrBuilderList() { - if (mixinsBuilder_ != null) { - return mixinsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(mixins_); - } - } - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-     * Included APIs. See [Mixin][].
-     * 
- */ - public com.google.protobuf.Mixin.Builder addMixinsBuilder() { - return getMixinsFieldBuilder().addBuilder( - com.google.protobuf.Mixin.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-     * Included APIs. See [Mixin][].
-     * 
- */ - public com.google.protobuf.Mixin.Builder addMixinsBuilder( - int index) { - return getMixinsFieldBuilder().addBuilder( - index, com.google.protobuf.Mixin.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-     * Included APIs. See [Mixin][].
-     * 
- */ - public java.util.List - getMixinsBuilderList() { - return getMixinsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Mixin, com.google.protobuf.Mixin.Builder, com.google.protobuf.MixinOrBuilder> - getMixinsFieldBuilder() { - if (mixinsBuilder_ == null) { - mixinsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Mixin, com.google.protobuf.Mixin.Builder, com.google.protobuf.MixinOrBuilder>( - mixins_, - ((bitField0_ & 0x00000020) == 0x00000020), - getParentForChildren(), - isClean()); - mixins_ = null; - } - return mixinsBuilder_; - } - - private int syntax_ = 0; - /** - * optional .google.protobuf.Syntax syntax = 7; - * - *
-     * The source syntax of the service.
-     * 
- */ - public int getSyntaxValue() { - return syntax_; - } - /** - * optional .google.protobuf.Syntax syntax = 7; - * - *
-     * The source syntax of the service.
-     * 
- */ - public Builder setSyntaxValue(int value) { - syntax_ = value; - onChanged(); - return this; - } - /** - * optional .google.protobuf.Syntax syntax = 7; - * - *
-     * The source syntax of the service.
-     * 
- */ - public com.google.protobuf.Syntax getSyntax() { - com.google.protobuf.Syntax result = com.google.protobuf.Syntax.valueOf(syntax_); - return result == null ? com.google.protobuf.Syntax.UNRECOGNIZED : result; - } - /** - * optional .google.protobuf.Syntax syntax = 7; - * - *
-     * The source syntax of the service.
-     * 
- */ - public Builder setSyntax(com.google.protobuf.Syntax value) { - if (value == null) { - throw new NullPointerException(); - } - - syntax_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .google.protobuf.Syntax syntax = 7; - * - *
-     * The source syntax of the service.
-     * 
- */ - public Builder clearSyntax() { - - syntax_ = 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.protobuf.Api) - } - - // @@protoc_insertion_point(class_scope:google.protobuf.Api) - private static final com.google.protobuf.Api DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.protobuf.Api(); - } - - public static com.google.protobuf.Api getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Api parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Api(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.protobuf.Api getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/ApiOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/ApiOrBuilder.java deleted file mode 100644 index 6cbec48994b9..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/ApiOrBuilder.java +++ /dev/null @@ -1,266 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/api.proto - -package com.google.protobuf; - -public interface ApiOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.protobuf.Api) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string name = 1; - * - *
-   * The fully qualified name of this api, including package name
-   * followed by the api's simple name.
-   * 
- */ - java.lang.String getName(); - /** - * optional string name = 1; - * - *
-   * The fully qualified name of this api, including package name
-   * followed by the api's simple name.
-   * 
- */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-   * The methods of this api, in unspecified order.
-   * 
- */ - java.util.List - getMethodsList(); - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-   * The methods of this api, in unspecified order.
-   * 
- */ - com.google.protobuf.Method getMethods(int index); - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-   * The methods of this api, in unspecified order.
-   * 
- */ - int getMethodsCount(); - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-   * The methods of this api, in unspecified order.
-   * 
- */ - java.util.List - getMethodsOrBuilderList(); - /** - * repeated .google.protobuf.Method methods = 2; - * - *
-   * The methods of this api, in unspecified order.
-   * 
- */ - com.google.protobuf.MethodOrBuilder getMethodsOrBuilder( - int index); - - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Any metadata attached to the API.
-   * 
- */ - java.util.List - getOptionsList(); - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Any metadata attached to the API.
-   * 
- */ - com.google.protobuf.Option getOptions(int index); - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Any metadata attached to the API.
-   * 
- */ - int getOptionsCount(); - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Any metadata attached to the API.
-   * 
- */ - java.util.List - getOptionsOrBuilderList(); - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Any metadata attached to the API.
-   * 
- */ - com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( - int index); - - /** - * optional string version = 4; - * - *
-   * A version string for this api. If specified, must have the form
-   * `major-version.minor-version`, as in `1.10`. If the minor version
-   * is omitted, it defaults to zero. If the entire version field is
-   * empty, the major version is derived from the package name, as
-   * outlined below. If the field is not empty, the version in the
-   * package name will be verified to be consistent with what is
-   * provided here.
-   * The versioning schema uses [semantic
-   * versioning](http://semver.org) where the major version number
-   * indicates a breaking change and the minor version an additive,
-   * non-breaking change. Both version numbers are signals to users
-   * what to expect from different versions, and should be carefully
-   * chosen based on the product plan.
-   * The major version is also reflected in the package name of the
-   * API, which must end in `v<major-version>`, as in
-   * `google.feature.v1`. For major versions 0 and 1, the suffix can
-   * be omitted. Zero major versions must only be used for
-   * experimental, none-GA apis.
-   * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
-   * --)
-   * (-- TODO(wgg): determine whether we want to enable specifying
-   * this via an option in the proto file. --)
-   * 
- */ - java.lang.String getVersion(); - /** - * optional string version = 4; - * - *
-   * A version string for this api. If specified, must have the form
-   * `major-version.minor-version`, as in `1.10`. If the minor version
-   * is omitted, it defaults to zero. If the entire version field is
-   * empty, the major version is derived from the package name, as
-   * outlined below. If the field is not empty, the version in the
-   * package name will be verified to be consistent with what is
-   * provided here.
-   * The versioning schema uses [semantic
-   * versioning](http://semver.org) where the major version number
-   * indicates a breaking change and the minor version an additive,
-   * non-breaking change. Both version numbers are signals to users
-   * what to expect from different versions, and should be carefully
-   * chosen based on the product plan.
-   * The major version is also reflected in the package name of the
-   * API, which must end in `v<major-version>`, as in
-   * `google.feature.v1`. For major versions 0 and 1, the suffix can
-   * be omitted. Zero major versions must only be used for
-   * experimental, none-GA apis.
-   * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
-   * --)
-   * (-- TODO(wgg): determine whether we want to enable specifying
-   * this via an option in the proto file. --)
-   * 
- */ - com.google.protobuf.ByteString - getVersionBytes(); - - /** - * optional .google.protobuf.SourceContext source_context = 5; - * - *
-   * Source context for the protocol buffer service represented by this
-   * message.
-   * 
- */ - boolean hasSourceContext(); - /** - * optional .google.protobuf.SourceContext source_context = 5; - * - *
-   * Source context for the protocol buffer service represented by this
-   * message.
-   * 
- */ - com.google.protobuf.SourceContext getSourceContext(); - /** - * optional .google.protobuf.SourceContext source_context = 5; - * - *
-   * Source context for the protocol buffer service represented by this
-   * message.
-   * 
- */ - com.google.protobuf.SourceContextOrBuilder getSourceContextOrBuilder(); - - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-   * Included APIs. See [Mixin][].
-   * 
- */ - java.util.List - getMixinsList(); - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-   * Included APIs. See [Mixin][].
-   * 
- */ - com.google.protobuf.Mixin getMixins(int index); - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-   * Included APIs. See [Mixin][].
-   * 
- */ - int getMixinsCount(); - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-   * Included APIs. See [Mixin][].
-   * 
- */ - java.util.List - getMixinsOrBuilderList(); - /** - * repeated .google.protobuf.Mixin mixins = 6; - * - *
-   * Included APIs. See [Mixin][].
-   * 
- */ - com.google.protobuf.MixinOrBuilder getMixinsOrBuilder( - int index); - - /** - * optional .google.protobuf.Syntax syntax = 7; - * - *
-   * The source syntax of the service.
-   * 
- */ - int getSyntaxValue(); - /** - * optional .google.protobuf.Syntax syntax = 7; - * - *
-   * The source syntax of the service.
-   * 
- */ - com.google.protobuf.Syntax getSyntax(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/ApiProto.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/ApiProto.java deleted file mode 100644 index 90130982e0e1..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/ApiProto.java +++ /dev/null @@ -1,91 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/api.proto - -package com.google.protobuf; - -public final class ApiProto { - private ApiProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_protobuf_Api_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_protobuf_Api_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_protobuf_Method_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_protobuf_Method_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_protobuf_Mixin_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_protobuf_Mixin_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\031google/protobuf/api.proto\022\017google.prot" + - "obuf\032$google/protobuf/source_context.pro" + - "to\032\032google/protobuf/type.proto\"\201\002\n\003Api\022\014" + - "\n\004name\030\001 \001(\t\022(\n\007methods\030\002 \003(\0132\027.google.p" + - "rotobuf.Method\022(\n\007options\030\003 \003(\0132\027.google" + - ".protobuf.Option\022\017\n\007version\030\004 \001(\t\0226\n\016sou" + - "rce_context\030\005 \001(\0132\036.google.protobuf.Sour" + - "ceContext\022&\n\006mixins\030\006 \003(\0132\026.google.proto" + - "buf.Mixin\022\'\n\006syntax\030\007 \001(\0162\027.google.proto" + - "buf.Syntax\"\335\001\n\006Method\022\014\n\004name\030\001 \001(\t\022\034\n\020r", - "equest_type_url\030\002 \001(\tB\002\010\002\022\031\n\021request_str" + - "eaming\030\003 \001(\010\022\035\n\021response_type_url\030\004 \001(\tB" + - "\002\010\002\022\032\n\022response_streaming\030\005 \001(\010\022(\n\007optio" + - "ns\030\006 \003(\0132\027.google.protobuf.Option\022\'\n\006syn" + - "tax\030\007 \001(\0162\027.google.protobuf.Syntax\"#\n\005Mi" + - "xin\022\014\n\004name\030\001 \001(\t\022\014\n\004root\030\002 \001(\tBK\n\023com.g" + - "oogle.protobufB\010ApiProtoP\001\240\001\001\242\002\003GPB\252\002\036Go" + - "ogle.Protobuf.WellKnownTypesb\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.SourceContextProto.getDescriptor(), - com.google.protobuf.TypeProto.getDescriptor(), - }, assigner); - internal_static_google_protobuf_Api_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_protobuf_Api_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_protobuf_Api_descriptor, - new java.lang.String[] { "Name", "Methods", "Options", "Version", "SourceContext", "Mixins", "Syntax", }); - internal_static_google_protobuf_Method_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_protobuf_Method_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_protobuf_Method_descriptor, - new java.lang.String[] { "Name", "RequestTypeUrl", "RequestStreaming", "ResponseTypeUrl", "ResponseStreaming", "Options", "Syntax", }); - internal_static_google_protobuf_Mixin_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_protobuf_Mixin_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_protobuf_Mixin_descriptor, - new java.lang.String[] { "Name", "Root", }); - com.google.protobuf.SourceContextProto.getDescriptor(); - com.google.protobuf.TypeProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/BoolValue.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/BoolValue.java deleted file mode 100644 index a18c664aae5d..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/BoolValue.java +++ /dev/null @@ -1,428 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/wrappers.proto - -package com.google.protobuf; - -/** - * Protobuf type {@code google.protobuf.BoolValue} - * - *
- * Wrapper message for `bool`.
- * The JSON representation for `BoolValue` is JSON `true` and `false`.
- * 
- */ -public final class BoolValue extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.protobuf.BoolValue) - BoolValueOrBuilder { - // Use BoolValue.newBuilder() to construct. - private BoolValue(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BoolValue() { - value_ = false; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private BoolValue( - 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: { - - value_ = 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.protobuf.WrappersProto.internal_static_google_protobuf_BoolValue_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BoolValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.BoolValue.class, com.google.protobuf.BoolValue.Builder.class); - } - - public static final int VALUE_FIELD_NUMBER = 1; - private boolean value_; - /** - * optional bool value = 1; - * - *
-   * The bool value.
-   * 
- */ - public boolean getValue() { - return value_; - } - - 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 (value_ != false) { - output.writeBool(1, value_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (value_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, value_); - } - 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.protobuf.BoolValue)) { - return super.equals(obj); - } - com.google.protobuf.BoolValue other = (com.google.protobuf.BoolValue) obj; - - boolean result = true; - result = result && (getValue() - == other.getValue()); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getValue()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protobuf.BoolValue parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.BoolValue 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.protobuf.BoolValue parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.BoolValue parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.protobuf.BoolValue parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.BoolValue parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.protobuf.BoolValue parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.protobuf.BoolValue parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.protobuf.BoolValue parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.BoolValue 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.protobuf.BoolValue 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.protobuf.BoolValue} - * - *
-   * Wrapper message for `bool`.
-   * The JSON representation for `BoolValue` is JSON `true` and `false`.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.protobuf.BoolValue) - com.google.protobuf.BoolValueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BoolValue_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BoolValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.BoolValue.class, com.google.protobuf.BoolValue.Builder.class); - } - - // Construct using com.google.protobuf.BoolValue.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(); - value_ = false; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BoolValue_descriptor; - } - - public com.google.protobuf.BoolValue getDefaultInstanceForType() { - return com.google.protobuf.BoolValue.getDefaultInstance(); - } - - public com.google.protobuf.BoolValue build() { - com.google.protobuf.BoolValue result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.protobuf.BoolValue buildPartial() { - com.google.protobuf.BoolValue result = new com.google.protobuf.BoolValue(this); - result.value_ = value_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.protobuf.BoolValue) { - return mergeFrom((com.google.protobuf.BoolValue)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.protobuf.BoolValue other) { - if (other == com.google.protobuf.BoolValue.getDefaultInstance()) return this; - if (other.getValue() != false) { - setValue(other.getValue()); - } - 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.protobuf.BoolValue parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.protobuf.BoolValue) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private boolean value_ ; - /** - * optional bool value = 1; - * - *
-     * The bool value.
-     * 
- */ - public boolean getValue() { - return value_; - } - /** - * optional bool value = 1; - * - *
-     * The bool value.
-     * 
- */ - public Builder setValue(boolean value) { - - value_ = value; - onChanged(); - return this; - } - /** - * optional bool value = 1; - * - *
-     * The bool value.
-     * 
- */ - public Builder clearValue() { - - value_ = 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.protobuf.BoolValue) - } - - // @@protoc_insertion_point(class_scope:google.protobuf.BoolValue) - private static final com.google.protobuf.BoolValue DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.protobuf.BoolValue(); - } - - public static com.google.protobuf.BoolValue getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public BoolValue parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new BoolValue(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.protobuf.BoolValue getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/BoolValueOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/BoolValueOrBuilder.java deleted file mode 100644 index 17c3436d6fe2..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/BoolValueOrBuilder.java +++ /dev/null @@ -1,18 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/wrappers.proto - -package com.google.protobuf; - -public interface BoolValueOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.protobuf.BoolValue) - com.google.protobuf.MessageOrBuilder { - - /** - * optional bool value = 1; - * - *
-   * The bool value.
-   * 
- */ - boolean getValue(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/BytesValue.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/BytesValue.java deleted file mode 100644 index 3d784ca7bc5c..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/BytesValue.java +++ /dev/null @@ -1,430 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/wrappers.proto - -package com.google.protobuf; - -/** - * Protobuf type {@code google.protobuf.BytesValue} - * - *
- * Wrapper message for `bytes`.
- * The JSON representation for `BytesValue` is JSON string.
- * 
- */ -public final class BytesValue extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.protobuf.BytesValue) - BytesValueOrBuilder { - // Use BytesValue.newBuilder() to construct. - private BytesValue(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BytesValue() { - value_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private BytesValue( - 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: { - - value_ = input.readBytes(); - 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.protobuf.WrappersProto.internal_static_google_protobuf_BytesValue_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BytesValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.BytesValue.class, com.google.protobuf.BytesValue.Builder.class); - } - - public static final int VALUE_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString value_; - /** - * optional bytes value = 1 [ctype = CORD]; - * - *
-   * The bytes value.
-   * 
- */ - public com.google.protobuf.ByteString getValue() { - return value_; - } - - 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 (!value_.isEmpty()) { - output.writeBytes(1, value_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!value_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, value_); - } - 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.protobuf.BytesValue)) { - return super.equals(obj); - } - com.google.protobuf.BytesValue other = (com.google.protobuf.BytesValue) obj; - - boolean result = true; - result = result && getValue() - .equals(other.getValue()); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protobuf.BytesValue parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.BytesValue 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.protobuf.BytesValue parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.BytesValue parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.protobuf.BytesValue parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.BytesValue parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.protobuf.BytesValue parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.protobuf.BytesValue parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.protobuf.BytesValue parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.BytesValue 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.protobuf.BytesValue 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.protobuf.BytesValue} - * - *
-   * Wrapper message for `bytes`.
-   * The JSON representation for `BytesValue` is JSON string.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.protobuf.BytesValue) - com.google.protobuf.BytesValueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BytesValue_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BytesValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.BytesValue.class, com.google.protobuf.BytesValue.Builder.class); - } - - // Construct using com.google.protobuf.BytesValue.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(); - value_ = com.google.protobuf.ByteString.EMPTY; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BytesValue_descriptor; - } - - public com.google.protobuf.BytesValue getDefaultInstanceForType() { - return com.google.protobuf.BytesValue.getDefaultInstance(); - } - - public com.google.protobuf.BytesValue build() { - com.google.protobuf.BytesValue result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.protobuf.BytesValue buildPartial() { - com.google.protobuf.BytesValue result = new com.google.protobuf.BytesValue(this); - result.value_ = value_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.protobuf.BytesValue) { - return mergeFrom((com.google.protobuf.BytesValue)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.protobuf.BytesValue other) { - if (other == com.google.protobuf.BytesValue.getDefaultInstance()) return this; - if (other.getValue() != com.google.protobuf.ByteString.EMPTY) { - setValue(other.getValue()); - } - 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.protobuf.BytesValue parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.protobuf.BytesValue) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; - /** - * optional bytes value = 1 [ctype = CORD]; - * - *
-     * The bytes value.
-     * 
- */ - public com.google.protobuf.ByteString getValue() { - return value_; - } - /** - * optional bytes value = 1 [ctype = CORD]; - * - *
-     * The bytes value.
-     * 
- */ - public Builder setValue(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - value_ = value; - onChanged(); - return this; - } - /** - * optional bytes value = 1 [ctype = CORD]; - * - *
-     * The bytes value.
-     * 
- */ - public Builder clearValue() { - - value_ = getDefaultInstance().getValue(); - 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.protobuf.BytesValue) - } - - // @@protoc_insertion_point(class_scope:google.protobuf.BytesValue) - private static final com.google.protobuf.BytesValue DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.protobuf.BytesValue(); - } - - public static com.google.protobuf.BytesValue getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public BytesValue parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new BytesValue(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.protobuf.BytesValue getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/BytesValueOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/BytesValueOrBuilder.java deleted file mode 100644 index 5d27cb3133d8..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/BytesValueOrBuilder.java +++ /dev/null @@ -1,18 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/wrappers.proto - -package com.google.protobuf; - -public interface BytesValueOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.protobuf.BytesValue) - com.google.protobuf.MessageOrBuilder { - - /** - * optional bytes value = 1 [ctype = CORD]; - * - *
-   * The bytes value.
-   * 
- */ - com.google.protobuf.ByteString getValue(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/DoubleValue.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/DoubleValue.java deleted file mode 100644 index 2a964a8f8020..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/DoubleValue.java +++ /dev/null @@ -1,430 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/wrappers.proto - -package com.google.protobuf; - -/** - * Protobuf type {@code google.protobuf.DoubleValue} - * - *
- * Wrapper message for `double`.
- * The JSON representation for `DoubleValue` is JSON number.
- * 
- */ -public final class DoubleValue extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.protobuf.DoubleValue) - DoubleValueOrBuilder { - // Use DoubleValue.newBuilder() to construct. - private DoubleValue(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DoubleValue() { - value_ = 0D; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private DoubleValue( - 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: { - - value_ = 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.protobuf.WrappersProto.internal_static_google_protobuf_DoubleValue_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.WrappersProto.internal_static_google_protobuf_DoubleValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.DoubleValue.class, com.google.protobuf.DoubleValue.Builder.class); - } - - public static final int VALUE_FIELD_NUMBER = 1; - private double value_; - /** - * optional double value = 1; - * - *
-   * The double value.
-   * 
- */ - public double getValue() { - return value_; - } - - 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 (value_ != 0D) { - output.writeDouble(1, value_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (value_ != 0D) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, value_); - } - 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.protobuf.DoubleValue)) { - return super.equals(obj); - } - com.google.protobuf.DoubleValue other = (com.google.protobuf.DoubleValue) obj; - - boolean result = true; - result = result && ( - java.lang.Double.doubleToLongBits(getValue()) - == java.lang.Double.doubleToLongBits( - other.getValue())); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getValue())); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protobuf.DoubleValue parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.DoubleValue 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.protobuf.DoubleValue parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.DoubleValue parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.protobuf.DoubleValue parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.DoubleValue parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.protobuf.DoubleValue parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.protobuf.DoubleValue parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.protobuf.DoubleValue parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.DoubleValue 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.protobuf.DoubleValue 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.protobuf.DoubleValue} - * - *
-   * Wrapper message for `double`.
-   * The JSON representation for `DoubleValue` is JSON number.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.protobuf.DoubleValue) - com.google.protobuf.DoubleValueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.WrappersProto.internal_static_google_protobuf_DoubleValue_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.WrappersProto.internal_static_google_protobuf_DoubleValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.DoubleValue.class, com.google.protobuf.DoubleValue.Builder.class); - } - - // Construct using com.google.protobuf.DoubleValue.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(); - value_ = 0D; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.protobuf.WrappersProto.internal_static_google_protobuf_DoubleValue_descriptor; - } - - public com.google.protobuf.DoubleValue getDefaultInstanceForType() { - return com.google.protobuf.DoubleValue.getDefaultInstance(); - } - - public com.google.protobuf.DoubleValue build() { - com.google.protobuf.DoubleValue result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.protobuf.DoubleValue buildPartial() { - com.google.protobuf.DoubleValue result = new com.google.protobuf.DoubleValue(this); - result.value_ = value_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.protobuf.DoubleValue) { - return mergeFrom((com.google.protobuf.DoubleValue)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.protobuf.DoubleValue other) { - if (other == com.google.protobuf.DoubleValue.getDefaultInstance()) return this; - if (other.getValue() != 0D) { - setValue(other.getValue()); - } - 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.protobuf.DoubleValue parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.protobuf.DoubleValue) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private double value_ ; - /** - * optional double value = 1; - * - *
-     * The double value.
-     * 
- */ - public double getValue() { - return value_; - } - /** - * optional double value = 1; - * - *
-     * The double value.
-     * 
- */ - public Builder setValue(double value) { - - value_ = value; - onChanged(); - return this; - } - /** - * optional double value = 1; - * - *
-     * The double value.
-     * 
- */ - public Builder clearValue() { - - value_ = 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.protobuf.DoubleValue) - } - - // @@protoc_insertion_point(class_scope:google.protobuf.DoubleValue) - private static final com.google.protobuf.DoubleValue DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.protobuf.DoubleValue(); - } - - public static com.google.protobuf.DoubleValue getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public DoubleValue parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new DoubleValue(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.protobuf.DoubleValue getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/DoubleValueOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/DoubleValueOrBuilder.java deleted file mode 100644 index 2b3c30eb3b25..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/DoubleValueOrBuilder.java +++ /dev/null @@ -1,18 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/wrappers.proto - -package com.google.protobuf; - -public interface DoubleValueOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.protobuf.DoubleValue) - com.google.protobuf.MessageOrBuilder { - - /** - * optional double value = 1; - * - *
-   * The double value.
-   * 
- */ - double getValue(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Duration.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Duration.java deleted file mode 100644 index 6a753cbe33c6..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Duration.java +++ /dev/null @@ -1,586 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/duration.proto - -package com.google.protobuf; - -/** - * Protobuf type {@code google.protobuf.Duration} - * - *
- * A Duration represents a signed, fixed-length span of time represented
- * as a count of seconds and fractions of seconds at nanosecond
- * resolution. It is independent of any calendar and concepts like "day"
- * or "month". It is related to Timestamp in that the difference between
- * two Timestamp values is a Duration and it can be added or subtracted
- * from a Timestamp. Range is approximately +-10,000 years.
- * Example 1: Compute Duration from two Timestamps in pseudo code.
- *     Timestamp start = ...;
- *     Timestamp end = ...;
- *     Duration duration = ...;
- *     duration.seconds = end.seconds - start.seconds;
- *     duration.nanos = end.nanos - start.nanos;
- *     if (duration.seconds < 0 && duration.nanos > 0) {
- *       duration.seconds += 1;
- *       duration.nanos -= 1000000000;
- *     } else if (durations.seconds > 0 && duration.nanos < 0) {
- *       duration.seconds -= 1;
- *       duration.nanos += 1000000000;
- *     }
- * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
- *     Timestamp start = ...;
- *     Duration duration = ...;
- *     Timestamp end = ...;
- *     end.seconds = start.seconds + duration.seconds;
- *     end.nanos = start.nanos + duration.nanos;
- *     if (end.nanos < 0) {
- *       end.seconds -= 1;
- *       end.nanos += 1000000000;
- *     } else if (end.nanos >= 1000000000) {
- *       end.seconds += 1;
- *       end.nanos -= 1000000000;
- *     }
- * 
- */ -public final class Duration extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.protobuf.Duration) - DurationOrBuilder { - // Use Duration.newBuilder() to construct. - private Duration(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Duration() { - seconds_ = 0L; - nanos_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Duration( - 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: { - - seconds_ = input.readInt64(); - break; - } - case 16: { - - 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.protobuf.DurationProto.internal_static_google_protobuf_Duration_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.DurationProto.internal_static_google_protobuf_Duration_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.Duration.class, com.google.protobuf.Duration.Builder.class); - } - - public static final int SECONDS_FIELD_NUMBER = 1; - private long seconds_; - /** - * optional int64 seconds = 1; - * - *
-   * Signed seconds of the span of time. Must be from -315,576,000,000
-   * to +315,576,000,000 inclusive.
-   * 
- */ - public long getSeconds() { - return seconds_; - } - - public static final int NANOS_FIELD_NUMBER = 2; - private int nanos_; - /** - * optional int32 nanos = 2; - * - *
-   * Signed fractions of a second at nanosecond resolution of the span
-   * of time. Durations less than one second are represented with a 0
-   * `seconds` field and a positive or negative `nanos` field. For durations
-   * of one second or more, a non-zero value for the `nanos` field must be
-   * of the same sign as the `seconds` field. Must be from -999,999,999
-   * to +999,999,999 inclusive.
-   * 
- */ - 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 (seconds_ != 0L) { - output.writeInt64(1, seconds_); - } - if (nanos_ != 0) { - output.writeInt32(2, nanos_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (seconds_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, seconds_); - } - if (nanos_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, 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.protobuf.Duration)) { - return super.equals(obj); - } - com.google.protobuf.Duration other = (com.google.protobuf.Duration) obj; - - boolean result = true; - 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) + SECONDS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getSeconds()); - hash = (37 * hash) + NANOS_FIELD_NUMBER; - hash = (53 * hash) + getNanos(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protobuf.Duration parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Duration 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.protobuf.Duration parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Duration parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.protobuf.Duration parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.Duration parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.protobuf.Duration parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.protobuf.Duration parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.protobuf.Duration parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.Duration 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.protobuf.Duration 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.protobuf.Duration} - * - *
-   * A Duration represents a signed, fixed-length span of time represented
-   * as a count of seconds and fractions of seconds at nanosecond
-   * resolution. It is independent of any calendar and concepts like "day"
-   * or "month". It is related to Timestamp in that the difference between
-   * two Timestamp values is a Duration and it can be added or subtracted
-   * from a Timestamp. Range is approximately +-10,000 years.
-   * Example 1: Compute Duration from two Timestamps in pseudo code.
-   *     Timestamp start = ...;
-   *     Timestamp end = ...;
-   *     Duration duration = ...;
-   *     duration.seconds = end.seconds - start.seconds;
-   *     duration.nanos = end.nanos - start.nanos;
-   *     if (duration.seconds < 0 && duration.nanos > 0) {
-   *       duration.seconds += 1;
-   *       duration.nanos -= 1000000000;
-   *     } else if (durations.seconds > 0 && duration.nanos < 0) {
-   *       duration.seconds -= 1;
-   *       duration.nanos += 1000000000;
-   *     }
-   * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
-   *     Timestamp start = ...;
-   *     Duration duration = ...;
-   *     Timestamp end = ...;
-   *     end.seconds = start.seconds + duration.seconds;
-   *     end.nanos = start.nanos + duration.nanos;
-   *     if (end.nanos < 0) {
-   *       end.seconds -= 1;
-   *       end.nanos += 1000000000;
-   *     } else if (end.nanos >= 1000000000) {
-   *       end.seconds += 1;
-   *       end.nanos -= 1000000000;
-   *     }
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.protobuf.Duration) - com.google.protobuf.DurationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.DurationProto.internal_static_google_protobuf_Duration_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.DurationProto.internal_static_google_protobuf_Duration_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.Duration.class, com.google.protobuf.Duration.Builder.class); - } - - // Construct using com.google.protobuf.Duration.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(); - seconds_ = 0L; - - nanos_ = 0; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.protobuf.DurationProto.internal_static_google_protobuf_Duration_descriptor; - } - - public com.google.protobuf.Duration getDefaultInstanceForType() { - return com.google.protobuf.Duration.getDefaultInstance(); - } - - public com.google.protobuf.Duration build() { - com.google.protobuf.Duration result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.protobuf.Duration buildPartial() { - com.google.protobuf.Duration result = new com.google.protobuf.Duration(this); - result.seconds_ = seconds_; - result.nanos_ = nanos_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.protobuf.Duration) { - return mergeFrom((com.google.protobuf.Duration)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.protobuf.Duration other) { - if (other == com.google.protobuf.Duration.getDefaultInstance()) return this; - if (other.getSeconds() != 0L) { - 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.protobuf.Duration parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.protobuf.Duration) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private long seconds_ ; - /** - * optional int64 seconds = 1; - * - *
-     * Signed seconds of the span of time. Must be from -315,576,000,000
-     * to +315,576,000,000 inclusive.
-     * 
- */ - public long getSeconds() { - return seconds_; - } - /** - * optional int64 seconds = 1; - * - *
-     * Signed seconds of the span of time. Must be from -315,576,000,000
-     * to +315,576,000,000 inclusive.
-     * 
- */ - public Builder setSeconds(long value) { - - seconds_ = value; - onChanged(); - return this; - } - /** - * optional int64 seconds = 1; - * - *
-     * Signed seconds of the span of time. Must be from -315,576,000,000
-     * to +315,576,000,000 inclusive.
-     * 
- */ - public Builder clearSeconds() { - - seconds_ = 0L; - onChanged(); - return this; - } - - private int nanos_ ; - /** - * optional int32 nanos = 2; - * - *
-     * Signed fractions of a second at nanosecond resolution of the span
-     * of time. Durations less than one second are represented with a 0
-     * `seconds` field and a positive or negative `nanos` field. For durations
-     * of one second or more, a non-zero value for the `nanos` field must be
-     * of the same sign as the `seconds` field. Must be from -999,999,999
-     * to +999,999,999 inclusive.
-     * 
- */ - public int getNanos() { - return nanos_; - } - /** - * optional int32 nanos = 2; - * - *
-     * Signed fractions of a second at nanosecond resolution of the span
-     * of time. Durations less than one second are represented with a 0
-     * `seconds` field and a positive or negative `nanos` field. For durations
-     * of one second or more, a non-zero value for the `nanos` field must be
-     * of the same sign as the `seconds` field. Must be from -999,999,999
-     * to +999,999,999 inclusive.
-     * 
- */ - public Builder setNanos(int value) { - - nanos_ = value; - onChanged(); - return this; - } - /** - * optional int32 nanos = 2; - * - *
-     * Signed fractions of a second at nanosecond resolution of the span
-     * of time. Durations less than one second are represented with a 0
-     * `seconds` field and a positive or negative `nanos` field. For durations
-     * of one second or more, a non-zero value for the `nanos` field must be
-     * of the same sign as the `seconds` field. Must be from -999,999,999
-     * to +999,999,999 inclusive.
-     * 
- */ - 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.protobuf.Duration) - } - - // @@protoc_insertion_point(class_scope:google.protobuf.Duration) - private static final com.google.protobuf.Duration DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.protobuf.Duration(); - } - - public static com.google.protobuf.Duration getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Duration parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Duration(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.protobuf.Duration getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/DurationOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/DurationOrBuilder.java deleted file mode 100644 index ef4d57f2ff9c..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/DurationOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/duration.proto - -package com.google.protobuf; - -public interface DurationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.protobuf.Duration) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int64 seconds = 1; - * - *
-   * Signed seconds of the span of time. Must be from -315,576,000,000
-   * to +315,576,000,000 inclusive.
-   * 
- */ - long getSeconds(); - - /** - * optional int32 nanos = 2; - * - *
-   * Signed fractions of a second at nanosecond resolution of the span
-   * of time. Durations less than one second are represented with a 0
-   * `seconds` field and a positive or negative `nanos` field. For durations
-   * of one second or more, a non-zero value for the `nanos` field must be
-   * of the same sign as the `seconds` field. Must be from -999,999,999
-   * to +999,999,999 inclusive.
-   * 
- */ - int getNanos(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/DurationProto.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/DurationProto.java deleted file mode 100644 index a2c6c5c11797..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/DurationProto.java +++ /dev/null @@ -1,52 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/duration.proto - -package com.google.protobuf; - -public final class DurationProto { - private DurationProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_protobuf_Duration_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_protobuf_Duration_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/protobuf/duration.proto\022\017google" + - ".protobuf\"*\n\010Duration\022\017\n\007seconds\030\001 \001(\003\022\r" + - "\n\005nanos\030\002 \001(\005BS\n\023com.google.protobufB\rDu" + - "rationProtoP\001\240\001\001\242\002\003GPB\252\002\036Google.Protobuf" + - ".WellKnownTypes\260\002\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_protobuf_Duration_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_protobuf_Duration_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_protobuf_Duration_descriptor, - new java.lang.String[] { "Seconds", "Nanos", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Empty.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Empty.java deleted file mode 100644 index e1548e9604e7..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Empty.java +++ /dev/null @@ -1,362 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/empty.proto - -package com.google.protobuf; - -/** - * Protobuf type {@code google.protobuf.Empty} - * - *
- * A generic empty message that you can re-use to avoid defining duplicated
- * empty messages in your APIs. A typical example is to use it as the request
- * or the response type of an API method. For instance:
- *     service Foo {
- *       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
- *     }
- * The JSON representation for `Empty` is empty JSON object `{}`.
- * 
- */ -public final class Empty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.protobuf.Empty) - EmptyOrBuilder { - // Use Empty.newBuilder() to construct. - private Empty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Empty() { - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Empty( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - 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; - } - } - } - } 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.protobuf.EmptyProto.internal_static_google_protobuf_Empty_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.EmptyProto.internal_static_google_protobuf_Empty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.Empty.class, com.google.protobuf.Empty.Builder.class); - } - - 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 { - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - 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.protobuf.Empty)) { - return super.equals(obj); - } - com.google.protobuf.Empty other = (com.google.protobuf.Empty) obj; - - boolean result = true; - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protobuf.Empty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Empty 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.protobuf.Empty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Empty parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.protobuf.Empty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.Empty parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.protobuf.Empty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.protobuf.Empty parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.protobuf.Empty parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.Empty 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.protobuf.Empty 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.protobuf.Empty} - * - *
-   * A generic empty message that you can re-use to avoid defining duplicated
-   * empty messages in your APIs. A typical example is to use it as the request
-   * or the response type of an API method. For instance:
-   *     service Foo {
-   *       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
-   *     }
-   * The JSON representation for `Empty` is empty JSON object `{}`.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.protobuf.Empty) - com.google.protobuf.EmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.EmptyProto.internal_static_google_protobuf_Empty_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.EmptyProto.internal_static_google_protobuf_Empty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.Empty.class, com.google.protobuf.Empty.Builder.class); - } - - // Construct using com.google.protobuf.Empty.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(); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.protobuf.EmptyProto.internal_static_google_protobuf_Empty_descriptor; - } - - public com.google.protobuf.Empty getDefaultInstanceForType() { - return com.google.protobuf.Empty.getDefaultInstance(); - } - - public com.google.protobuf.Empty build() { - com.google.protobuf.Empty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.protobuf.Empty buildPartial() { - com.google.protobuf.Empty result = new com.google.protobuf.Empty(this); - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.protobuf.Empty) { - return mergeFrom((com.google.protobuf.Empty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.protobuf.Empty other) { - if (other == com.google.protobuf.Empty.getDefaultInstance()) return this; - 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.protobuf.Empty parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.protobuf.Empty) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - 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.protobuf.Empty) - } - - // @@protoc_insertion_point(class_scope:google.protobuf.Empty) - private static final com.google.protobuf.Empty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.protobuf.Empty(); - } - - public static com.google.protobuf.Empty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Empty parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Empty(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.protobuf.Empty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EmptyOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EmptyOrBuilder.java deleted file mode 100644 index 9a3816194fa7..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EmptyOrBuilder.java +++ /dev/null @@ -1,9 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/empty.proto - -package com.google.protobuf; - -public interface EmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.protobuf.Empty) - com.google.protobuf.MessageOrBuilder { -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EmptyProto.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EmptyProto.java deleted file mode 100644 index 4626e2303efd..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EmptyProto.java +++ /dev/null @@ -1,51 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/empty.proto - -package com.google.protobuf; - -public final class EmptyProto { - private EmptyProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_protobuf_Empty_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_protobuf_Empty_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/protobuf/empty.proto\022\017google.pr" + - "otobuf\"\007\n\005EmptyBS\n\023com.google.protobufB\n" + - "EmptyProtoP\001\240\001\001\370\001\001\242\002\003GPB\252\002\036Google.Protob" + - "uf.WellKnownTypes\260\002\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_protobuf_Empty_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_protobuf_Empty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_protobuf_Empty_descriptor, - new java.lang.String[] { }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Enum.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Enum.java deleted file mode 100644 index ef1f6961d53b..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Enum.java +++ /dev/null @@ -1,1719 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/type.proto - -package com.google.protobuf; - -/** - * Protobuf type {@code google.protobuf.Enum} - * - *
- * Enum type definition.
- * 
- */ -public final class Enum extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.protobuf.Enum) - EnumOrBuilder { - // Use Enum.newBuilder() to construct. - private Enum(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Enum() { - name_ = ""; - enumvalue_ = java.util.Collections.emptyList(); - options_ = java.util.Collections.emptyList(); - syntax_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Enum( - 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: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - enumvalue_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - enumvalue_.add(input.readMessage(com.google.protobuf.EnumValue.parser(), extensionRegistry)); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - options_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - options_.add(input.readMessage(com.google.protobuf.Option.parser(), extensionRegistry)); - break; - } - case 34: { - com.google.protobuf.SourceContext.Builder subBuilder = null; - if (sourceContext_ != null) { - subBuilder = sourceContext_.toBuilder(); - } - sourceContext_ = input.readMessage(com.google.protobuf.SourceContext.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sourceContext_); - sourceContext_ = subBuilder.buildPartial(); - } - - break; - } - case 40: { - int rawValue = input.readEnum(); - - syntax_ = rawValue; - 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)) { - enumvalue_ = java.util.Collections.unmodifiableList(enumvalue_); - } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - options_ = java.util.Collections.unmodifiableList(options_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.TypeProto.internal_static_google_protobuf_Enum_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.TypeProto.internal_static_google_protobuf_Enum_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.Enum.class, com.google.protobuf.Enum.Builder.class); - } - - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * optional string name = 1; - * - *
-   * Enum type name.
-   * 
- */ - 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; - * - *
-   * Enum type name.
-   * 
- */ - 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 ENUMVALUE_FIELD_NUMBER = 2; - private java.util.List enumvalue_; - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-   * Enum value definitions.
-   * 
- */ - public java.util.List getEnumvalueList() { - return enumvalue_; - } - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-   * Enum value definitions.
-   * 
- */ - public java.util.List - getEnumvalueOrBuilderList() { - return enumvalue_; - } - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-   * Enum value definitions.
-   * 
- */ - public int getEnumvalueCount() { - return enumvalue_.size(); - } - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-   * Enum value definitions.
-   * 
- */ - public com.google.protobuf.EnumValue getEnumvalue(int index) { - return enumvalue_.get(index); - } - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-   * Enum value definitions.
-   * 
- */ - public com.google.protobuf.EnumValueOrBuilder getEnumvalueOrBuilder( - int index) { - return enumvalue_.get(index); - } - - public static final int OPTIONS_FIELD_NUMBER = 3; - private java.util.List options_; - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Protocol buffer options.
-   * 
- */ - public java.util.List getOptionsList() { - return options_; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Protocol buffer options.
-   * 
- */ - public java.util.List - getOptionsOrBuilderList() { - return options_; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Protocol buffer options.
-   * 
- */ - public int getOptionsCount() { - return options_.size(); - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Protocol buffer options.
-   * 
- */ - public com.google.protobuf.Option getOptions(int index) { - return options_.get(index); - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Protocol buffer options.
-   * 
- */ - public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( - int index) { - return options_.get(index); - } - - public static final int SOURCE_CONTEXT_FIELD_NUMBER = 4; - private com.google.protobuf.SourceContext sourceContext_; - /** - * optional .google.protobuf.SourceContext source_context = 4; - * - *
-   * The source context.
-   * 
- */ - public boolean hasSourceContext() { - return sourceContext_ != null; - } - /** - * optional .google.protobuf.SourceContext source_context = 4; - * - *
-   * The source context.
-   * 
- */ - public com.google.protobuf.SourceContext getSourceContext() { - return sourceContext_ == null ? com.google.protobuf.SourceContext.getDefaultInstance() : sourceContext_; - } - /** - * optional .google.protobuf.SourceContext source_context = 4; - * - *
-   * The source context.
-   * 
- */ - public com.google.protobuf.SourceContextOrBuilder getSourceContextOrBuilder() { - return getSourceContext(); - } - - public static final int SYNTAX_FIELD_NUMBER = 5; - private int syntax_; - /** - * optional .google.protobuf.Syntax syntax = 5; - * - *
-   * The source syntax.
-   * 
- */ - public int getSyntaxValue() { - return syntax_; - } - /** - * optional .google.protobuf.Syntax syntax = 5; - * - *
-   * The source syntax.
-   * 
- */ - public com.google.protobuf.Syntax getSyntax() { - com.google.protobuf.Syntax result = com.google.protobuf.Syntax.valueOf(syntax_); - return result == null ? com.google.protobuf.Syntax.UNRECOGNIZED : result; - } - - 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_); - } - for (int i = 0; i < enumvalue_.size(); i++) { - output.writeMessage(2, enumvalue_.get(i)); - } - for (int i = 0; i < options_.size(); i++) { - output.writeMessage(3, options_.get(i)); - } - if (sourceContext_ != null) { - output.writeMessage(4, getSourceContext()); - } - if (syntax_ != com.google.protobuf.Syntax.SYNTAX_PROTO2.getNumber()) { - output.writeEnum(5, syntax_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - for (int i = 0; i < enumvalue_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, enumvalue_.get(i)); - } - for (int i = 0; i < options_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, options_.get(i)); - } - if (sourceContext_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getSourceContext()); - } - if (syntax_ != com.google.protobuf.Syntax.SYNTAX_PROTO2.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, syntax_); - } - 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.protobuf.Enum)) { - return super.equals(obj); - } - com.google.protobuf.Enum other = (com.google.protobuf.Enum) obj; - - boolean result = true; - result = result && getName() - .equals(other.getName()); - result = result && getEnumvalueList() - .equals(other.getEnumvalueList()); - result = result && getOptionsList() - .equals(other.getOptionsList()); - result = result && (hasSourceContext() == other.hasSourceContext()); - if (hasSourceContext()) { - result = result && getSourceContext() - .equals(other.getSourceContext()); - } - result = result && syntax_ == other.syntax_; - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getEnumvalueCount() > 0) { - hash = (37 * hash) + ENUMVALUE_FIELD_NUMBER; - hash = (53 * hash) + getEnumvalueList().hashCode(); - } - if (getOptionsCount() > 0) { - hash = (37 * hash) + OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + getOptionsList().hashCode(); - } - if (hasSourceContext()) { - hash = (37 * hash) + SOURCE_CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getSourceContext().hashCode(); - } - hash = (37 * hash) + SYNTAX_FIELD_NUMBER; - hash = (53 * hash) + syntax_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protobuf.Enum parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Enum 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.protobuf.Enum parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Enum parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.protobuf.Enum parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.Enum parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.protobuf.Enum parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.protobuf.Enum parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.protobuf.Enum parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.Enum 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.protobuf.Enum 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.protobuf.Enum} - * - *
-   * Enum type definition.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.protobuf.Enum) - com.google.protobuf.EnumOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.TypeProto.internal_static_google_protobuf_Enum_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.TypeProto.internal_static_google_protobuf_Enum_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.Enum.class, com.google.protobuf.Enum.Builder.class); - } - - // Construct using com.google.protobuf.Enum.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getEnumvalueFieldBuilder(); - getOptionsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - if (enumvalueBuilder_ == null) { - enumvalue_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - enumvalueBuilder_.clear(); - } - if (optionsBuilder_ == null) { - options_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - optionsBuilder_.clear(); - } - if (sourceContextBuilder_ == null) { - sourceContext_ = null; - } else { - sourceContext_ = null; - sourceContextBuilder_ = null; - } - syntax_ = 0; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.protobuf.TypeProto.internal_static_google_protobuf_Enum_descriptor; - } - - public com.google.protobuf.Enum getDefaultInstanceForType() { - return com.google.protobuf.Enum.getDefaultInstance(); - } - - public com.google.protobuf.Enum build() { - com.google.protobuf.Enum result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.protobuf.Enum buildPartial() { - com.google.protobuf.Enum result = new com.google.protobuf.Enum(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.name_ = name_; - if (enumvalueBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - enumvalue_ = java.util.Collections.unmodifiableList(enumvalue_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.enumvalue_ = enumvalue_; - } else { - result.enumvalue_ = enumvalueBuilder_.build(); - } - if (optionsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { - options_ = java.util.Collections.unmodifiableList(options_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.options_ = options_; - } else { - result.options_ = optionsBuilder_.build(); - } - if (sourceContextBuilder_ == null) { - result.sourceContext_ = sourceContext_; - } else { - result.sourceContext_ = sourceContextBuilder_.build(); - } - result.syntax_ = syntax_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.protobuf.Enum) { - return mergeFrom((com.google.protobuf.Enum)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.protobuf.Enum other) { - if (other == com.google.protobuf.Enum.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (enumvalueBuilder_ == null) { - if (!other.enumvalue_.isEmpty()) { - if (enumvalue_.isEmpty()) { - enumvalue_ = other.enumvalue_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureEnumvalueIsMutable(); - enumvalue_.addAll(other.enumvalue_); - } - onChanged(); - } - } else { - if (!other.enumvalue_.isEmpty()) { - if (enumvalueBuilder_.isEmpty()) { - enumvalueBuilder_.dispose(); - enumvalueBuilder_ = null; - enumvalue_ = other.enumvalue_; - bitField0_ = (bitField0_ & ~0x00000002); - enumvalueBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getEnumvalueFieldBuilder() : null; - } else { - enumvalueBuilder_.addAllMessages(other.enumvalue_); - } - } - } - if (optionsBuilder_ == null) { - if (!other.options_.isEmpty()) { - if (options_.isEmpty()) { - options_ = other.options_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureOptionsIsMutable(); - options_.addAll(other.options_); - } - onChanged(); - } - } else { - if (!other.options_.isEmpty()) { - if (optionsBuilder_.isEmpty()) { - optionsBuilder_.dispose(); - optionsBuilder_ = null; - options_ = other.options_; - bitField0_ = (bitField0_ & ~0x00000004); - optionsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getOptionsFieldBuilder() : null; - } else { - optionsBuilder_.addAllMessages(other.options_); - } - } - } - if (other.hasSourceContext()) { - mergeSourceContext(other.getSourceContext()); - } - if (other.syntax_ != 0) { - setSyntaxValue(other.getSyntaxValue()); - } - 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.protobuf.Enum parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.protobuf.Enum) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - * - *
-     * Enum type name.
-     * 
- */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string name = 1; - * - *
-     * Enum type name.
-     * 
- */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string name = 1; - * - *
-     * Enum type name.
-     * 
- */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * Enum type name.
-     * 
- */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * Enum type name.
-     * 
- */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.util.List enumvalue_ = - java.util.Collections.emptyList(); - private void ensureEnumvalueIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - enumvalue_ = new java.util.ArrayList(enumvalue_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.EnumValue, com.google.protobuf.EnumValue.Builder, com.google.protobuf.EnumValueOrBuilder> enumvalueBuilder_; - - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-     * Enum value definitions.
-     * 
- */ - public java.util.List getEnumvalueList() { - if (enumvalueBuilder_ == null) { - return java.util.Collections.unmodifiableList(enumvalue_); - } else { - return enumvalueBuilder_.getMessageList(); - } - } - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-     * Enum value definitions.
-     * 
- */ - public int getEnumvalueCount() { - if (enumvalueBuilder_ == null) { - return enumvalue_.size(); - } else { - return enumvalueBuilder_.getCount(); - } - } - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-     * Enum value definitions.
-     * 
- */ - public com.google.protobuf.EnumValue getEnumvalue(int index) { - if (enumvalueBuilder_ == null) { - return enumvalue_.get(index); - } else { - return enumvalueBuilder_.getMessage(index); - } - } - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-     * Enum value definitions.
-     * 
- */ - public Builder setEnumvalue( - int index, com.google.protobuf.EnumValue value) { - if (enumvalueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEnumvalueIsMutable(); - enumvalue_.set(index, value); - onChanged(); - } else { - enumvalueBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-     * Enum value definitions.
-     * 
- */ - public Builder setEnumvalue( - int index, com.google.protobuf.EnumValue.Builder builderForValue) { - if (enumvalueBuilder_ == null) { - ensureEnumvalueIsMutable(); - enumvalue_.set(index, builderForValue.build()); - onChanged(); - } else { - enumvalueBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-     * Enum value definitions.
-     * 
- */ - public Builder addEnumvalue(com.google.protobuf.EnumValue value) { - if (enumvalueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEnumvalueIsMutable(); - enumvalue_.add(value); - onChanged(); - } else { - enumvalueBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-     * Enum value definitions.
-     * 
- */ - public Builder addEnumvalue( - int index, com.google.protobuf.EnumValue value) { - if (enumvalueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEnumvalueIsMutable(); - enumvalue_.add(index, value); - onChanged(); - } else { - enumvalueBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-     * Enum value definitions.
-     * 
- */ - public Builder addEnumvalue( - com.google.protobuf.EnumValue.Builder builderForValue) { - if (enumvalueBuilder_ == null) { - ensureEnumvalueIsMutable(); - enumvalue_.add(builderForValue.build()); - onChanged(); - } else { - enumvalueBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-     * Enum value definitions.
-     * 
- */ - public Builder addEnumvalue( - int index, com.google.protobuf.EnumValue.Builder builderForValue) { - if (enumvalueBuilder_ == null) { - ensureEnumvalueIsMutable(); - enumvalue_.add(index, builderForValue.build()); - onChanged(); - } else { - enumvalueBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-     * Enum value definitions.
-     * 
- */ - public Builder addAllEnumvalue( - java.lang.Iterable values) { - if (enumvalueBuilder_ == null) { - ensureEnumvalueIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, enumvalue_); - onChanged(); - } else { - enumvalueBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-     * Enum value definitions.
-     * 
- */ - public Builder clearEnumvalue() { - if (enumvalueBuilder_ == null) { - enumvalue_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - enumvalueBuilder_.clear(); - } - return this; - } - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-     * Enum value definitions.
-     * 
- */ - public Builder removeEnumvalue(int index) { - if (enumvalueBuilder_ == null) { - ensureEnumvalueIsMutable(); - enumvalue_.remove(index); - onChanged(); - } else { - enumvalueBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-     * Enum value definitions.
-     * 
- */ - public com.google.protobuf.EnumValue.Builder getEnumvalueBuilder( - int index) { - return getEnumvalueFieldBuilder().getBuilder(index); - } - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-     * Enum value definitions.
-     * 
- */ - public com.google.protobuf.EnumValueOrBuilder getEnumvalueOrBuilder( - int index) { - if (enumvalueBuilder_ == null) { - return enumvalue_.get(index); } else { - return enumvalueBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-     * Enum value definitions.
-     * 
- */ - public java.util.List - getEnumvalueOrBuilderList() { - if (enumvalueBuilder_ != null) { - return enumvalueBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(enumvalue_); - } - } - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-     * Enum value definitions.
-     * 
- */ - public com.google.protobuf.EnumValue.Builder addEnumvalueBuilder() { - return getEnumvalueFieldBuilder().addBuilder( - com.google.protobuf.EnumValue.getDefaultInstance()); - } - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-     * Enum value definitions.
-     * 
- */ - public com.google.protobuf.EnumValue.Builder addEnumvalueBuilder( - int index) { - return getEnumvalueFieldBuilder().addBuilder( - index, com.google.protobuf.EnumValue.getDefaultInstance()); - } - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-     * Enum value definitions.
-     * 
- */ - public java.util.List - getEnumvalueBuilderList() { - return getEnumvalueFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.EnumValue, com.google.protobuf.EnumValue.Builder, com.google.protobuf.EnumValueOrBuilder> - getEnumvalueFieldBuilder() { - if (enumvalueBuilder_ == null) { - enumvalueBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.EnumValue, com.google.protobuf.EnumValue.Builder, com.google.protobuf.EnumValueOrBuilder>( - enumvalue_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - enumvalue_ = null; - } - return enumvalueBuilder_; - } - - private java.util.List options_ = - java.util.Collections.emptyList(); - private void ensureOptionsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - options_ = new java.util.ArrayList(options_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> optionsBuilder_; - - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public java.util.List getOptionsList() { - if (optionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(options_); - } else { - return optionsBuilder_.getMessageList(); - } - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public int getOptionsCount() { - if (optionsBuilder_ == null) { - return options_.size(); - } else { - return optionsBuilder_.getCount(); - } - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public com.google.protobuf.Option getOptions(int index) { - if (optionsBuilder_ == null) { - return options_.get(index); - } else { - return optionsBuilder_.getMessage(index); - } - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public Builder setOptions( - int index, com.google.protobuf.Option value) { - if (optionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOptionsIsMutable(); - options_.set(index, value); - onChanged(); - } else { - optionsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public Builder setOptions( - int index, com.google.protobuf.Option.Builder builderForValue) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - options_.set(index, builderForValue.build()); - onChanged(); - } else { - optionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public Builder addOptions(com.google.protobuf.Option value) { - if (optionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOptionsIsMutable(); - options_.add(value); - onChanged(); - } else { - optionsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public Builder addOptions( - int index, com.google.protobuf.Option value) { - if (optionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOptionsIsMutable(); - options_.add(index, value); - onChanged(); - } else { - optionsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public Builder addOptions( - com.google.protobuf.Option.Builder builderForValue) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - options_.add(builderForValue.build()); - onChanged(); - } else { - optionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public Builder addOptions( - int index, com.google.protobuf.Option.Builder builderForValue) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - options_.add(index, builderForValue.build()); - onChanged(); - } else { - optionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public Builder addAllOptions( - java.lang.Iterable values) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, options_); - onChanged(); - } else { - optionsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public Builder clearOptions() { - if (optionsBuilder_ == null) { - options_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - optionsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public Builder removeOptions(int index) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - options_.remove(index); - onChanged(); - } else { - optionsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public com.google.protobuf.Option.Builder getOptionsBuilder( - int index) { - return getOptionsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( - int index) { - if (optionsBuilder_ == null) { - return options_.get(index); } else { - return optionsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public java.util.List - getOptionsOrBuilderList() { - if (optionsBuilder_ != null) { - return optionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(options_); - } - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public com.google.protobuf.Option.Builder addOptionsBuilder() { - return getOptionsFieldBuilder().addBuilder( - com.google.protobuf.Option.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public com.google.protobuf.Option.Builder addOptionsBuilder( - int index) { - return getOptionsFieldBuilder().addBuilder( - index, com.google.protobuf.Option.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public java.util.List - getOptionsBuilderList() { - return getOptionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> - getOptionsFieldBuilder() { - if (optionsBuilder_ == null) { - optionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder>( - options_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); - options_ = null; - } - return optionsBuilder_; - } - - private com.google.protobuf.SourceContext sourceContext_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.SourceContext, com.google.protobuf.SourceContext.Builder, com.google.protobuf.SourceContextOrBuilder> sourceContextBuilder_; - /** - * optional .google.protobuf.SourceContext source_context = 4; - * - *
-     * The source context.
-     * 
- */ - public boolean hasSourceContext() { - return sourceContextBuilder_ != null || sourceContext_ != null; - } - /** - * optional .google.protobuf.SourceContext source_context = 4; - * - *
-     * The source context.
-     * 
- */ - public com.google.protobuf.SourceContext getSourceContext() { - if (sourceContextBuilder_ == null) { - return sourceContext_ == null ? com.google.protobuf.SourceContext.getDefaultInstance() : sourceContext_; - } else { - return sourceContextBuilder_.getMessage(); - } - } - /** - * optional .google.protobuf.SourceContext source_context = 4; - * - *
-     * The source context.
-     * 
- */ - public Builder setSourceContext(com.google.protobuf.SourceContext value) { - if (sourceContextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sourceContext_ = value; - onChanged(); - } else { - sourceContextBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.protobuf.SourceContext source_context = 4; - * - *
-     * The source context.
-     * 
- */ - public Builder setSourceContext( - com.google.protobuf.SourceContext.Builder builderForValue) { - if (sourceContextBuilder_ == null) { - sourceContext_ = builderForValue.build(); - onChanged(); - } else { - sourceContextBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.protobuf.SourceContext source_context = 4; - * - *
-     * The source context.
-     * 
- */ - public Builder mergeSourceContext(com.google.protobuf.SourceContext value) { - if (sourceContextBuilder_ == null) { - if (sourceContext_ != null) { - sourceContext_ = - com.google.protobuf.SourceContext.newBuilder(sourceContext_).mergeFrom(value).buildPartial(); - } else { - sourceContext_ = value; - } - onChanged(); - } else { - sourceContextBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.protobuf.SourceContext source_context = 4; - * - *
-     * The source context.
-     * 
- */ - public Builder clearSourceContext() { - if (sourceContextBuilder_ == null) { - sourceContext_ = null; - onChanged(); - } else { - sourceContext_ = null; - sourceContextBuilder_ = null; - } - - return this; - } - /** - * optional .google.protobuf.SourceContext source_context = 4; - * - *
-     * The source context.
-     * 
- */ - public com.google.protobuf.SourceContext.Builder getSourceContextBuilder() { - - onChanged(); - return getSourceContextFieldBuilder().getBuilder(); - } - /** - * optional .google.protobuf.SourceContext source_context = 4; - * - *
-     * The source context.
-     * 
- */ - public com.google.protobuf.SourceContextOrBuilder getSourceContextOrBuilder() { - if (sourceContextBuilder_ != null) { - return sourceContextBuilder_.getMessageOrBuilder(); - } else { - return sourceContext_ == null ? - com.google.protobuf.SourceContext.getDefaultInstance() : sourceContext_; - } - } - /** - * optional .google.protobuf.SourceContext source_context = 4; - * - *
-     * The source context.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.SourceContext, com.google.protobuf.SourceContext.Builder, com.google.protobuf.SourceContextOrBuilder> - getSourceContextFieldBuilder() { - if (sourceContextBuilder_ == null) { - sourceContextBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.SourceContext, com.google.protobuf.SourceContext.Builder, com.google.protobuf.SourceContextOrBuilder>( - getSourceContext(), - getParentForChildren(), - isClean()); - sourceContext_ = null; - } - return sourceContextBuilder_; - } - - private int syntax_ = 0; - /** - * optional .google.protobuf.Syntax syntax = 5; - * - *
-     * The source syntax.
-     * 
- */ - public int getSyntaxValue() { - return syntax_; - } - /** - * optional .google.protobuf.Syntax syntax = 5; - * - *
-     * The source syntax.
-     * 
- */ - public Builder setSyntaxValue(int value) { - syntax_ = value; - onChanged(); - return this; - } - /** - * optional .google.protobuf.Syntax syntax = 5; - * - *
-     * The source syntax.
-     * 
- */ - public com.google.protobuf.Syntax getSyntax() { - com.google.protobuf.Syntax result = com.google.protobuf.Syntax.valueOf(syntax_); - return result == null ? com.google.protobuf.Syntax.UNRECOGNIZED : result; - } - /** - * optional .google.protobuf.Syntax syntax = 5; - * - *
-     * The source syntax.
-     * 
- */ - public Builder setSyntax(com.google.protobuf.Syntax value) { - if (value == null) { - throw new NullPointerException(); - } - - syntax_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .google.protobuf.Syntax syntax = 5; - * - *
-     * The source syntax.
-     * 
- */ - public Builder clearSyntax() { - - syntax_ = 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.protobuf.Enum) - } - - // @@protoc_insertion_point(class_scope:google.protobuf.Enum) - private static final com.google.protobuf.Enum DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.protobuf.Enum(); - } - - public static com.google.protobuf.Enum getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Enum parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Enum(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.protobuf.Enum getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EnumOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EnumOrBuilder.java deleted file mode 100644 index b5e2686e6758..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EnumOrBuilder.java +++ /dev/null @@ -1,157 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/type.proto - -package com.google.protobuf; - -public interface EnumOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.protobuf.Enum) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string name = 1; - * - *
-   * Enum type name.
-   * 
- */ - java.lang.String getName(); - /** - * optional string name = 1; - * - *
-   * Enum type name.
-   * 
- */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-   * Enum value definitions.
-   * 
- */ - java.util.List - getEnumvalueList(); - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-   * Enum value definitions.
-   * 
- */ - com.google.protobuf.EnumValue getEnumvalue(int index); - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-   * Enum value definitions.
-   * 
- */ - int getEnumvalueCount(); - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-   * Enum value definitions.
-   * 
- */ - java.util.List - getEnumvalueOrBuilderList(); - /** - * repeated .google.protobuf.EnumValue enumvalue = 2; - * - *
-   * Enum value definitions.
-   * 
- */ - com.google.protobuf.EnumValueOrBuilder getEnumvalueOrBuilder( - int index); - - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Protocol buffer options.
-   * 
- */ - java.util.List - getOptionsList(); - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Protocol buffer options.
-   * 
- */ - com.google.protobuf.Option getOptions(int index); - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Protocol buffer options.
-   * 
- */ - int getOptionsCount(); - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Protocol buffer options.
-   * 
- */ - java.util.List - getOptionsOrBuilderList(); - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Protocol buffer options.
-   * 
- */ - com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( - int index); - - /** - * optional .google.protobuf.SourceContext source_context = 4; - * - *
-   * The source context.
-   * 
- */ - boolean hasSourceContext(); - /** - * optional .google.protobuf.SourceContext source_context = 4; - * - *
-   * The source context.
-   * 
- */ - com.google.protobuf.SourceContext getSourceContext(); - /** - * optional .google.protobuf.SourceContext source_context = 4; - * - *
-   * The source context.
-   * 
- */ - com.google.protobuf.SourceContextOrBuilder getSourceContextOrBuilder(); - - /** - * optional .google.protobuf.Syntax syntax = 5; - * - *
-   * The source syntax.
-   * 
- */ - int getSyntaxValue(); - /** - * optional .google.protobuf.Syntax syntax = 5; - * - *
-   * The source syntax.
-   * 
- */ - com.google.protobuf.Syntax getSyntax(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EnumValue.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EnumValue.java deleted file mode 100644 index 30403d2ad07c..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EnumValue.java +++ /dev/null @@ -1,1019 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/type.proto - -package com.google.protobuf; - -/** - * Protobuf type {@code google.protobuf.EnumValue} - * - *
- * Enum value definition.
- * 
- */ -public final class EnumValue extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.protobuf.EnumValue) - EnumValueOrBuilder { - // Use EnumValue.newBuilder() to construct. - private EnumValue(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EnumValue() { - name_ = ""; - number_ = 0; - options_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private EnumValue( - 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 16: { - - number_ = input.readInt32(); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - options_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - options_.add(input.readMessage(com.google.protobuf.Option.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)) { - options_ = java.util.Collections.unmodifiableList(options_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.TypeProto.internal_static_google_protobuf_EnumValue_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.TypeProto.internal_static_google_protobuf_EnumValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.EnumValue.class, com.google.protobuf.EnumValue.Builder.class); - } - - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * optional string name = 1; - * - *
-   * Enum value name.
-   * 
- */ - 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; - * - *
-   * Enum value name.
-   * 
- */ - 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 NUMBER_FIELD_NUMBER = 2; - private int number_; - /** - * optional int32 number = 2; - * - *
-   * Enum value number.
-   * 
- */ - public int getNumber() { - return number_; - } - - public static final int OPTIONS_FIELD_NUMBER = 3; - private java.util.List options_; - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Protocol buffer options.
-   * 
- */ - public java.util.List getOptionsList() { - return options_; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Protocol buffer options.
-   * 
- */ - public java.util.List - getOptionsOrBuilderList() { - return options_; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Protocol buffer options.
-   * 
- */ - public int getOptionsCount() { - return options_.size(); - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Protocol buffer options.
-   * 
- */ - public com.google.protobuf.Option getOptions(int index) { - return options_.get(index); - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Protocol buffer options.
-   * 
- */ - public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( - int index) { - return options_.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 (number_ != 0) { - output.writeInt32(2, number_); - } - for (int i = 0; i < options_.size(); i++) { - output.writeMessage(3, options_.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 (number_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, number_); - } - for (int i = 0; i < options_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, options_.get(i)); - } - 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.protobuf.EnumValue)) { - return super.equals(obj); - } - com.google.protobuf.EnumValue other = (com.google.protobuf.EnumValue) obj; - - boolean result = true; - result = result && getName() - .equals(other.getName()); - result = result && (getNumber() - == other.getNumber()); - result = result && getOptionsList() - .equals(other.getOptionsList()); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + NUMBER_FIELD_NUMBER; - hash = (53 * hash) + getNumber(); - if (getOptionsCount() > 0) { - hash = (37 * hash) + OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + getOptionsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protobuf.EnumValue parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.EnumValue 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.protobuf.EnumValue parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.EnumValue parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.protobuf.EnumValue parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.EnumValue parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.protobuf.EnumValue parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.protobuf.EnumValue parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.protobuf.EnumValue parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.EnumValue 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.protobuf.EnumValue 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.protobuf.EnumValue} - * - *
-   * Enum value definition.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.protobuf.EnumValue) - com.google.protobuf.EnumValueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.TypeProto.internal_static_google_protobuf_EnumValue_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.TypeProto.internal_static_google_protobuf_EnumValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.EnumValue.class, com.google.protobuf.EnumValue.Builder.class); - } - - // Construct using com.google.protobuf.EnumValue.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getOptionsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - number_ = 0; - - if (optionsBuilder_ == null) { - options_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - optionsBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.protobuf.TypeProto.internal_static_google_protobuf_EnumValue_descriptor; - } - - public com.google.protobuf.EnumValue getDefaultInstanceForType() { - return com.google.protobuf.EnumValue.getDefaultInstance(); - } - - public com.google.protobuf.EnumValue build() { - com.google.protobuf.EnumValue result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.protobuf.EnumValue buildPartial() { - com.google.protobuf.EnumValue result = new com.google.protobuf.EnumValue(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.name_ = name_; - result.number_ = number_; - if (optionsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { - options_ = java.util.Collections.unmodifiableList(options_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.options_ = options_; - } else { - result.options_ = optionsBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.protobuf.EnumValue) { - return mergeFrom((com.google.protobuf.EnumValue)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.protobuf.EnumValue other) { - if (other == com.google.protobuf.EnumValue.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.getNumber() != 0) { - setNumber(other.getNumber()); - } - if (optionsBuilder_ == null) { - if (!other.options_.isEmpty()) { - if (options_.isEmpty()) { - options_ = other.options_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureOptionsIsMutable(); - options_.addAll(other.options_); - } - onChanged(); - } - } else { - if (!other.options_.isEmpty()) { - if (optionsBuilder_.isEmpty()) { - optionsBuilder_.dispose(); - optionsBuilder_ = null; - options_ = other.options_; - bitField0_ = (bitField0_ & ~0x00000004); - optionsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getOptionsFieldBuilder() : null; - } else { - optionsBuilder_.addAllMessages(other.options_); - } - } - } - 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.protobuf.EnumValue parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.protobuf.EnumValue) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - * - *
-     * Enum value name.
-     * 
- */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string name = 1; - * - *
-     * Enum value name.
-     * 
- */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string name = 1; - * - *
-     * Enum value name.
-     * 
- */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * Enum value name.
-     * 
- */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * Enum value name.
-     * 
- */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private int number_ ; - /** - * optional int32 number = 2; - * - *
-     * Enum value number.
-     * 
- */ - public int getNumber() { - return number_; - } - /** - * optional int32 number = 2; - * - *
-     * Enum value number.
-     * 
- */ - public Builder setNumber(int value) { - - number_ = value; - onChanged(); - return this; - } - /** - * optional int32 number = 2; - * - *
-     * Enum value number.
-     * 
- */ - public Builder clearNumber() { - - number_ = 0; - onChanged(); - return this; - } - - private java.util.List options_ = - java.util.Collections.emptyList(); - private void ensureOptionsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - options_ = new java.util.ArrayList(options_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> optionsBuilder_; - - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public java.util.List getOptionsList() { - if (optionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(options_); - } else { - return optionsBuilder_.getMessageList(); - } - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public int getOptionsCount() { - if (optionsBuilder_ == null) { - return options_.size(); - } else { - return optionsBuilder_.getCount(); - } - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public com.google.protobuf.Option getOptions(int index) { - if (optionsBuilder_ == null) { - return options_.get(index); - } else { - return optionsBuilder_.getMessage(index); - } - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public Builder setOptions( - int index, com.google.protobuf.Option value) { - if (optionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOptionsIsMutable(); - options_.set(index, value); - onChanged(); - } else { - optionsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public Builder setOptions( - int index, com.google.protobuf.Option.Builder builderForValue) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - options_.set(index, builderForValue.build()); - onChanged(); - } else { - optionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public Builder addOptions(com.google.protobuf.Option value) { - if (optionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOptionsIsMutable(); - options_.add(value); - onChanged(); - } else { - optionsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public Builder addOptions( - int index, com.google.protobuf.Option value) { - if (optionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOptionsIsMutable(); - options_.add(index, value); - onChanged(); - } else { - optionsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public Builder addOptions( - com.google.protobuf.Option.Builder builderForValue) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - options_.add(builderForValue.build()); - onChanged(); - } else { - optionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public Builder addOptions( - int index, com.google.protobuf.Option.Builder builderForValue) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - options_.add(index, builderForValue.build()); - onChanged(); - } else { - optionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public Builder addAllOptions( - java.lang.Iterable values) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, options_); - onChanged(); - } else { - optionsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public Builder clearOptions() { - if (optionsBuilder_ == null) { - options_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - optionsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public Builder removeOptions(int index) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - options_.remove(index); - onChanged(); - } else { - optionsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public com.google.protobuf.Option.Builder getOptionsBuilder( - int index) { - return getOptionsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( - int index) { - if (optionsBuilder_ == null) { - return options_.get(index); } else { - return optionsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public java.util.List - getOptionsOrBuilderList() { - if (optionsBuilder_ != null) { - return optionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(options_); - } - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public com.google.protobuf.Option.Builder addOptionsBuilder() { - return getOptionsFieldBuilder().addBuilder( - com.google.protobuf.Option.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public com.google.protobuf.Option.Builder addOptionsBuilder( - int index) { - return getOptionsFieldBuilder().addBuilder( - index, com.google.protobuf.Option.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Option options = 3; - * - *
-     * Protocol buffer options.
-     * 
- */ - public java.util.List - getOptionsBuilderList() { - return getOptionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> - getOptionsFieldBuilder() { - if (optionsBuilder_ == null) { - optionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder>( - options_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); - options_ = null; - } - return optionsBuilder_; - } - 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.protobuf.EnumValue) - } - - // @@protoc_insertion_point(class_scope:google.protobuf.EnumValue) - private static final com.google.protobuf.EnumValue DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.protobuf.EnumValue(); - } - - public static com.google.protobuf.EnumValue getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public EnumValue parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new EnumValue(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.protobuf.EnumValue getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EnumValueOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EnumValueOrBuilder.java deleted file mode 100644 index 580ca1116e27..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EnumValueOrBuilder.java +++ /dev/null @@ -1,80 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/type.proto - -package com.google.protobuf; - -public interface EnumValueOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.protobuf.EnumValue) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string name = 1; - * - *
-   * Enum value name.
-   * 
- */ - java.lang.String getName(); - /** - * optional string name = 1; - * - *
-   * Enum value name.
-   * 
- */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * optional int32 number = 2; - * - *
-   * Enum value number.
-   * 
- */ - int getNumber(); - - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Protocol buffer options.
-   * 
- */ - java.util.List - getOptionsList(); - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Protocol buffer options.
-   * 
- */ - com.google.protobuf.Option getOptions(int index); - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Protocol buffer options.
-   * 
- */ - int getOptionsCount(); - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Protocol buffer options.
-   * 
- */ - java.util.List - getOptionsOrBuilderList(); - /** - * repeated .google.protobuf.Option options = 3; - * - *
-   * Protocol buffer options.
-   * 
- */ - com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( - int index); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Field.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Field.java deleted file mode 100644 index ce6e5f426ae9..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Field.java +++ /dev/null @@ -1,2413 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/type.proto - -package com.google.protobuf; - -/** - * Protobuf type {@code google.protobuf.Field} - * - *
- * A single field of a message type.
- * 
- */ -public final class Field extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.protobuf.Field) - FieldOrBuilder { - // Use Field.newBuilder() to construct. - private Field(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Field() { - kind_ = 0; - cardinality_ = 0; - number_ = 0; - name_ = ""; - typeUrl_ = ""; - oneofIndex_ = 0; - packed_ = false; - options_ = java.util.Collections.emptyList(); - jsonName_ = ""; - defaultValue_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Field( - 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: { - int rawValue = input.readEnum(); - - kind_ = rawValue; - break; - } - case 16: { - int rawValue = input.readEnum(); - - cardinality_ = rawValue; - break; - } - case 24: { - - number_ = input.readInt32(); - break; - } - case 34: { - String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 50: { - String s = input.readStringRequireUtf8(); - - typeUrl_ = s; - break; - } - case 56: { - - oneofIndex_ = input.readInt32(); - break; - } - case 64: { - - packed_ = input.readBool(); - break; - } - case 74: { - if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { - options_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000080; - } - options_.add(input.readMessage(com.google.protobuf.Option.parser(), extensionRegistry)); - break; - } - case 82: { - String s = input.readStringRequireUtf8(); - - jsonName_ = s; - break; - } - case 90: { - String s = input.readStringRequireUtf8(); - - defaultValue_ = 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_ & 0x00000080) == 0x00000080)) { - options_ = java.util.Collections.unmodifiableList(options_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.TypeProto.internal_static_google_protobuf_Field_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.TypeProto.internal_static_google_protobuf_Field_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.Field.class, com.google.protobuf.Field.Builder.class); - } - - /** - * Protobuf enum {@code google.protobuf.Field.Kind} - * - *
-   * Basic field types.
-   * 
- */ - public enum Kind - implements com.google.protobuf.ProtocolMessageEnum { - /** - * TYPE_UNKNOWN = 0; - * - *
-     * Field type unknown.
-     * 
- */ - TYPE_UNKNOWN(0, 0), - /** - * TYPE_DOUBLE = 1; - * - *
-     * Field type double.
-     * 
- */ - TYPE_DOUBLE(1, 1), - /** - * TYPE_FLOAT = 2; - * - *
-     * Field type float.
-     * 
- */ - TYPE_FLOAT(2, 2), - /** - * TYPE_INT64 = 3; - * - *
-     * Field type int64.
-     * 
- */ - TYPE_INT64(3, 3), - /** - * TYPE_UINT64 = 4; - * - *
-     * Field type uint64.
-     * 
- */ - TYPE_UINT64(4, 4), - /** - * TYPE_INT32 = 5; - * - *
-     * Field type int32.
-     * 
- */ - TYPE_INT32(5, 5), - /** - * TYPE_FIXED64 = 6; - * - *
-     * Field type fixed64.
-     * 
- */ - TYPE_FIXED64(6, 6), - /** - * TYPE_FIXED32 = 7; - * - *
-     * Field type fixed32.
-     * 
- */ - TYPE_FIXED32(7, 7), - /** - * TYPE_BOOL = 8; - * - *
-     * Field type bool.
-     * 
- */ - TYPE_BOOL(8, 8), - /** - * TYPE_STRING = 9; - * - *
-     * Field type string.
-     * 
- */ - TYPE_STRING(9, 9), - /** - * TYPE_GROUP = 10; - * - *
-     * Field type group. Proto2 syntax only, and deprecated.
-     * 
- */ - TYPE_GROUP(10, 10), - /** - * TYPE_MESSAGE = 11; - * - *
-     * Field type message.
-     * 
- */ - TYPE_MESSAGE(11, 11), - /** - * TYPE_BYTES = 12; - * - *
-     * Field type bytes.
-     * 
- */ - TYPE_BYTES(12, 12), - /** - * TYPE_UINT32 = 13; - * - *
-     * Field type uint32.
-     * 
- */ - TYPE_UINT32(13, 13), - /** - * TYPE_ENUM = 14; - * - *
-     * Field type enum.
-     * 
- */ - TYPE_ENUM(14, 14), - /** - * TYPE_SFIXED32 = 15; - * - *
-     * Field type sfixed32.
-     * 
- */ - TYPE_SFIXED32(15, 15), - /** - * TYPE_SFIXED64 = 16; - * - *
-     * Field type sfixed64.
-     * 
- */ - TYPE_SFIXED64(16, 16), - /** - * TYPE_SINT32 = 17; - * - *
-     * Field type sint32.
-     * 
- */ - TYPE_SINT32(17, 17), - /** - * TYPE_SINT64 = 18; - * - *
-     * Field type sint64.
-     * 
- */ - TYPE_SINT64(18, 18), - UNRECOGNIZED(-1, -1), - ; - - /** - * TYPE_UNKNOWN = 0; - * - *
-     * Field type unknown.
-     * 
- */ - public static final int TYPE_UNKNOWN_VALUE = 0; - /** - * TYPE_DOUBLE = 1; - * - *
-     * Field type double.
-     * 
- */ - public static final int TYPE_DOUBLE_VALUE = 1; - /** - * TYPE_FLOAT = 2; - * - *
-     * Field type float.
-     * 
- */ - public static final int TYPE_FLOAT_VALUE = 2; - /** - * TYPE_INT64 = 3; - * - *
-     * Field type int64.
-     * 
- */ - public static final int TYPE_INT64_VALUE = 3; - /** - * TYPE_UINT64 = 4; - * - *
-     * Field type uint64.
-     * 
- */ - public static final int TYPE_UINT64_VALUE = 4; - /** - * TYPE_INT32 = 5; - * - *
-     * Field type int32.
-     * 
- */ - public static final int TYPE_INT32_VALUE = 5; - /** - * TYPE_FIXED64 = 6; - * - *
-     * Field type fixed64.
-     * 
- */ - public static final int TYPE_FIXED64_VALUE = 6; - /** - * TYPE_FIXED32 = 7; - * - *
-     * Field type fixed32.
-     * 
- */ - public static final int TYPE_FIXED32_VALUE = 7; - /** - * TYPE_BOOL = 8; - * - *
-     * Field type bool.
-     * 
- */ - public static final int TYPE_BOOL_VALUE = 8; - /** - * TYPE_STRING = 9; - * - *
-     * Field type string.
-     * 
- */ - public static final int TYPE_STRING_VALUE = 9; - /** - * TYPE_GROUP = 10; - * - *
-     * Field type group. Proto2 syntax only, and deprecated.
-     * 
- */ - public static final int TYPE_GROUP_VALUE = 10; - /** - * TYPE_MESSAGE = 11; - * - *
-     * Field type message.
-     * 
- */ - public static final int TYPE_MESSAGE_VALUE = 11; - /** - * TYPE_BYTES = 12; - * - *
-     * Field type bytes.
-     * 
- */ - public static final int TYPE_BYTES_VALUE = 12; - /** - * TYPE_UINT32 = 13; - * - *
-     * Field type uint32.
-     * 
- */ - public static final int TYPE_UINT32_VALUE = 13; - /** - * TYPE_ENUM = 14; - * - *
-     * Field type enum.
-     * 
- */ - public static final int TYPE_ENUM_VALUE = 14; - /** - * TYPE_SFIXED32 = 15; - * - *
-     * Field type sfixed32.
-     * 
- */ - public static final int TYPE_SFIXED32_VALUE = 15; - /** - * TYPE_SFIXED64 = 16; - * - *
-     * Field type sfixed64.
-     * 
- */ - public static final int TYPE_SFIXED64_VALUE = 16; - /** - * TYPE_SINT32 = 17; - * - *
-     * Field type sint32.
-     * 
- */ - public static final int TYPE_SINT32_VALUE = 17; - /** - * TYPE_SINT64 = 18; - * - *
-     * Field type sint64.
-     * 
- */ - public static final int TYPE_SINT64_VALUE = 18; - - - 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 Kind valueOf(int value) { - switch (value) { - case 0: return TYPE_UNKNOWN; - case 1: return TYPE_DOUBLE; - case 2: return TYPE_FLOAT; - case 3: return TYPE_INT64; - case 4: return TYPE_UINT64; - case 5: return TYPE_INT32; - case 6: return TYPE_FIXED64; - case 7: return TYPE_FIXED32; - case 8: return TYPE_BOOL; - case 9: return TYPE_STRING; - case 10: return TYPE_GROUP; - case 11: return TYPE_MESSAGE; - case 12: return TYPE_BYTES; - case 13: return TYPE_UINT32; - case 14: return TYPE_ENUM; - case 15: return TYPE_SFIXED32; - case 16: return TYPE_SFIXED64; - case 17: return TYPE_SINT32; - case 18: return TYPE_SINT64; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Kind> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Kind findValueByNumber(int number) { - return Kind.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.protobuf.Field.getDescriptor().getEnumTypes().get(0); - } - - private static final Kind[] VALUES = values(); - - public static Kind 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 Kind(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.protobuf.Field.Kind) - } - - /** - * Protobuf enum {@code google.protobuf.Field.Cardinality} - * - *
-   * Whether a field is optional, required, or repeated.
-   * 
- */ - public enum Cardinality - implements com.google.protobuf.ProtocolMessageEnum { - /** - * CARDINALITY_UNKNOWN = 0; - * - *
-     * For fields with unknown cardinality.
-     * 
- */ - CARDINALITY_UNKNOWN(0, 0), - /** - * CARDINALITY_OPTIONAL = 1; - * - *
-     * For optional fields.
-     * 
- */ - CARDINALITY_OPTIONAL(1, 1), - /** - * CARDINALITY_REQUIRED = 2; - * - *
-     * For required fields. Proto2 syntax only.
-     * 
- */ - CARDINALITY_REQUIRED(2, 2), - /** - * CARDINALITY_REPEATED = 3; - * - *
-     * For repeated fields.
-     * 
- */ - CARDINALITY_REPEATED(3, 3), - UNRECOGNIZED(-1, -1), - ; - - /** - * CARDINALITY_UNKNOWN = 0; - * - *
-     * For fields with unknown cardinality.
-     * 
- */ - public static final int CARDINALITY_UNKNOWN_VALUE = 0; - /** - * CARDINALITY_OPTIONAL = 1; - * - *
-     * For optional fields.
-     * 
- */ - public static final int CARDINALITY_OPTIONAL_VALUE = 1; - /** - * CARDINALITY_REQUIRED = 2; - * - *
-     * For required fields. Proto2 syntax only.
-     * 
- */ - public static final int CARDINALITY_REQUIRED_VALUE = 2; - /** - * CARDINALITY_REPEATED = 3; - * - *
-     * For repeated fields.
-     * 
- */ - public static final int CARDINALITY_REPEATED_VALUE = 3; - - - 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 Cardinality valueOf(int value) { - switch (value) { - case 0: return CARDINALITY_UNKNOWN; - case 1: return CARDINALITY_OPTIONAL; - case 2: return CARDINALITY_REQUIRED; - case 3: return CARDINALITY_REPEATED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Cardinality> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Cardinality findValueByNumber(int number) { - return Cardinality.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.protobuf.Field.getDescriptor().getEnumTypes().get(1); - } - - private static final Cardinality[] VALUES = values(); - - public static Cardinality 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 Cardinality(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.protobuf.Field.Cardinality) - } - - private int bitField0_; - public static final int KIND_FIELD_NUMBER = 1; - private int kind_; - /** - * optional .google.protobuf.Field.Kind kind = 1; - * - *
-   * The field type.
-   * 
- */ - public int getKindValue() { - return kind_; - } - /** - * optional .google.protobuf.Field.Kind kind = 1; - * - *
-   * The field type.
-   * 
- */ - public com.google.protobuf.Field.Kind getKind() { - com.google.protobuf.Field.Kind result = com.google.protobuf.Field.Kind.valueOf(kind_); - return result == null ? com.google.protobuf.Field.Kind.UNRECOGNIZED : result; - } - - public static final int CARDINALITY_FIELD_NUMBER = 2; - private int cardinality_; - /** - * optional .google.protobuf.Field.Cardinality cardinality = 2; - * - *
-   * The field cardinality.
-   * 
- */ - public int getCardinalityValue() { - return cardinality_; - } - /** - * optional .google.protobuf.Field.Cardinality cardinality = 2; - * - *
-   * The field cardinality.
-   * 
- */ - public com.google.protobuf.Field.Cardinality getCardinality() { - com.google.protobuf.Field.Cardinality result = com.google.protobuf.Field.Cardinality.valueOf(cardinality_); - return result == null ? com.google.protobuf.Field.Cardinality.UNRECOGNIZED : result; - } - - public static final int NUMBER_FIELD_NUMBER = 3; - private int number_; - /** - * optional int32 number = 3; - * - *
-   * The field number.
-   * 
- */ - public int getNumber() { - return number_; - } - - public static final int NAME_FIELD_NUMBER = 4; - private volatile java.lang.Object name_; - /** - * optional string name = 4; - * - *
-   * The field name.
-   * 
- */ - 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 field name.
-   * 
- */ - 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 TYPE_URL_FIELD_NUMBER = 6; - private volatile java.lang.Object typeUrl_; - /** - * optional string type_url = 6; - * - *
-   * The field type URL, without the scheme, for message or enumeration
-   * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
-   * 
- */ - public java.lang.String getTypeUrl() { - java.lang.Object ref = typeUrl_; - 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(); - typeUrl_ = s; - return s; - } - } - /** - * optional string type_url = 6; - * - *
-   * The field type URL, without the scheme, for message or enumeration
-   * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
-   * 
- */ - public com.google.protobuf.ByteString - getTypeUrlBytes() { - java.lang.Object ref = typeUrl_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - typeUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ONEOF_INDEX_FIELD_NUMBER = 7; - private int oneofIndex_; - /** - * optional int32 oneof_index = 7; - * - *
-   * The index of the field type in `Type.oneofs`, for message or enumeration
-   * types. The first type has index 1; zero means the type is not in the list.
-   * 
- */ - public int getOneofIndex() { - return oneofIndex_; - } - - public static final int PACKED_FIELD_NUMBER = 8; - private boolean packed_; - /** - * optional bool packed = 8; - * - *
-   * Whether to use alternative packed wire representation.
-   * 
- */ - public boolean getPacked() { - return packed_; - } - - public static final int OPTIONS_FIELD_NUMBER = 9; - private java.util.List options_; - /** - * repeated .google.protobuf.Option options = 9; - * - *
-   * The protocol buffer options.
-   * 
- */ - public java.util.List getOptionsList() { - return options_; - } - /** - * repeated .google.protobuf.Option options = 9; - * - *
-   * The protocol buffer options.
-   * 
- */ - public java.util.List - getOptionsOrBuilderList() { - return options_; - } - /** - * repeated .google.protobuf.Option options = 9; - * - *
-   * The protocol buffer options.
-   * 
- */ - public int getOptionsCount() { - return options_.size(); - } - /** - * repeated .google.protobuf.Option options = 9; - * - *
-   * The protocol buffer options.
-   * 
- */ - public com.google.protobuf.Option getOptions(int index) { - return options_.get(index); - } - /** - * repeated .google.protobuf.Option options = 9; - * - *
-   * The protocol buffer options.
-   * 
- */ - public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( - int index) { - return options_.get(index); - } - - public static final int JSON_NAME_FIELD_NUMBER = 10; - private volatile java.lang.Object jsonName_; - /** - * optional string json_name = 10; - * - *
-   * The field JSON name.
-   * 
- */ - public java.lang.String getJsonName() { - java.lang.Object ref = jsonName_; - 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(); - jsonName_ = s; - return s; - } - } - /** - * optional string json_name = 10; - * - *
-   * The field JSON name.
-   * 
- */ - public com.google.protobuf.ByteString - getJsonNameBytes() { - java.lang.Object ref = jsonName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - jsonName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DEFAULT_VALUE_FIELD_NUMBER = 11; - private volatile java.lang.Object defaultValue_; - /** - * optional string default_value = 11; - * - *
-   * The string value of the default value of this field. Proto2 syntax only.
-   * 
- */ - public java.lang.String getDefaultValue() { - java.lang.Object ref = defaultValue_; - 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(); - defaultValue_ = s; - return s; - } - } - /** - * optional string default_value = 11; - * - *
-   * The string value of the default value of this field. Proto2 syntax only.
-   * 
- */ - public com.google.protobuf.ByteString - getDefaultValueBytes() { - java.lang.Object ref = defaultValue_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - defaultValue_ = 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 (kind_ != com.google.protobuf.Field.Kind.TYPE_UNKNOWN.getNumber()) { - output.writeEnum(1, kind_); - } - if (cardinality_ != com.google.protobuf.Field.Cardinality.CARDINALITY_UNKNOWN.getNumber()) { - output.writeEnum(2, cardinality_); - } - if (number_ != 0) { - output.writeInt32(3, number_); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, name_); - } - if (!getTypeUrlBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 6, typeUrl_); - } - if (oneofIndex_ != 0) { - output.writeInt32(7, oneofIndex_); - } - if (packed_ != false) { - output.writeBool(8, packed_); - } - for (int i = 0; i < options_.size(); i++) { - output.writeMessage(9, options_.get(i)); - } - if (!getJsonNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 10, jsonName_); - } - if (!getDefaultValueBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 11, defaultValue_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (kind_ != com.google.protobuf.Field.Kind.TYPE_UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, kind_); - } - if (cardinality_ != com.google.protobuf.Field.Cardinality.CARDINALITY_UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, cardinality_); - } - if (number_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, number_); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, name_); - } - if (!getTypeUrlBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(6, typeUrl_); - } - if (oneofIndex_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(7, oneofIndex_); - } - if (packed_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(8, packed_); - } - for (int i = 0; i < options_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, options_.get(i)); - } - if (!getJsonNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(10, jsonName_); - } - if (!getDefaultValueBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(11, defaultValue_); - } - 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.protobuf.Field)) { - return super.equals(obj); - } - com.google.protobuf.Field other = (com.google.protobuf.Field) obj; - - boolean result = true; - result = result && kind_ == other.kind_; - result = result && cardinality_ == other.cardinality_; - result = result && (getNumber() - == other.getNumber()); - result = result && getName() - .equals(other.getName()); - result = result && getTypeUrl() - .equals(other.getTypeUrl()); - result = result && (getOneofIndex() - == other.getOneofIndex()); - result = result && (getPacked() - == other.getPacked()); - result = result && getOptionsList() - .equals(other.getOptionsList()); - result = result && getJsonName() - .equals(other.getJsonName()); - result = result && getDefaultValue() - .equals(other.getDefaultValue()); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); - hash = (37 * hash) + KIND_FIELD_NUMBER; - hash = (53 * hash) + kind_; - hash = (37 * hash) + CARDINALITY_FIELD_NUMBER; - hash = (53 * hash) + cardinality_; - hash = (37 * hash) + NUMBER_FIELD_NUMBER; - hash = (53 * hash) + getNumber(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + TYPE_URL_FIELD_NUMBER; - hash = (53 * hash) + getTypeUrl().hashCode(); - hash = (37 * hash) + ONEOF_INDEX_FIELD_NUMBER; - hash = (53 * hash) + getOneofIndex(); - hash = (37 * hash) + PACKED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getPacked()); - if (getOptionsCount() > 0) { - hash = (37 * hash) + OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + getOptionsList().hashCode(); - } - hash = (37 * hash) + JSON_NAME_FIELD_NUMBER; - hash = (53 * hash) + getJsonName().hashCode(); - hash = (37 * hash) + DEFAULT_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getDefaultValue().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protobuf.Field parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Field 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.protobuf.Field parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Field parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.protobuf.Field parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.Field parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.protobuf.Field parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.protobuf.Field parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.protobuf.Field parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.Field 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.protobuf.Field 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.protobuf.Field} - * - *
-   * A single field of a message type.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.protobuf.Field) - com.google.protobuf.FieldOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.TypeProto.internal_static_google_protobuf_Field_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.TypeProto.internal_static_google_protobuf_Field_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.Field.class, com.google.protobuf.Field.Builder.class); - } - - // Construct using com.google.protobuf.Field.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getOptionsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - kind_ = 0; - - cardinality_ = 0; - - number_ = 0; - - name_ = ""; - - typeUrl_ = ""; - - oneofIndex_ = 0; - - packed_ = false; - - if (optionsBuilder_ == null) { - options_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - } else { - optionsBuilder_.clear(); - } - jsonName_ = ""; - - defaultValue_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.protobuf.TypeProto.internal_static_google_protobuf_Field_descriptor; - } - - public com.google.protobuf.Field getDefaultInstanceForType() { - return com.google.protobuf.Field.getDefaultInstance(); - } - - public com.google.protobuf.Field build() { - com.google.protobuf.Field result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.protobuf.Field buildPartial() { - com.google.protobuf.Field result = new com.google.protobuf.Field(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.kind_ = kind_; - result.cardinality_ = cardinality_; - result.number_ = number_; - result.name_ = name_; - result.typeUrl_ = typeUrl_; - result.oneofIndex_ = oneofIndex_; - result.packed_ = packed_; - if (optionsBuilder_ == null) { - if (((bitField0_ & 0x00000080) == 0x00000080)) { - options_ = java.util.Collections.unmodifiableList(options_); - bitField0_ = (bitField0_ & ~0x00000080); - } - result.options_ = options_; - } else { - result.options_ = optionsBuilder_.build(); - } - result.jsonName_ = jsonName_; - result.defaultValue_ = defaultValue_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.protobuf.Field) { - return mergeFrom((com.google.protobuf.Field)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.protobuf.Field other) { - if (other == com.google.protobuf.Field.getDefaultInstance()) return this; - if (other.kind_ != 0) { - setKindValue(other.getKindValue()); - } - if (other.cardinality_ != 0) { - setCardinalityValue(other.getCardinalityValue()); - } - if (other.getNumber() != 0) { - setNumber(other.getNumber()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getTypeUrl().isEmpty()) { - typeUrl_ = other.typeUrl_; - onChanged(); - } - if (other.getOneofIndex() != 0) { - setOneofIndex(other.getOneofIndex()); - } - if (other.getPacked() != false) { - setPacked(other.getPacked()); - } - if (optionsBuilder_ == null) { - if (!other.options_.isEmpty()) { - if (options_.isEmpty()) { - options_ = other.options_; - bitField0_ = (bitField0_ & ~0x00000080); - } else { - ensureOptionsIsMutable(); - options_.addAll(other.options_); - } - onChanged(); - } - } else { - if (!other.options_.isEmpty()) { - if (optionsBuilder_.isEmpty()) { - optionsBuilder_.dispose(); - optionsBuilder_ = null; - options_ = other.options_; - bitField0_ = (bitField0_ & ~0x00000080); - optionsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getOptionsFieldBuilder() : null; - } else { - optionsBuilder_.addAllMessages(other.options_); - } - } - } - if (!other.getJsonName().isEmpty()) { - jsonName_ = other.jsonName_; - onChanged(); - } - if (!other.getDefaultValue().isEmpty()) { - defaultValue_ = other.defaultValue_; - 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.protobuf.Field parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.protobuf.Field) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int kind_ = 0; - /** - * optional .google.protobuf.Field.Kind kind = 1; - * - *
-     * The field type.
-     * 
- */ - public int getKindValue() { - return kind_; - } - /** - * optional .google.protobuf.Field.Kind kind = 1; - * - *
-     * The field type.
-     * 
- */ - public Builder setKindValue(int value) { - kind_ = value; - onChanged(); - return this; - } - /** - * optional .google.protobuf.Field.Kind kind = 1; - * - *
-     * The field type.
-     * 
- */ - public com.google.protobuf.Field.Kind getKind() { - com.google.protobuf.Field.Kind result = com.google.protobuf.Field.Kind.valueOf(kind_); - return result == null ? com.google.protobuf.Field.Kind.UNRECOGNIZED : result; - } - /** - * optional .google.protobuf.Field.Kind kind = 1; - * - *
-     * The field type.
-     * 
- */ - public Builder setKind(com.google.protobuf.Field.Kind value) { - if (value == null) { - throw new NullPointerException(); - } - - kind_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .google.protobuf.Field.Kind kind = 1; - * - *
-     * The field type.
-     * 
- */ - public Builder clearKind() { - - kind_ = 0; - onChanged(); - return this; - } - - private int cardinality_ = 0; - /** - * optional .google.protobuf.Field.Cardinality cardinality = 2; - * - *
-     * The field cardinality.
-     * 
- */ - public int getCardinalityValue() { - return cardinality_; - } - /** - * optional .google.protobuf.Field.Cardinality cardinality = 2; - * - *
-     * The field cardinality.
-     * 
- */ - public Builder setCardinalityValue(int value) { - cardinality_ = value; - onChanged(); - return this; - } - /** - * optional .google.protobuf.Field.Cardinality cardinality = 2; - * - *
-     * The field cardinality.
-     * 
- */ - public com.google.protobuf.Field.Cardinality getCardinality() { - com.google.protobuf.Field.Cardinality result = com.google.protobuf.Field.Cardinality.valueOf(cardinality_); - return result == null ? com.google.protobuf.Field.Cardinality.UNRECOGNIZED : result; - } - /** - * optional .google.protobuf.Field.Cardinality cardinality = 2; - * - *
-     * The field cardinality.
-     * 
- */ - public Builder setCardinality(com.google.protobuf.Field.Cardinality value) { - if (value == null) { - throw new NullPointerException(); - } - - cardinality_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .google.protobuf.Field.Cardinality cardinality = 2; - * - *
-     * The field cardinality.
-     * 
- */ - public Builder clearCardinality() { - - cardinality_ = 0; - onChanged(); - return this; - } - - private int number_ ; - /** - * optional int32 number = 3; - * - *
-     * The field number.
-     * 
- */ - public int getNumber() { - return number_; - } - /** - * optional int32 number = 3; - * - *
-     * The field number.
-     * 
- */ - public Builder setNumber(int value) { - - number_ = value; - onChanged(); - return this; - } - /** - * optional int32 number = 3; - * - *
-     * The field number.
-     * 
- */ - public Builder clearNumber() { - - number_ = 0; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - * optional string name = 4; - * - *
-     * The field name.
-     * 
- */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string name = 4; - * - *
-     * The field name.
-     * 
- */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string name = 4; - * - *
-     * The field name.
-     * 
- */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 4; - * - *
-     * The field name.
-     * 
- */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 4; - * - *
-     * The field name.
-     * 
- */ - 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 typeUrl_ = ""; - /** - * optional string type_url = 6; - * - *
-     * The field type URL, without the scheme, for message or enumeration
-     * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
-     * 
- */ - public java.lang.String getTypeUrl() { - java.lang.Object ref = typeUrl_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - typeUrl_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string type_url = 6; - * - *
-     * The field type URL, without the scheme, for message or enumeration
-     * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
-     * 
- */ - public com.google.protobuf.ByteString - getTypeUrlBytes() { - java.lang.Object ref = typeUrl_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - typeUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string type_url = 6; - * - *
-     * The field type URL, without the scheme, for message or enumeration
-     * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
-     * 
- */ - public Builder setTypeUrl( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - typeUrl_ = value; - onChanged(); - return this; - } - /** - * optional string type_url = 6; - * - *
-     * The field type URL, without the scheme, for message or enumeration
-     * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
-     * 
- */ - public Builder clearTypeUrl() { - - typeUrl_ = getDefaultInstance().getTypeUrl(); - onChanged(); - return this; - } - /** - * optional string type_url = 6; - * - *
-     * The field type URL, without the scheme, for message or enumeration
-     * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
-     * 
- */ - public Builder setTypeUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - typeUrl_ = value; - onChanged(); - return this; - } - - private int oneofIndex_ ; - /** - * optional int32 oneof_index = 7; - * - *
-     * The index of the field type in `Type.oneofs`, for message or enumeration
-     * types. The first type has index 1; zero means the type is not in the list.
-     * 
- */ - public int getOneofIndex() { - return oneofIndex_; - } - /** - * optional int32 oneof_index = 7; - * - *
-     * The index of the field type in `Type.oneofs`, for message or enumeration
-     * types. The first type has index 1; zero means the type is not in the list.
-     * 
- */ - public Builder setOneofIndex(int value) { - - oneofIndex_ = value; - onChanged(); - return this; - } - /** - * optional int32 oneof_index = 7; - * - *
-     * The index of the field type in `Type.oneofs`, for message or enumeration
-     * types. The first type has index 1; zero means the type is not in the list.
-     * 
- */ - public Builder clearOneofIndex() { - - oneofIndex_ = 0; - onChanged(); - return this; - } - - private boolean packed_ ; - /** - * optional bool packed = 8; - * - *
-     * Whether to use alternative packed wire representation.
-     * 
- */ - public boolean getPacked() { - return packed_; - } - /** - * optional bool packed = 8; - * - *
-     * Whether to use alternative packed wire representation.
-     * 
- */ - public Builder setPacked(boolean value) { - - packed_ = value; - onChanged(); - return this; - } - /** - * optional bool packed = 8; - * - *
-     * Whether to use alternative packed wire representation.
-     * 
- */ - public Builder clearPacked() { - - packed_ = false; - onChanged(); - return this; - } - - private java.util.List options_ = - java.util.Collections.emptyList(); - private void ensureOptionsIsMutable() { - if (!((bitField0_ & 0x00000080) == 0x00000080)) { - options_ = new java.util.ArrayList(options_); - bitField0_ |= 0x00000080; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> optionsBuilder_; - - /** - * repeated .google.protobuf.Option options = 9; - * - *
-     * The protocol buffer options.
-     * 
- */ - public java.util.List getOptionsList() { - if (optionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(options_); - } else { - return optionsBuilder_.getMessageList(); - } - } - /** - * repeated .google.protobuf.Option options = 9; - * - *
-     * The protocol buffer options.
-     * 
- */ - public int getOptionsCount() { - if (optionsBuilder_ == null) { - return options_.size(); - } else { - return optionsBuilder_.getCount(); - } - } - /** - * repeated .google.protobuf.Option options = 9; - * - *
-     * The protocol buffer options.
-     * 
- */ - public com.google.protobuf.Option getOptions(int index) { - if (optionsBuilder_ == null) { - return options_.get(index); - } else { - return optionsBuilder_.getMessage(index); - } - } - /** - * repeated .google.protobuf.Option options = 9; - * - *
-     * The protocol buffer options.
-     * 
- */ - public Builder setOptions( - int index, com.google.protobuf.Option value) { - if (optionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOptionsIsMutable(); - options_.set(index, value); - onChanged(); - } else { - optionsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 9; - * - *
-     * The protocol buffer options.
-     * 
- */ - public Builder setOptions( - int index, com.google.protobuf.Option.Builder builderForValue) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - options_.set(index, builderForValue.build()); - onChanged(); - } else { - optionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 9; - * - *
-     * The protocol buffer options.
-     * 
- */ - public Builder addOptions(com.google.protobuf.Option value) { - if (optionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOptionsIsMutable(); - options_.add(value); - onChanged(); - } else { - optionsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 9; - * - *
-     * The protocol buffer options.
-     * 
- */ - public Builder addOptions( - int index, com.google.protobuf.Option value) { - if (optionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOptionsIsMutable(); - options_.add(index, value); - onChanged(); - } else { - optionsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 9; - * - *
-     * The protocol buffer options.
-     * 
- */ - public Builder addOptions( - com.google.protobuf.Option.Builder builderForValue) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - options_.add(builderForValue.build()); - onChanged(); - } else { - optionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 9; - * - *
-     * The protocol buffer options.
-     * 
- */ - public Builder addOptions( - int index, com.google.protobuf.Option.Builder builderForValue) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - options_.add(index, builderForValue.build()); - onChanged(); - } else { - optionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 9; - * - *
-     * The protocol buffer options.
-     * 
- */ - public Builder addAllOptions( - java.lang.Iterable values) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, options_); - onChanged(); - } else { - optionsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 9; - * - *
-     * The protocol buffer options.
-     * 
- */ - public Builder clearOptions() { - if (optionsBuilder_ == null) { - options_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - } else { - optionsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 9; - * - *
-     * The protocol buffer options.
-     * 
- */ - public Builder removeOptions(int index) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - options_.remove(index); - onChanged(); - } else { - optionsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 9; - * - *
-     * The protocol buffer options.
-     * 
- */ - public com.google.protobuf.Option.Builder getOptionsBuilder( - int index) { - return getOptionsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.protobuf.Option options = 9; - * - *
-     * The protocol buffer options.
-     * 
- */ - public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( - int index) { - if (optionsBuilder_ == null) { - return options_.get(index); } else { - return optionsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.protobuf.Option options = 9; - * - *
-     * The protocol buffer options.
-     * 
- */ - public java.util.List - getOptionsOrBuilderList() { - if (optionsBuilder_ != null) { - return optionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(options_); - } - } - /** - * repeated .google.protobuf.Option options = 9; - * - *
-     * The protocol buffer options.
-     * 
- */ - public com.google.protobuf.Option.Builder addOptionsBuilder() { - return getOptionsFieldBuilder().addBuilder( - com.google.protobuf.Option.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Option options = 9; - * - *
-     * The protocol buffer options.
-     * 
- */ - public com.google.protobuf.Option.Builder addOptionsBuilder( - int index) { - return getOptionsFieldBuilder().addBuilder( - index, com.google.protobuf.Option.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Option options = 9; - * - *
-     * The protocol buffer options.
-     * 
- */ - public java.util.List - getOptionsBuilderList() { - return getOptionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> - getOptionsFieldBuilder() { - if (optionsBuilder_ == null) { - optionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder>( - options_, - ((bitField0_ & 0x00000080) == 0x00000080), - getParentForChildren(), - isClean()); - options_ = null; - } - return optionsBuilder_; - } - - private java.lang.Object jsonName_ = ""; - /** - * optional string json_name = 10; - * - *
-     * The field JSON name.
-     * 
- */ - public java.lang.String getJsonName() { - java.lang.Object ref = jsonName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jsonName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string json_name = 10; - * - *
-     * The field JSON name.
-     * 
- */ - public com.google.protobuf.ByteString - getJsonNameBytes() { - java.lang.Object ref = jsonName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - jsonName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string json_name = 10; - * - *
-     * The field JSON name.
-     * 
- */ - public Builder setJsonName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - jsonName_ = value; - onChanged(); - return this; - } - /** - * optional string json_name = 10; - * - *
-     * The field JSON name.
-     * 
- */ - public Builder clearJsonName() { - - jsonName_ = getDefaultInstance().getJsonName(); - onChanged(); - return this; - } - /** - * optional string json_name = 10; - * - *
-     * The field JSON name.
-     * 
- */ - public Builder setJsonNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - jsonName_ = value; - onChanged(); - return this; - } - - private java.lang.Object defaultValue_ = ""; - /** - * optional string default_value = 11; - * - *
-     * The string value of the default value of this field. Proto2 syntax only.
-     * 
- */ - public java.lang.String getDefaultValue() { - java.lang.Object ref = defaultValue_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - defaultValue_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string default_value = 11; - * - *
-     * The string value of the default value of this field. Proto2 syntax only.
-     * 
- */ - public com.google.protobuf.ByteString - getDefaultValueBytes() { - java.lang.Object ref = defaultValue_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - defaultValue_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string default_value = 11; - * - *
-     * The string value of the default value of this field. Proto2 syntax only.
-     * 
- */ - public Builder setDefaultValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - defaultValue_ = value; - onChanged(); - return this; - } - /** - * optional string default_value = 11; - * - *
-     * The string value of the default value of this field. Proto2 syntax only.
-     * 
- */ - public Builder clearDefaultValue() { - - defaultValue_ = getDefaultInstance().getDefaultValue(); - onChanged(); - return this; - } - /** - * optional string default_value = 11; - * - *
-     * The string value of the default value of this field. Proto2 syntax only.
-     * 
- */ - public Builder setDefaultValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - defaultValue_ = 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.protobuf.Field) - } - - // @@protoc_insertion_point(class_scope:google.protobuf.Field) - private static final com.google.protobuf.Field DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.protobuf.Field(); - } - - public static com.google.protobuf.Field getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Field parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Field(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.protobuf.Field getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldMask.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldMask.java deleted file mode 100644 index ec9e361e4426..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldMask.java +++ /dev/null @@ -1,763 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/field_mask.proto - -package com.google.protobuf; - -/** - * Protobuf type {@code google.protobuf.FieldMask} - * - *
- * `FieldMask` represents a set of symbolic field paths, for example:
- *     paths: "f.a"
- *     paths: "f.b.d"
- * Here `f` represents a field in some root message, `a` and `b`
- * fields in the message found in `f`, and `d` a field found in the
- * message in `f.b`.
- * Field masks are used to specify a subset of fields that should be
- * returned by a get operation or modified by an update operation.
- * Field masks also have a custom JSON encoding (see below).
- * # Field Masks in Projections
- * When used in the context of a projection, a response message or
- * sub-message is filtered by the API to only contain those fields as
- * specified in the mask. For example, if the mask in the previous
- * example is applied to a response message as follows:
- *     f {
- *       a : 22
- *       b {
- *         d : 1
- *         x : 2
- *       }
- *       y : 13
- *     }
- *     z: 8
- * The result will not contain specific values for fields x,y and z
- * (there value will be set to the default, and omitted in proto text
- * output):
- *     f {
- *       a : 22
- *       b {
- *         d : 1
- *       }
- *     }
- * A repeated field is not allowed except at the last position of a
- * field mask.
- * If a FieldMask object is not present in a get operation, the
- * operation applies to all fields (as if a FieldMask of all fields
- * had been specified).
- * Note that a field mask does not necessarily applies to the
- * top-level response message. In case of a REST get operation, the
- * field mask applies directly to the response, but in case of a REST
- * list operation, the mask instead applies to each individual message
- * in the returned resource list. In case of a REST custom method,
- * other definitions may be used. Where the mask applies will be
- * clearly documented together with its declaration in the API.  In
- * any case, the effect on the returned resource/resources is required
- * behavior for APIs.
- * # Field Masks in Update Operations
- * A field mask in update operations specifies which fields of the
- * targeted resource are going to be updated. The API is required
- * to only change the values of the fields as specified in the mask
- * and leave the others untouched. If a resource is passed in to
- * describe the updated values, the API ignores the values of all
- * fields not covered by the mask.
- * In order to reset a field's value to the default, the field must
- * be in the mask and set to the default value in the provided resource.
- * Hence, in order to reset all fields of a resource, provide a default
- * instance of the resource and set all fields in the mask, or do
- * not provide a mask as described below.
- * If a field mask is not present on update, the operation applies to
- * all fields (as if a field mask of all fields has been specified).
- * Note that in the presence of schema evolution, this may mean that
- * fields the client does not know and has therefore not filled into
- * the request will be reset to their default. If this is unwanted
- * behavior, a specific service may require a client to always specify
- * a field mask, producing an error if not.
- * As with get operations, the location of the resource which
- * describes the updated values in the request message depends on the
- * operation kind. In any case, the effect of the field mask is
- * required to be honored by the API.
- * ## Considerations for HTTP REST
- * The HTTP kind of an update operation which uses a field mask must
- * be set to PATCH instead of PUT in order to satisfy HTTP semantics
- * (PUT must only be used for full updates).
- * # JSON Encoding of Field Masks
- * In JSON, a field mask is encoded as a single string where paths are
- * separated by a comma. Fields name in each path are converted
- * to/from lower-camel naming conventions.
- * As an example, consider the following message declarations:
- *     message Profile {
- *       User user = 1;
- *       Photo photo = 2;
- *     }
- *     message User {
- *       string display_name = 1;
- *       string address = 2;
- *     }
- * In proto a field mask for `Profile` may look as such:
- *     mask {
- *       paths: "user.display_name"
- *       paths: "photo"
- *     }
- * In JSON, the same mask is represented as below:
- *     {
- *       mask: "user.displayName,photo"
- *     }
- * 
- */ -public final class FieldMask extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.protobuf.FieldMask) - FieldMaskOrBuilder { - // Use FieldMask.newBuilder() to construct. - private FieldMask(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FieldMask() { - paths_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private FieldMask( - 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)) { - paths_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - paths_.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)) { - paths_ = paths_.getUnmodifiableView(); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.FieldMaskProto.internal_static_google_protobuf_FieldMask_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.FieldMaskProto.internal_static_google_protobuf_FieldMask_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.FieldMask.class, com.google.protobuf.FieldMask.Builder.class); - } - - public static final int PATHS_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList paths_; - /** - * repeated string paths = 1; - * - *
-   * The set of field mask paths.
-   * 
- */ - public com.google.protobuf.ProtocolStringList - getPathsList() { - return paths_; - } - /** - * repeated string paths = 1; - * - *
-   * The set of field mask paths.
-   * 
- */ - public int getPathsCount() { - return paths_.size(); - } - /** - * repeated string paths = 1; - * - *
-   * The set of field mask paths.
-   * 
- */ - public java.lang.String getPaths(int index) { - return paths_.get(index); - } - /** - * repeated string paths = 1; - * - *
-   * The set of field mask paths.
-   * 
- */ - public com.google.protobuf.ByteString - getPathsBytes(int index) { - return paths_.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 < paths_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, paths_.getRaw(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < paths_.size(); i++) { - dataSize += computeStringSizeNoTag(paths_.getRaw(i)); - } - size += dataSize; - size += 1 * getPathsList().size(); - } - 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.protobuf.FieldMask)) { - return super.equals(obj); - } - com.google.protobuf.FieldMask other = (com.google.protobuf.FieldMask) obj; - - boolean result = true; - result = result && getPathsList() - .equals(other.getPathsList()); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); - if (getPathsCount() > 0) { - hash = (37 * hash) + PATHS_FIELD_NUMBER; - hash = (53 * hash) + getPathsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protobuf.FieldMask parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.FieldMask 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.protobuf.FieldMask parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.FieldMask parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.protobuf.FieldMask parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.FieldMask parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.protobuf.FieldMask parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.protobuf.FieldMask parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.protobuf.FieldMask parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.FieldMask 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.protobuf.FieldMask 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.protobuf.FieldMask} - * - *
-   * `FieldMask` represents a set of symbolic field paths, for example:
-   *     paths: "f.a"
-   *     paths: "f.b.d"
-   * Here `f` represents a field in some root message, `a` and `b`
-   * fields in the message found in `f`, and `d` a field found in the
-   * message in `f.b`.
-   * Field masks are used to specify a subset of fields that should be
-   * returned by a get operation or modified by an update operation.
-   * Field masks also have a custom JSON encoding (see below).
-   * # Field Masks in Projections
-   * When used in the context of a projection, a response message or
-   * sub-message is filtered by the API to only contain those fields as
-   * specified in the mask. For example, if the mask in the previous
-   * example is applied to a response message as follows:
-   *     f {
-   *       a : 22
-   *       b {
-   *         d : 1
-   *         x : 2
-   *       }
-   *       y : 13
-   *     }
-   *     z: 8
-   * The result will not contain specific values for fields x,y and z
-   * (there value will be set to the default, and omitted in proto text
-   * output):
-   *     f {
-   *       a : 22
-   *       b {
-   *         d : 1
-   *       }
-   *     }
-   * A repeated field is not allowed except at the last position of a
-   * field mask.
-   * If a FieldMask object is not present in a get operation, the
-   * operation applies to all fields (as if a FieldMask of all fields
-   * had been specified).
-   * Note that a field mask does not necessarily applies to the
-   * top-level response message. In case of a REST get operation, the
-   * field mask applies directly to the response, but in case of a REST
-   * list operation, the mask instead applies to each individual message
-   * in the returned resource list. In case of a REST custom method,
-   * other definitions may be used. Where the mask applies will be
-   * clearly documented together with its declaration in the API.  In
-   * any case, the effect on the returned resource/resources is required
-   * behavior for APIs.
-   * # Field Masks in Update Operations
-   * A field mask in update operations specifies which fields of the
-   * targeted resource are going to be updated. The API is required
-   * to only change the values of the fields as specified in the mask
-   * and leave the others untouched. If a resource is passed in to
-   * describe the updated values, the API ignores the values of all
-   * fields not covered by the mask.
-   * In order to reset a field's value to the default, the field must
-   * be in the mask and set to the default value in the provided resource.
-   * Hence, in order to reset all fields of a resource, provide a default
-   * instance of the resource and set all fields in the mask, or do
-   * not provide a mask as described below.
-   * If a field mask is not present on update, the operation applies to
-   * all fields (as if a field mask of all fields has been specified).
-   * Note that in the presence of schema evolution, this may mean that
-   * fields the client does not know and has therefore not filled into
-   * the request will be reset to their default. If this is unwanted
-   * behavior, a specific service may require a client to always specify
-   * a field mask, producing an error if not.
-   * As with get operations, the location of the resource which
-   * describes the updated values in the request message depends on the
-   * operation kind. In any case, the effect of the field mask is
-   * required to be honored by the API.
-   * ## Considerations for HTTP REST
-   * The HTTP kind of an update operation which uses a field mask must
-   * be set to PATCH instead of PUT in order to satisfy HTTP semantics
-   * (PUT must only be used for full updates).
-   * # JSON Encoding of Field Masks
-   * In JSON, a field mask is encoded as a single string where paths are
-   * separated by a comma. Fields name in each path are converted
-   * to/from lower-camel naming conventions.
-   * As an example, consider the following message declarations:
-   *     message Profile {
-   *       User user = 1;
-   *       Photo photo = 2;
-   *     }
-   *     message User {
-   *       string display_name = 1;
-   *       string address = 2;
-   *     }
-   * In proto a field mask for `Profile` may look as such:
-   *     mask {
-   *       paths: "user.display_name"
-   *       paths: "photo"
-   *     }
-   * In JSON, the same mask is represented as below:
-   *     {
-   *       mask: "user.displayName,photo"
-   *     }
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.protobuf.FieldMask) - com.google.protobuf.FieldMaskOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.FieldMaskProto.internal_static_google_protobuf_FieldMask_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.FieldMaskProto.internal_static_google_protobuf_FieldMask_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.FieldMask.class, com.google.protobuf.FieldMask.Builder.class); - } - - // Construct using com.google.protobuf.FieldMask.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(); - paths_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.protobuf.FieldMaskProto.internal_static_google_protobuf_FieldMask_descriptor; - } - - public com.google.protobuf.FieldMask getDefaultInstanceForType() { - return com.google.protobuf.FieldMask.getDefaultInstance(); - } - - public com.google.protobuf.FieldMask build() { - com.google.protobuf.FieldMask result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.protobuf.FieldMask buildPartial() { - com.google.protobuf.FieldMask result = new com.google.protobuf.FieldMask(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - paths_ = paths_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.paths_ = paths_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.protobuf.FieldMask) { - return mergeFrom((com.google.protobuf.FieldMask)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.protobuf.FieldMask other) { - if (other == com.google.protobuf.FieldMask.getDefaultInstance()) return this; - if (!other.paths_.isEmpty()) { - if (paths_.isEmpty()) { - paths_ = other.paths_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePathsIsMutable(); - paths_.addAll(other.paths_); - } - 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.protobuf.FieldMask parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.protobuf.FieldMask) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringList paths_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensurePathsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - paths_ = new com.google.protobuf.LazyStringArrayList(paths_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated string paths = 1; - * - *
-     * The set of field mask paths.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getPathsList() { - return paths_.getUnmodifiableView(); - } - /** - * repeated string paths = 1; - * - *
-     * The set of field mask paths.
-     * 
- */ - public int getPathsCount() { - return paths_.size(); - } - /** - * repeated string paths = 1; - * - *
-     * The set of field mask paths.
-     * 
- */ - public java.lang.String getPaths(int index) { - return paths_.get(index); - } - /** - * repeated string paths = 1; - * - *
-     * The set of field mask paths.
-     * 
- */ - public com.google.protobuf.ByteString - getPathsBytes(int index) { - return paths_.getByteString(index); - } - /** - * repeated string paths = 1; - * - *
-     * The set of field mask paths.
-     * 
- */ - public Builder setPaths( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePathsIsMutable(); - paths_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string paths = 1; - * - *
-     * The set of field mask paths.
-     * 
- */ - public Builder addPaths( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePathsIsMutable(); - paths_.add(value); - onChanged(); - return this; - } - /** - * repeated string paths = 1; - * - *
-     * The set of field mask paths.
-     * 
- */ - public Builder addAllPaths( - java.lang.Iterable values) { - ensurePathsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, paths_); - onChanged(); - return this; - } - /** - * repeated string paths = 1; - * - *
-     * The set of field mask paths.
-     * 
- */ - public Builder clearPaths() { - paths_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * repeated string paths = 1; - * - *
-     * The set of field mask paths.
-     * 
- */ - public Builder addPathsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensurePathsIsMutable(); - paths_.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.protobuf.FieldMask) - } - - // @@protoc_insertion_point(class_scope:google.protobuf.FieldMask) - private static final com.google.protobuf.FieldMask DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.protobuf.FieldMask(); - } - - public static com.google.protobuf.FieldMask getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public FieldMask parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new FieldMask(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.protobuf.FieldMask getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldMaskOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldMaskOrBuilder.java deleted file mode 100644 index b31a95584982..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldMaskOrBuilder.java +++ /dev/null @@ -1,44 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/field_mask.proto - -package com.google.protobuf; - -public interface FieldMaskOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.protobuf.FieldMask) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated string paths = 1; - * - *
-   * The set of field mask paths.
-   * 
- */ - com.google.protobuf.ProtocolStringList - getPathsList(); - /** - * repeated string paths = 1; - * - *
-   * The set of field mask paths.
-   * 
- */ - int getPathsCount(); - /** - * repeated string paths = 1; - * - *
-   * The set of field mask paths.
-   * 
- */ - java.lang.String getPaths(int index); - /** - * repeated string paths = 1; - * - *
-   * The set of field mask paths.
-   * 
- */ - com.google.protobuf.ByteString - getPathsBytes(int index); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldMaskProto.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldMaskProto.java deleted file mode 100644 index bd0243eb602d..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldMaskProto.java +++ /dev/null @@ -1,52 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/field_mask.proto - -package com.google.protobuf; - -public final class FieldMaskProto { - private FieldMaskProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_protobuf_FieldMask_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_protobuf_FieldMask_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/protobuf/field_mask.proto\022\017goog" + - "le.protobuf\"\032\n\tFieldMask\022\r\n\005paths\030\001 \003(\tB" + - "T\n\023com.google.protobufB\016FieldMaskProtoP\001" + - "\240\001\001\242\002\003GPB\252\002\036Google.Protobuf.WellKnownTyp" + - "es\260\002\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_protobuf_FieldMask_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_protobuf_FieldMask_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_protobuf_FieldMask_descriptor, - new java.lang.String[] { "Paths", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldOrBuilder.java deleted file mode 100644 index 091a3cdd4ec4..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldOrBuilder.java +++ /dev/null @@ -1,189 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/type.proto - -package com.google.protobuf; - -public interface FieldOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.protobuf.Field) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .google.protobuf.Field.Kind kind = 1; - * - *
-   * The field type.
-   * 
- */ - int getKindValue(); - /** - * optional .google.protobuf.Field.Kind kind = 1; - * - *
-   * The field type.
-   * 
- */ - com.google.protobuf.Field.Kind getKind(); - - /** - * optional .google.protobuf.Field.Cardinality cardinality = 2; - * - *
-   * The field cardinality.
-   * 
- */ - int getCardinalityValue(); - /** - * optional .google.protobuf.Field.Cardinality cardinality = 2; - * - *
-   * The field cardinality.
-   * 
- */ - com.google.protobuf.Field.Cardinality getCardinality(); - - /** - * optional int32 number = 3; - * - *
-   * The field number.
-   * 
- */ - int getNumber(); - - /** - * optional string name = 4; - * - *
-   * The field name.
-   * 
- */ - java.lang.String getName(); - /** - * optional string name = 4; - * - *
-   * The field name.
-   * 
- */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * optional string type_url = 6; - * - *
-   * The field type URL, without the scheme, for message or enumeration
-   * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
-   * 
- */ - java.lang.String getTypeUrl(); - /** - * optional string type_url = 6; - * - *
-   * The field type URL, without the scheme, for message or enumeration
-   * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
-   * 
- */ - com.google.protobuf.ByteString - getTypeUrlBytes(); - - /** - * optional int32 oneof_index = 7; - * - *
-   * The index of the field type in `Type.oneofs`, for message or enumeration
-   * types. The first type has index 1; zero means the type is not in the list.
-   * 
- */ - int getOneofIndex(); - - /** - * optional bool packed = 8; - * - *
-   * Whether to use alternative packed wire representation.
-   * 
- */ - boolean getPacked(); - - /** - * repeated .google.protobuf.Option options = 9; - * - *
-   * The protocol buffer options.
-   * 
- */ - java.util.List - getOptionsList(); - /** - * repeated .google.protobuf.Option options = 9; - * - *
-   * The protocol buffer options.
-   * 
- */ - com.google.protobuf.Option getOptions(int index); - /** - * repeated .google.protobuf.Option options = 9; - * - *
-   * The protocol buffer options.
-   * 
- */ - int getOptionsCount(); - /** - * repeated .google.protobuf.Option options = 9; - * - *
-   * The protocol buffer options.
-   * 
- */ - java.util.List - getOptionsOrBuilderList(); - /** - * repeated .google.protobuf.Option options = 9; - * - *
-   * The protocol buffer options.
-   * 
- */ - com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( - int index); - - /** - * optional string json_name = 10; - * - *
-   * The field JSON name.
-   * 
- */ - java.lang.String getJsonName(); - /** - * optional string json_name = 10; - * - *
-   * The field JSON name.
-   * 
- */ - com.google.protobuf.ByteString - getJsonNameBytes(); - - /** - * optional string default_value = 11; - * - *
-   * The string value of the default value of this field. Proto2 syntax only.
-   * 
- */ - java.lang.String getDefaultValue(); - /** - * optional string default_value = 11; - * - *
-   * The string value of the default value of this field. Proto2 syntax only.
-   * 
- */ - com.google.protobuf.ByteString - getDefaultValueBytes(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FloatValue.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FloatValue.java deleted file mode 100644 index 4ad1e2a3aaac..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FloatValue.java +++ /dev/null @@ -1,430 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/wrappers.proto - -package com.google.protobuf; - -/** - * Protobuf type {@code google.protobuf.FloatValue} - * - *
- * Wrapper message for `float`.
- * The JSON representation for `FloatValue` is JSON number.
- * 
- */ -public final class FloatValue extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.protobuf.FloatValue) - FloatValueOrBuilder { - // Use FloatValue.newBuilder() to construct. - private FloatValue(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FloatValue() { - value_ = 0F; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private FloatValue( - 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: { - - value_ = input.readFloat(); - 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.protobuf.WrappersProto.internal_static_google_protobuf_FloatValue_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.WrappersProto.internal_static_google_protobuf_FloatValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.FloatValue.class, com.google.protobuf.FloatValue.Builder.class); - } - - public static final int VALUE_FIELD_NUMBER = 1; - private float value_; - /** - * optional float value = 1; - * - *
-   * The float value.
-   * 
- */ - public float getValue() { - return value_; - } - - 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 (value_ != 0F) { - output.writeFloat(1, value_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (value_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, value_); - } - 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.protobuf.FloatValue)) { - return super.equals(obj); - } - com.google.protobuf.FloatValue other = (com.google.protobuf.FloatValue) obj; - - boolean result = true; - result = result && ( - java.lang.Float.floatToIntBits(getValue()) - == java.lang.Float.floatToIntBits( - other.getValue())); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getValue()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protobuf.FloatValue parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.FloatValue 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.protobuf.FloatValue parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.FloatValue parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.protobuf.FloatValue parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.FloatValue parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.protobuf.FloatValue parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.protobuf.FloatValue parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.protobuf.FloatValue parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.FloatValue 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.protobuf.FloatValue 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.protobuf.FloatValue} - * - *
-   * Wrapper message for `float`.
-   * The JSON representation for `FloatValue` is JSON number.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.protobuf.FloatValue) - com.google.protobuf.FloatValueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.WrappersProto.internal_static_google_protobuf_FloatValue_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.WrappersProto.internal_static_google_protobuf_FloatValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.FloatValue.class, com.google.protobuf.FloatValue.Builder.class); - } - - // Construct using com.google.protobuf.FloatValue.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(); - value_ = 0F; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.protobuf.WrappersProto.internal_static_google_protobuf_FloatValue_descriptor; - } - - public com.google.protobuf.FloatValue getDefaultInstanceForType() { - return com.google.protobuf.FloatValue.getDefaultInstance(); - } - - public com.google.protobuf.FloatValue build() { - com.google.protobuf.FloatValue result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.protobuf.FloatValue buildPartial() { - com.google.protobuf.FloatValue result = new com.google.protobuf.FloatValue(this); - result.value_ = value_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.protobuf.FloatValue) { - return mergeFrom((com.google.protobuf.FloatValue)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.protobuf.FloatValue other) { - if (other == com.google.protobuf.FloatValue.getDefaultInstance()) return this; - if (other.getValue() != 0F) { - setValue(other.getValue()); - } - 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.protobuf.FloatValue parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.protobuf.FloatValue) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float value_ ; - /** - * optional float value = 1; - * - *
-     * The float value.
-     * 
- */ - public float getValue() { - return value_; - } - /** - * optional float value = 1; - * - *
-     * The float value.
-     * 
- */ - public Builder setValue(float value) { - - value_ = value; - onChanged(); - return this; - } - /** - * optional float value = 1; - * - *
-     * The float value.
-     * 
- */ - public Builder clearValue() { - - value_ = 0F; - 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.protobuf.FloatValue) - } - - // @@protoc_insertion_point(class_scope:google.protobuf.FloatValue) - private static final com.google.protobuf.FloatValue DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.protobuf.FloatValue(); - } - - public static com.google.protobuf.FloatValue getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public FloatValue parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new FloatValue(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.protobuf.FloatValue getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FloatValueOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FloatValueOrBuilder.java deleted file mode 100644 index 5e7b080689cf..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FloatValueOrBuilder.java +++ /dev/null @@ -1,18 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/wrappers.proto - -package com.google.protobuf; - -public interface FloatValueOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.protobuf.FloatValue) - com.google.protobuf.MessageOrBuilder { - - /** - * optional float value = 1; - * - *
-   * The float value.
-   * 
- */ - float getValue(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int32Value.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int32Value.java deleted file mode 100644 index 901fa3d17755..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int32Value.java +++ /dev/null @@ -1,427 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/wrappers.proto - -package com.google.protobuf; - -/** - * Protobuf type {@code google.protobuf.Int32Value} - * - *
- * Wrapper message for `int32`.
- * The JSON representation for `Int32Value` is JSON number.
- * 
- */ -public final class Int32Value extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.protobuf.Int32Value) - Int32ValueOrBuilder { - // Use Int32Value.newBuilder() to construct. - private Int32Value(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int32Value() { - value_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Int32Value( - 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: { - - value_ = 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.protobuf.WrappersProto.internal_static_google_protobuf_Int32Value_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int32Value_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.Int32Value.class, com.google.protobuf.Int32Value.Builder.class); - } - - public static final int VALUE_FIELD_NUMBER = 1; - private int value_; - /** - * optional int32 value = 1; - * - *
-   * The int32 value.
-   * 
- */ - public int getValue() { - return value_; - } - - 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 (value_ != 0) { - output.writeInt32(1, value_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (value_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, value_); - } - 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.protobuf.Int32Value)) { - return super.equals(obj); - } - com.google.protobuf.Int32Value other = (com.google.protobuf.Int32Value) obj; - - boolean result = true; - result = result && (getValue() - == other.getValue()); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protobuf.Int32Value parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Int32Value 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.protobuf.Int32Value parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Int32Value parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.protobuf.Int32Value parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.Int32Value parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.protobuf.Int32Value parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.protobuf.Int32Value parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.protobuf.Int32Value parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.Int32Value 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.protobuf.Int32Value 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.protobuf.Int32Value} - * - *
-   * Wrapper message for `int32`.
-   * The JSON representation for `Int32Value` is JSON number.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.protobuf.Int32Value) - com.google.protobuf.Int32ValueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int32Value_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int32Value_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.Int32Value.class, com.google.protobuf.Int32Value.Builder.class); - } - - // Construct using com.google.protobuf.Int32Value.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(); - value_ = 0; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int32Value_descriptor; - } - - public com.google.protobuf.Int32Value getDefaultInstanceForType() { - return com.google.protobuf.Int32Value.getDefaultInstance(); - } - - public com.google.protobuf.Int32Value build() { - com.google.protobuf.Int32Value result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.protobuf.Int32Value buildPartial() { - com.google.protobuf.Int32Value result = new com.google.protobuf.Int32Value(this); - result.value_ = value_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.protobuf.Int32Value) { - return mergeFrom((com.google.protobuf.Int32Value)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.protobuf.Int32Value other) { - if (other == com.google.protobuf.Int32Value.getDefaultInstance()) return this; - if (other.getValue() != 0) { - setValue(other.getValue()); - } - 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.protobuf.Int32Value parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.protobuf.Int32Value) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int value_ ; - /** - * optional int32 value = 1; - * - *
-     * The int32 value.
-     * 
- */ - public int getValue() { - return value_; - } - /** - * optional int32 value = 1; - * - *
-     * The int32 value.
-     * 
- */ - public Builder setValue(int value) { - - value_ = value; - onChanged(); - return this; - } - /** - * optional int32 value = 1; - * - *
-     * The int32 value.
-     * 
- */ - public Builder clearValue() { - - value_ = 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.protobuf.Int32Value) - } - - // @@protoc_insertion_point(class_scope:google.protobuf.Int32Value) - private static final com.google.protobuf.Int32Value DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.protobuf.Int32Value(); - } - - public static com.google.protobuf.Int32Value getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Int32Value parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Int32Value(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.protobuf.Int32Value getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int32ValueOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int32ValueOrBuilder.java deleted file mode 100644 index ac465c771031..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int32ValueOrBuilder.java +++ /dev/null @@ -1,18 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/wrappers.proto - -package com.google.protobuf; - -public interface Int32ValueOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.protobuf.Int32Value) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 value = 1; - * - *
-   * The int32 value.
-   * 
- */ - int getValue(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int64Value.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int64Value.java deleted file mode 100644 index c17b2d50d9e2..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int64Value.java +++ /dev/null @@ -1,428 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/wrappers.proto - -package com.google.protobuf; - -/** - * Protobuf type {@code google.protobuf.Int64Value} - * - *
- * Wrapper message for `int64`.
- * The JSON representation for `Int64Value` is JSON string.
- * 
- */ -public final class Int64Value extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.protobuf.Int64Value) - Int64ValueOrBuilder { - // Use Int64Value.newBuilder() to construct. - private Int64Value(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int64Value() { - value_ = 0L; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Int64Value( - 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: { - - value_ = input.readInt64(); - 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.protobuf.WrappersProto.internal_static_google_protobuf_Int64Value_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int64Value_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.Int64Value.class, com.google.protobuf.Int64Value.Builder.class); - } - - public static final int VALUE_FIELD_NUMBER = 1; - private long value_; - /** - * optional int64 value = 1; - * - *
-   * The int64 value.
-   * 
- */ - public long getValue() { - return value_; - } - - 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 (value_ != 0L) { - output.writeInt64(1, value_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (value_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, value_); - } - 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.protobuf.Int64Value)) { - return super.equals(obj); - } - com.google.protobuf.Int64Value other = (com.google.protobuf.Int64Value) obj; - - boolean result = true; - result = result && (getValue() - == other.getValue()); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getValue()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protobuf.Int64Value parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Int64Value 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.protobuf.Int64Value parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Int64Value parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.protobuf.Int64Value parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.Int64Value parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.protobuf.Int64Value parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.protobuf.Int64Value parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.protobuf.Int64Value parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.Int64Value 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.protobuf.Int64Value 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.protobuf.Int64Value} - * - *
-   * Wrapper message for `int64`.
-   * The JSON representation for `Int64Value` is JSON string.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.protobuf.Int64Value) - com.google.protobuf.Int64ValueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int64Value_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int64Value_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.Int64Value.class, com.google.protobuf.Int64Value.Builder.class); - } - - // Construct using com.google.protobuf.Int64Value.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(); - value_ = 0L; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int64Value_descriptor; - } - - public com.google.protobuf.Int64Value getDefaultInstanceForType() { - return com.google.protobuf.Int64Value.getDefaultInstance(); - } - - public com.google.protobuf.Int64Value build() { - com.google.protobuf.Int64Value result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.protobuf.Int64Value buildPartial() { - com.google.protobuf.Int64Value result = new com.google.protobuf.Int64Value(this); - result.value_ = value_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.protobuf.Int64Value) { - return mergeFrom((com.google.protobuf.Int64Value)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.protobuf.Int64Value other) { - if (other == com.google.protobuf.Int64Value.getDefaultInstance()) return this; - if (other.getValue() != 0L) { - setValue(other.getValue()); - } - 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.protobuf.Int64Value parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.protobuf.Int64Value) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private long value_ ; - /** - * optional int64 value = 1; - * - *
-     * The int64 value.
-     * 
- */ - public long getValue() { - return value_; - } - /** - * optional int64 value = 1; - * - *
-     * The int64 value.
-     * 
- */ - public Builder setValue(long value) { - - value_ = value; - onChanged(); - return this; - } - /** - * optional int64 value = 1; - * - *
-     * The int64 value.
-     * 
- */ - public Builder clearValue() { - - value_ = 0L; - 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.protobuf.Int64Value) - } - - // @@protoc_insertion_point(class_scope:google.protobuf.Int64Value) - private static final com.google.protobuf.Int64Value DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.protobuf.Int64Value(); - } - - public static com.google.protobuf.Int64Value getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Int64Value parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Int64Value(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.protobuf.Int64Value getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int64ValueOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int64ValueOrBuilder.java deleted file mode 100644 index 1931f4b23992..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int64ValueOrBuilder.java +++ /dev/null @@ -1,18 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/wrappers.proto - -package com.google.protobuf; - -public interface Int64ValueOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.protobuf.Int64Value) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int64 value = 1; - * - *
-   * The int64 value.
-   * 
- */ - long getValue(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/ListValue.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/ListValue.java deleted file mode 100644 index d1810635e3ab..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/ListValue.java +++ /dev/null @@ -1,789 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/struct.proto - -package com.google.protobuf; - -/** - * Protobuf type {@code google.protobuf.ListValue} - * - *
- * `ListValue` is a wrapper around a repeated field of values.
- * The JSON representation for `ListValue` is JSON array.
- * 
- */ -public final class ListValue extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.protobuf.ListValue) - ListValueOrBuilder { - // Use ListValue.newBuilder() to construct. - private ListValue(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ListValue() { - values_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private ListValue( - 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)) { - values_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - values_.add(input.readMessage(com.google.protobuf.Value.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)) { - values_ = java.util.Collections.unmodifiableList(values_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.StructProto.internal_static_google_protobuf_ListValue_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.StructProto.internal_static_google_protobuf_ListValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.ListValue.class, com.google.protobuf.ListValue.Builder.class); - } - - public static final int VALUES_FIELD_NUMBER = 1; - private java.util.List values_; - /** - * repeated .google.protobuf.Value values = 1; - * - *
-   * Repeated field of dynamically typed values.
-   * 
- */ - public java.util.List getValuesList() { - return values_; - } - /** - * repeated .google.protobuf.Value values = 1; - * - *
-   * Repeated field of dynamically typed values.
-   * 
- */ - public java.util.List - getValuesOrBuilderList() { - return values_; - } - /** - * repeated .google.protobuf.Value values = 1; - * - *
-   * Repeated field of dynamically typed values.
-   * 
- */ - public int getValuesCount() { - return values_.size(); - } - /** - * repeated .google.protobuf.Value values = 1; - * - *
-   * Repeated field of dynamically typed values.
-   * 
- */ - public com.google.protobuf.Value getValues(int index) { - return values_.get(index); - } - /** - * repeated .google.protobuf.Value values = 1; - * - *
-   * Repeated field of dynamically typed values.
-   * 
- */ - public com.google.protobuf.ValueOrBuilder getValuesOrBuilder( - int index) { - return values_.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 < values_.size(); i++) { - output.writeMessage(1, values_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < values_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, values_.get(i)); - } - 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.protobuf.ListValue)) { - return super.equals(obj); - } - com.google.protobuf.ListValue other = (com.google.protobuf.ListValue) obj; - - boolean result = true; - result = result && getValuesList() - .equals(other.getValuesList()); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); - if (getValuesCount() > 0) { - hash = (37 * hash) + VALUES_FIELD_NUMBER; - hash = (53 * hash) + getValuesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protobuf.ListValue parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.ListValue 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.protobuf.ListValue parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.ListValue parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.protobuf.ListValue parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.ListValue parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.protobuf.ListValue parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.protobuf.ListValue parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.protobuf.ListValue parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.ListValue 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.protobuf.ListValue 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.protobuf.ListValue} - * - *
-   * `ListValue` is a wrapper around a repeated field of values.
-   * The JSON representation for `ListValue` is JSON array.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.protobuf.ListValue) - com.google.protobuf.ListValueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.StructProto.internal_static_google_protobuf_ListValue_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.StructProto.internal_static_google_protobuf_ListValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.ListValue.class, com.google.protobuf.ListValue.Builder.class); - } - - // Construct using com.google.protobuf.ListValue.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getValuesFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (valuesBuilder_ == null) { - values_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - valuesBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.protobuf.StructProto.internal_static_google_protobuf_ListValue_descriptor; - } - - public com.google.protobuf.ListValue getDefaultInstanceForType() { - return com.google.protobuf.ListValue.getDefaultInstance(); - } - - public com.google.protobuf.ListValue build() { - com.google.protobuf.ListValue result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.protobuf.ListValue buildPartial() { - com.google.protobuf.ListValue result = new com.google.protobuf.ListValue(this); - int from_bitField0_ = bitField0_; - if (valuesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - values_ = java.util.Collections.unmodifiableList(values_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.values_ = values_; - } else { - result.values_ = valuesBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.protobuf.ListValue) { - return mergeFrom((com.google.protobuf.ListValue)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.protobuf.ListValue other) { - if (other == com.google.protobuf.ListValue.getDefaultInstance()) return this; - if (valuesBuilder_ == null) { - if (!other.values_.isEmpty()) { - if (values_.isEmpty()) { - values_ = other.values_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureValuesIsMutable(); - values_.addAll(other.values_); - } - onChanged(); - } - } else { - if (!other.values_.isEmpty()) { - if (valuesBuilder_.isEmpty()) { - valuesBuilder_.dispose(); - valuesBuilder_ = null; - values_ = other.values_; - bitField0_ = (bitField0_ & ~0x00000001); - valuesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getValuesFieldBuilder() : null; - } else { - valuesBuilder_.addAllMessages(other.values_); - } - } - } - 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.protobuf.ListValue parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.protobuf.ListValue) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List values_ = - java.util.Collections.emptyList(); - private void ensureValuesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - values_ = new java.util.ArrayList(values_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder> valuesBuilder_; - - /** - * repeated .google.protobuf.Value values = 1; - * - *
-     * Repeated field of dynamically typed values.
-     * 
- */ - public java.util.List getValuesList() { - if (valuesBuilder_ == null) { - return java.util.Collections.unmodifiableList(values_); - } else { - return valuesBuilder_.getMessageList(); - } - } - /** - * repeated .google.protobuf.Value values = 1; - * - *
-     * Repeated field of dynamically typed values.
-     * 
- */ - public int getValuesCount() { - if (valuesBuilder_ == null) { - return values_.size(); - } else { - return valuesBuilder_.getCount(); - } - } - /** - * repeated .google.protobuf.Value values = 1; - * - *
-     * Repeated field of dynamically typed values.
-     * 
- */ - public com.google.protobuf.Value getValues(int index) { - if (valuesBuilder_ == null) { - return values_.get(index); - } else { - return valuesBuilder_.getMessage(index); - } - } - /** - * repeated .google.protobuf.Value values = 1; - * - *
-     * Repeated field of dynamically typed values.
-     * 
- */ - public Builder setValues( - int index, com.google.protobuf.Value value) { - if (valuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValuesIsMutable(); - values_.set(index, value); - onChanged(); - } else { - valuesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Value values = 1; - * - *
-     * Repeated field of dynamically typed values.
-     * 
- */ - public Builder setValues( - int index, com.google.protobuf.Value.Builder builderForValue) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - values_.set(index, builderForValue.build()); - onChanged(); - } else { - valuesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Value values = 1; - * - *
-     * Repeated field of dynamically typed values.
-     * 
- */ - public Builder addValues(com.google.protobuf.Value value) { - if (valuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValuesIsMutable(); - values_.add(value); - onChanged(); - } else { - valuesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.protobuf.Value values = 1; - * - *
-     * Repeated field of dynamically typed values.
-     * 
- */ - public Builder addValues( - int index, com.google.protobuf.Value value) { - if (valuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValuesIsMutable(); - values_.add(index, value); - onChanged(); - } else { - valuesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Value values = 1; - * - *
-     * Repeated field of dynamically typed values.
-     * 
- */ - public Builder addValues( - com.google.protobuf.Value.Builder builderForValue) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - values_.add(builderForValue.build()); - onChanged(); - } else { - valuesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Value values = 1; - * - *
-     * Repeated field of dynamically typed values.
-     * 
- */ - public Builder addValues( - int index, com.google.protobuf.Value.Builder builderForValue) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - values_.add(index, builderForValue.build()); - onChanged(); - } else { - valuesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Value values = 1; - * - *
-     * Repeated field of dynamically typed values.
-     * 
- */ - public Builder addAllValues( - java.lang.Iterable values) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, values_); - onChanged(); - } else { - valuesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.protobuf.Value values = 1; - * - *
-     * Repeated field of dynamically typed values.
-     * 
- */ - public Builder clearValues() { - if (valuesBuilder_ == null) { - values_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - valuesBuilder_.clear(); - } - return this; - } - /** - * repeated .google.protobuf.Value values = 1; - * - *
-     * Repeated field of dynamically typed values.
-     * 
- */ - public Builder removeValues(int index) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - values_.remove(index); - onChanged(); - } else { - valuesBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.protobuf.Value values = 1; - * - *
-     * Repeated field of dynamically typed values.
-     * 
- */ - public com.google.protobuf.Value.Builder getValuesBuilder( - int index) { - return getValuesFieldBuilder().getBuilder(index); - } - /** - * repeated .google.protobuf.Value values = 1; - * - *
-     * Repeated field of dynamically typed values.
-     * 
- */ - public com.google.protobuf.ValueOrBuilder getValuesOrBuilder( - int index) { - if (valuesBuilder_ == null) { - return values_.get(index); } else { - return valuesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.protobuf.Value values = 1; - * - *
-     * Repeated field of dynamically typed values.
-     * 
- */ - public java.util.List - getValuesOrBuilderList() { - if (valuesBuilder_ != null) { - return valuesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(values_); - } - } - /** - * repeated .google.protobuf.Value values = 1; - * - *
-     * Repeated field of dynamically typed values.
-     * 
- */ - public com.google.protobuf.Value.Builder addValuesBuilder() { - return getValuesFieldBuilder().addBuilder( - com.google.protobuf.Value.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Value values = 1; - * - *
-     * Repeated field of dynamically typed values.
-     * 
- */ - public com.google.protobuf.Value.Builder addValuesBuilder( - int index) { - return getValuesFieldBuilder().addBuilder( - index, com.google.protobuf.Value.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Value values = 1; - * - *
-     * Repeated field of dynamically typed values.
-     * 
- */ - public java.util.List - getValuesBuilderList() { - return getValuesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder> - getValuesFieldBuilder() { - if (valuesBuilder_ == null) { - valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder>( - values_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - values_ = null; - } - return valuesBuilder_; - } - 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.protobuf.ListValue) - } - - // @@protoc_insertion_point(class_scope:google.protobuf.ListValue) - private static final com.google.protobuf.ListValue DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.protobuf.ListValue(); - } - - public static com.google.protobuf.ListValue getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ListValue parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ListValue(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.protobuf.ListValue getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/ListValueOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/ListValueOrBuilder.java deleted file mode 100644 index f868e9d45082..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/ListValueOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/struct.proto - -package com.google.protobuf; - -public interface ListValueOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.protobuf.ListValue) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .google.protobuf.Value values = 1; - * - *
-   * Repeated field of dynamically typed values.
-   * 
- */ - java.util.List - getValuesList(); - /** - * repeated .google.protobuf.Value values = 1; - * - *
-   * Repeated field of dynamically typed values.
-   * 
- */ - com.google.protobuf.Value getValues(int index); - /** - * repeated .google.protobuf.Value values = 1; - * - *
-   * Repeated field of dynamically typed values.
-   * 
- */ - int getValuesCount(); - /** - * repeated .google.protobuf.Value values = 1; - * - *
-   * Repeated field of dynamically typed values.
-   * 
- */ - java.util.List - getValuesOrBuilderList(); - /** - * repeated .google.protobuf.Value values = 1; - * - *
-   * Repeated field of dynamically typed values.
-   * 
- */ - com.google.protobuf.ValueOrBuilder getValuesOrBuilder( - int index); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Method.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Method.java deleted file mode 100644 index 5c4daaf3e7dc..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Method.java +++ /dev/null @@ -1,1516 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/api.proto - -package com.google.protobuf; - -/** - * Protobuf type {@code google.protobuf.Method} - * - *
- * Method represents a method of an api.
- * 
- */ -public final class Method extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.protobuf.Method) - MethodOrBuilder { - // Use Method.newBuilder() to construct. - private Method(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Method() { - name_ = ""; - requestTypeUrl_ = ""; - requestStreaming_ = false; - responseTypeUrl_ = ""; - responseStreaming_ = false; - options_ = java.util.Collections.emptyList(); - syntax_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Method( - 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(); - - requestTypeUrl_ = s; - break; - } - case 24: { - - requestStreaming_ = input.readBool(); - break; - } - case 34: { - String s = input.readStringRequireUtf8(); - - responseTypeUrl_ = s; - break; - } - case 40: { - - responseStreaming_ = input.readBool(); - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - options_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - options_.add(input.readMessage(com.google.protobuf.Option.parser(), extensionRegistry)); - break; - } - case 56: { - int rawValue = input.readEnum(); - - syntax_ = rawValue; - 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_ & 0x00000020) == 0x00000020)) { - options_ = java.util.Collections.unmodifiableList(options_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.ApiProto.internal_static_google_protobuf_Method_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.ApiProto.internal_static_google_protobuf_Method_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.Method.class, com.google.protobuf.Method.Builder.class); - } - - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * optional string name = 1; - * - *
-   * The simple name of this method.
-   * 
- */ - 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 simple name of this method.
-   * 
- */ - 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 REQUEST_TYPE_URL_FIELD_NUMBER = 2; - private volatile java.lang.Object requestTypeUrl_; - /** - * optional string request_type_url = 2 [ctype = STRING_PIECE]; - * - *
-   * A URL of the input message type.
-   * 
- */ - public java.lang.String getRequestTypeUrl() { - java.lang.Object ref = requestTypeUrl_; - 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(); - requestTypeUrl_ = s; - return s; - } - } - /** - * optional string request_type_url = 2 [ctype = STRING_PIECE]; - * - *
-   * A URL of the input message type.
-   * 
- */ - public com.google.protobuf.ByteString - getRequestTypeUrlBytes() { - java.lang.Object ref = requestTypeUrl_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - requestTypeUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUEST_STREAMING_FIELD_NUMBER = 3; - private boolean requestStreaming_; - /** - * optional bool request_streaming = 3; - * - *
-   * If true, the request is streamed.
-   * 
- */ - public boolean getRequestStreaming() { - return requestStreaming_; - } - - public static final int RESPONSE_TYPE_URL_FIELD_NUMBER = 4; - private volatile java.lang.Object responseTypeUrl_; - /** - * optional string response_type_url = 4 [ctype = STRING_PIECE]; - * - *
-   * The URL of the output message type.
-   * 
- */ - public java.lang.String getResponseTypeUrl() { - java.lang.Object ref = responseTypeUrl_; - 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(); - responseTypeUrl_ = s; - return s; - } - } - /** - * optional string response_type_url = 4 [ctype = STRING_PIECE]; - * - *
-   * The URL of the output message type.
-   * 
- */ - public com.google.protobuf.ByteString - getResponseTypeUrlBytes() { - java.lang.Object ref = responseTypeUrl_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - responseTypeUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESPONSE_STREAMING_FIELD_NUMBER = 5; - private boolean responseStreaming_; - /** - * optional bool response_streaming = 5; - * - *
-   * If true, the response is streamed.
-   * 
- */ - public boolean getResponseStreaming() { - return responseStreaming_; - } - - public static final int OPTIONS_FIELD_NUMBER = 6; - private java.util.List options_; - /** - * repeated .google.protobuf.Option options = 6; - * - *
-   * Any metadata attached to the method.
-   * 
- */ - public java.util.List getOptionsList() { - return options_; - } - /** - * repeated .google.protobuf.Option options = 6; - * - *
-   * Any metadata attached to the method.
-   * 
- */ - public java.util.List - getOptionsOrBuilderList() { - return options_; - } - /** - * repeated .google.protobuf.Option options = 6; - * - *
-   * Any metadata attached to the method.
-   * 
- */ - public int getOptionsCount() { - return options_.size(); - } - /** - * repeated .google.protobuf.Option options = 6; - * - *
-   * Any metadata attached to the method.
-   * 
- */ - public com.google.protobuf.Option getOptions(int index) { - return options_.get(index); - } - /** - * repeated .google.protobuf.Option options = 6; - * - *
-   * Any metadata attached to the method.
-   * 
- */ - public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( - int index) { - return options_.get(index); - } - - public static final int SYNTAX_FIELD_NUMBER = 7; - private int syntax_; - /** - * optional .google.protobuf.Syntax syntax = 7; - * - *
-   * The source syntax of this method.
-   * 
- */ - public int getSyntaxValue() { - return syntax_; - } - /** - * optional .google.protobuf.Syntax syntax = 7; - * - *
-   * The source syntax of this method.
-   * 
- */ - public com.google.protobuf.Syntax getSyntax() { - com.google.protobuf.Syntax result = com.google.protobuf.Syntax.valueOf(syntax_); - return result == null ? com.google.protobuf.Syntax.UNRECOGNIZED : result; - } - - 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 (!getRequestTypeUrlBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, requestTypeUrl_); - } - if (requestStreaming_ != false) { - output.writeBool(3, requestStreaming_); - } - if (!getResponseTypeUrlBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, responseTypeUrl_); - } - if (responseStreaming_ != false) { - output.writeBool(5, responseStreaming_); - } - for (int i = 0; i < options_.size(); i++) { - output.writeMessage(6, options_.get(i)); - } - if (syntax_ != com.google.protobuf.Syntax.SYNTAX_PROTO2.getNumber()) { - output.writeEnum(7, syntax_); - } - } - - 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 (!getRequestTypeUrlBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestTypeUrl_); - } - if (requestStreaming_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, requestStreaming_); - } - if (!getResponseTypeUrlBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, responseTypeUrl_); - } - if (responseStreaming_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, responseStreaming_); - } - for (int i = 0; i < options_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, options_.get(i)); - } - if (syntax_ != com.google.protobuf.Syntax.SYNTAX_PROTO2.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(7, syntax_); - } - 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.protobuf.Method)) { - return super.equals(obj); - } - com.google.protobuf.Method other = (com.google.protobuf.Method) obj; - - boolean result = true; - result = result && getName() - .equals(other.getName()); - result = result && getRequestTypeUrl() - .equals(other.getRequestTypeUrl()); - result = result && (getRequestStreaming() - == other.getRequestStreaming()); - result = result && getResponseTypeUrl() - .equals(other.getResponseTypeUrl()); - result = result && (getResponseStreaming() - == other.getResponseStreaming()); - result = result && getOptionsList() - .equals(other.getOptionsList()); - result = result && syntax_ == other.syntax_; - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + REQUEST_TYPE_URL_FIELD_NUMBER; - hash = (53 * hash) + getRequestTypeUrl().hashCode(); - hash = (37 * hash) + REQUEST_STREAMING_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getRequestStreaming()); - hash = (37 * hash) + RESPONSE_TYPE_URL_FIELD_NUMBER; - hash = (53 * hash) + getResponseTypeUrl().hashCode(); - hash = (37 * hash) + RESPONSE_STREAMING_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getResponseStreaming()); - if (getOptionsCount() > 0) { - hash = (37 * hash) + OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + getOptionsList().hashCode(); - } - hash = (37 * hash) + SYNTAX_FIELD_NUMBER; - hash = (53 * hash) + syntax_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protobuf.Method parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Method 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.protobuf.Method parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Method parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.protobuf.Method parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.Method parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.protobuf.Method parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.protobuf.Method parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.protobuf.Method parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.Method 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.protobuf.Method 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.protobuf.Method} - * - *
-   * Method represents a method of an api.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.protobuf.Method) - com.google.protobuf.MethodOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.ApiProto.internal_static_google_protobuf_Method_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.ApiProto.internal_static_google_protobuf_Method_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.Method.class, com.google.protobuf.Method.Builder.class); - } - - // Construct using com.google.protobuf.Method.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getOptionsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - requestTypeUrl_ = ""; - - requestStreaming_ = false; - - responseTypeUrl_ = ""; - - responseStreaming_ = false; - - if (optionsBuilder_ == null) { - options_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - optionsBuilder_.clear(); - } - syntax_ = 0; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.protobuf.ApiProto.internal_static_google_protobuf_Method_descriptor; - } - - public com.google.protobuf.Method getDefaultInstanceForType() { - return com.google.protobuf.Method.getDefaultInstance(); - } - - public com.google.protobuf.Method build() { - com.google.protobuf.Method result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.protobuf.Method buildPartial() { - com.google.protobuf.Method result = new com.google.protobuf.Method(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.name_ = name_; - result.requestTypeUrl_ = requestTypeUrl_; - result.requestStreaming_ = requestStreaming_; - result.responseTypeUrl_ = responseTypeUrl_; - result.responseStreaming_ = responseStreaming_; - if (optionsBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { - options_ = java.util.Collections.unmodifiableList(options_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.options_ = options_; - } else { - result.options_ = optionsBuilder_.build(); - } - result.syntax_ = syntax_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.protobuf.Method) { - return mergeFrom((com.google.protobuf.Method)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.protobuf.Method other) { - if (other == com.google.protobuf.Method.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getRequestTypeUrl().isEmpty()) { - requestTypeUrl_ = other.requestTypeUrl_; - onChanged(); - } - if (other.getRequestStreaming() != false) { - setRequestStreaming(other.getRequestStreaming()); - } - if (!other.getResponseTypeUrl().isEmpty()) { - responseTypeUrl_ = other.responseTypeUrl_; - onChanged(); - } - if (other.getResponseStreaming() != false) { - setResponseStreaming(other.getResponseStreaming()); - } - if (optionsBuilder_ == null) { - if (!other.options_.isEmpty()) { - if (options_.isEmpty()) { - options_ = other.options_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureOptionsIsMutable(); - options_.addAll(other.options_); - } - onChanged(); - } - } else { - if (!other.options_.isEmpty()) { - if (optionsBuilder_.isEmpty()) { - optionsBuilder_.dispose(); - optionsBuilder_ = null; - options_ = other.options_; - bitField0_ = (bitField0_ & ~0x00000020); - optionsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getOptionsFieldBuilder() : null; - } else { - optionsBuilder_.addAllMessages(other.options_); - } - } - } - if (other.syntax_ != 0) { - setSyntaxValue(other.getSyntaxValue()); - } - 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.protobuf.Method parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.protobuf.Method) 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 simple name of this method.
-     * 
- */ - 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 simple name of this method.
-     * 
- */ - 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 simple name of this method.
-     * 
- */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The simple name of this method.
-     * 
- */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The simple name of this method.
-     * 
- */ - 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 requestTypeUrl_ = ""; - /** - * optional string request_type_url = 2 [ctype = STRING_PIECE]; - * - *
-     * A URL of the input message type.
-     * 
- */ - public java.lang.String getRequestTypeUrl() { - java.lang.Object ref = requestTypeUrl_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestTypeUrl_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string request_type_url = 2 [ctype = STRING_PIECE]; - * - *
-     * A URL of the input message type.
-     * 
- */ - public com.google.protobuf.ByteString - getRequestTypeUrlBytes() { - java.lang.Object ref = requestTypeUrl_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - requestTypeUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string request_type_url = 2 [ctype = STRING_PIECE]; - * - *
-     * A URL of the input message type.
-     * 
- */ - public Builder setRequestTypeUrl( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - requestTypeUrl_ = value; - onChanged(); - return this; - } - /** - * optional string request_type_url = 2 [ctype = STRING_PIECE]; - * - *
-     * A URL of the input message type.
-     * 
- */ - public Builder clearRequestTypeUrl() { - - requestTypeUrl_ = getDefaultInstance().getRequestTypeUrl(); - onChanged(); - return this; - } - /** - * optional string request_type_url = 2 [ctype = STRING_PIECE]; - * - *
-     * A URL of the input message type.
-     * 
- */ - public Builder setRequestTypeUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - requestTypeUrl_ = value; - onChanged(); - return this; - } - - private boolean requestStreaming_ ; - /** - * optional bool request_streaming = 3; - * - *
-     * If true, the request is streamed.
-     * 
- */ - public boolean getRequestStreaming() { - return requestStreaming_; - } - /** - * optional bool request_streaming = 3; - * - *
-     * If true, the request is streamed.
-     * 
- */ - public Builder setRequestStreaming(boolean value) { - - requestStreaming_ = value; - onChanged(); - return this; - } - /** - * optional bool request_streaming = 3; - * - *
-     * If true, the request is streamed.
-     * 
- */ - public Builder clearRequestStreaming() { - - requestStreaming_ = false; - onChanged(); - return this; - } - - private java.lang.Object responseTypeUrl_ = ""; - /** - * optional string response_type_url = 4 [ctype = STRING_PIECE]; - * - *
-     * The URL of the output message type.
-     * 
- */ - public java.lang.String getResponseTypeUrl() { - java.lang.Object ref = responseTypeUrl_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - responseTypeUrl_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string response_type_url = 4 [ctype = STRING_PIECE]; - * - *
-     * The URL of the output message type.
-     * 
- */ - public com.google.protobuf.ByteString - getResponseTypeUrlBytes() { - java.lang.Object ref = responseTypeUrl_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - responseTypeUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string response_type_url = 4 [ctype = STRING_PIECE]; - * - *
-     * The URL of the output message type.
-     * 
- */ - public Builder setResponseTypeUrl( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - responseTypeUrl_ = value; - onChanged(); - return this; - } - /** - * optional string response_type_url = 4 [ctype = STRING_PIECE]; - * - *
-     * The URL of the output message type.
-     * 
- */ - public Builder clearResponseTypeUrl() { - - responseTypeUrl_ = getDefaultInstance().getResponseTypeUrl(); - onChanged(); - return this; - } - /** - * optional string response_type_url = 4 [ctype = STRING_PIECE]; - * - *
-     * The URL of the output message type.
-     * 
- */ - public Builder setResponseTypeUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - responseTypeUrl_ = value; - onChanged(); - return this; - } - - private boolean responseStreaming_ ; - /** - * optional bool response_streaming = 5; - * - *
-     * If true, the response is streamed.
-     * 
- */ - public boolean getResponseStreaming() { - return responseStreaming_; - } - /** - * optional bool response_streaming = 5; - * - *
-     * If true, the response is streamed.
-     * 
- */ - public Builder setResponseStreaming(boolean value) { - - responseStreaming_ = value; - onChanged(); - return this; - } - /** - * optional bool response_streaming = 5; - * - *
-     * If true, the response is streamed.
-     * 
- */ - public Builder clearResponseStreaming() { - - responseStreaming_ = false; - onChanged(); - return this; - } - - private java.util.List options_ = - java.util.Collections.emptyList(); - private void ensureOptionsIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - options_ = new java.util.ArrayList(options_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> optionsBuilder_; - - /** - * repeated .google.protobuf.Option options = 6; - * - *
-     * Any metadata attached to the method.
-     * 
- */ - public java.util.List getOptionsList() { - if (optionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(options_); - } else { - return optionsBuilder_.getMessageList(); - } - } - /** - * repeated .google.protobuf.Option options = 6; - * - *
-     * Any metadata attached to the method.
-     * 
- */ - public int getOptionsCount() { - if (optionsBuilder_ == null) { - return options_.size(); - } else { - return optionsBuilder_.getCount(); - } - } - /** - * repeated .google.protobuf.Option options = 6; - * - *
-     * Any metadata attached to the method.
-     * 
- */ - public com.google.protobuf.Option getOptions(int index) { - if (optionsBuilder_ == null) { - return options_.get(index); - } else { - return optionsBuilder_.getMessage(index); - } - } - /** - * repeated .google.protobuf.Option options = 6; - * - *
-     * Any metadata attached to the method.
-     * 
- */ - public Builder setOptions( - int index, com.google.protobuf.Option value) { - if (optionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOptionsIsMutable(); - options_.set(index, value); - onChanged(); - } else { - optionsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 6; - * - *
-     * Any metadata attached to the method.
-     * 
- */ - public Builder setOptions( - int index, com.google.protobuf.Option.Builder builderForValue) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - options_.set(index, builderForValue.build()); - onChanged(); - } else { - optionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 6; - * - *
-     * Any metadata attached to the method.
-     * 
- */ - public Builder addOptions(com.google.protobuf.Option value) { - if (optionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOptionsIsMutable(); - options_.add(value); - onChanged(); - } else { - optionsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 6; - * - *
-     * Any metadata attached to the method.
-     * 
- */ - public Builder addOptions( - int index, com.google.protobuf.Option value) { - if (optionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOptionsIsMutable(); - options_.add(index, value); - onChanged(); - } else { - optionsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 6; - * - *
-     * Any metadata attached to the method.
-     * 
- */ - public Builder addOptions( - com.google.protobuf.Option.Builder builderForValue) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - options_.add(builderForValue.build()); - onChanged(); - } else { - optionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 6; - * - *
-     * Any metadata attached to the method.
-     * 
- */ - public Builder addOptions( - int index, com.google.protobuf.Option.Builder builderForValue) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - options_.add(index, builderForValue.build()); - onChanged(); - } else { - optionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 6; - * - *
-     * Any metadata attached to the method.
-     * 
- */ - public Builder addAllOptions( - java.lang.Iterable values) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, options_); - onChanged(); - } else { - optionsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 6; - * - *
-     * Any metadata attached to the method.
-     * 
- */ - public Builder clearOptions() { - if (optionsBuilder_ == null) { - options_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - optionsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 6; - * - *
-     * Any metadata attached to the method.
-     * 
- */ - public Builder removeOptions(int index) { - if (optionsBuilder_ == null) { - ensureOptionsIsMutable(); - options_.remove(index); - onChanged(); - } else { - optionsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.protobuf.Option options = 6; - * - *
-     * Any metadata attached to the method.
-     * 
- */ - public com.google.protobuf.Option.Builder getOptionsBuilder( - int index) { - return getOptionsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.protobuf.Option options = 6; - * - *
-     * Any metadata attached to the method.
-     * 
- */ - public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( - int index) { - if (optionsBuilder_ == null) { - return options_.get(index); } else { - return optionsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.protobuf.Option options = 6; - * - *
-     * Any metadata attached to the method.
-     * 
- */ - public java.util.List - getOptionsOrBuilderList() { - if (optionsBuilder_ != null) { - return optionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(options_); - } - } - /** - * repeated .google.protobuf.Option options = 6; - * - *
-     * Any metadata attached to the method.
-     * 
- */ - public com.google.protobuf.Option.Builder addOptionsBuilder() { - return getOptionsFieldBuilder().addBuilder( - com.google.protobuf.Option.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Option options = 6; - * - *
-     * Any metadata attached to the method.
-     * 
- */ - public com.google.protobuf.Option.Builder addOptionsBuilder( - int index) { - return getOptionsFieldBuilder().addBuilder( - index, com.google.protobuf.Option.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Option options = 6; - * - *
-     * Any metadata attached to the method.
-     * 
- */ - public java.util.List - getOptionsBuilderList() { - return getOptionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> - getOptionsFieldBuilder() { - if (optionsBuilder_ == null) { - optionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder>( - options_, - ((bitField0_ & 0x00000020) == 0x00000020), - getParentForChildren(), - isClean()); - options_ = null; - } - return optionsBuilder_; - } - - private int syntax_ = 0; - /** - * optional .google.protobuf.Syntax syntax = 7; - * - *
-     * The source syntax of this method.
-     * 
- */ - public int getSyntaxValue() { - return syntax_; - } - /** - * optional .google.protobuf.Syntax syntax = 7; - * - *
-     * The source syntax of this method.
-     * 
- */ - public Builder setSyntaxValue(int value) { - syntax_ = value; - onChanged(); - return this; - } - /** - * optional .google.protobuf.Syntax syntax = 7; - * - *
-     * The source syntax of this method.
-     * 
- */ - public com.google.protobuf.Syntax getSyntax() { - com.google.protobuf.Syntax result = com.google.protobuf.Syntax.valueOf(syntax_); - return result == null ? com.google.protobuf.Syntax.UNRECOGNIZED : result; - } - /** - * optional .google.protobuf.Syntax syntax = 7; - * - *
-     * The source syntax of this method.
-     * 
- */ - public Builder setSyntax(com.google.protobuf.Syntax value) { - if (value == null) { - throw new NullPointerException(); - } - - syntax_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .google.protobuf.Syntax syntax = 7; - * - *
-     * The source syntax of this method.
-     * 
- */ - public Builder clearSyntax() { - - syntax_ = 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.protobuf.Method) - } - - // @@protoc_insertion_point(class_scope:google.protobuf.Method) - private static final com.google.protobuf.Method DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.protobuf.Method(); - } - - public static com.google.protobuf.Method getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Method parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Method(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.protobuf.Method getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/MethodOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/MethodOrBuilder.java deleted file mode 100644 index 592dd33ad01c..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/MethodOrBuilder.java +++ /dev/null @@ -1,142 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/api.proto - -package com.google.protobuf; - -public interface MethodOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.protobuf.Method) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string name = 1; - * - *
-   * The simple name of this method.
-   * 
- */ - java.lang.String getName(); - /** - * optional string name = 1; - * - *
-   * The simple name of this method.
-   * 
- */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * optional string request_type_url = 2 [ctype = STRING_PIECE]; - * - *
-   * A URL of the input message type.
-   * 
- */ - java.lang.String getRequestTypeUrl(); - /** - * optional string request_type_url = 2 [ctype = STRING_PIECE]; - * - *
-   * A URL of the input message type.
-   * 
- */ - com.google.protobuf.ByteString - getRequestTypeUrlBytes(); - - /** - * optional bool request_streaming = 3; - * - *
-   * If true, the request is streamed.
-   * 
- */ - boolean getRequestStreaming(); - - /** - * optional string response_type_url = 4 [ctype = STRING_PIECE]; - * - *
-   * The URL of the output message type.
-   * 
- */ - java.lang.String getResponseTypeUrl(); - /** - * optional string response_type_url = 4 [ctype = STRING_PIECE]; - * - *
-   * The URL of the output message type.
-   * 
- */ - com.google.protobuf.ByteString - getResponseTypeUrlBytes(); - - /** - * optional bool response_streaming = 5; - * - *
-   * If true, the response is streamed.
-   * 
- */ - boolean getResponseStreaming(); - - /** - * repeated .google.protobuf.Option options = 6; - * - *
-   * Any metadata attached to the method.
-   * 
- */ - java.util.List - getOptionsList(); - /** - * repeated .google.protobuf.Option options = 6; - * - *
-   * Any metadata attached to the method.
-   * 
- */ - com.google.protobuf.Option getOptions(int index); - /** - * repeated .google.protobuf.Option options = 6; - * - *
-   * Any metadata attached to the method.
-   * 
- */ - int getOptionsCount(); - /** - * repeated .google.protobuf.Option options = 6; - * - *
-   * Any metadata attached to the method.
-   * 
- */ - java.util.List - getOptionsOrBuilderList(); - /** - * repeated .google.protobuf.Option options = 6; - * - *
-   * Any metadata attached to the method.
-   * 
- */ - com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( - int index); - - /** - * optional .google.protobuf.Syntax syntax = 7; - * - *
-   * The source syntax of this method.
-   * 
- */ - int getSyntaxValue(); - /** - * optional .google.protobuf.Syntax syntax = 7; - * - *
-   * The source syntax of this method.
-   * 
- */ - com.google.protobuf.Syntax getSyntax(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Mixin.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Mixin.java deleted file mode 100644 index ef8aaf0e07d4..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Mixin.java +++ /dev/null @@ -1,790 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/api.proto - -package com.google.protobuf; - -/** - * Protobuf type {@code google.protobuf.Mixin} - * - *
- * Declares an API to be included in this API. The including API must
- * redeclare all the methods from the included API, but documentation
- * and options are inherited as follows:
- * - If after comment and whitespace stripping, the documentation
- *   string of the redeclared method is empty, it will be inherited
- *   from the original method.
- * - Each annotation belonging to the service config (http,
- *   visibility) which is not set in the redeclared method will be
- *   inherited.
- * - If an http annotation is inherited, the path pattern will be
- *   modified as follows. Any version prefix will be replaced by the
- *   version of the including API plus the [root][] path if specified.
- * Example of a simple mixin:
- *     package google.acl.v1;
- *     service AccessControl {
- *       // Get the underlying ACL object.
- *       rpc GetAcl(GetAclRequest) returns (Acl) {
- *         option (google.api.http).get = "/v1/{resource=**}:getAcl";
- *       }
- *     }
- *     package google.storage.v2;
- *     service Storage {
- *       // (-- see AccessControl.GetAcl --)
- *       rpc GetAcl(GetAclRequest) returns (Acl);
- *       // Get a data record.
- *       rpc GetData(GetDataRequest) returns (Data) {
- *         option (google.api.http).get = "/v2/{resource=**}";
- *       }
- *     }
- * Example of a mixin configuration:
- *     apis:
- *     - name: google.storage.v2.Storage
- *       mixins:
- *       - name: google.acl.v1.AccessControl
- * The mixin construct implies that all methods in `AccessControl` are
- * also declared with same name and request/response types in
- * `Storage`. A documentation generator or annotation processor will
- * see the effective `Storage.GetAcl` method after inherting
- * documentation and annotations as follows:
- *     service Storage {
- *       // Get the underlying ACL object.
- *       rpc GetAcl(GetAclRequest) returns (Acl) {
- *         option (google.api.http).get = "/v2/{resource=**}:getAcl";
- *       }
- *       ...
- *     }
- * Note how the version in the path pattern changed from `v1` to `v2`.
- * If the `root` field in the mixin is specified, it should be a
- * relative path under which inherited HTTP paths are placed. Example:
- *     apis:
- *     - name: google.storage.v2.Storage
- *       mixins:
- *       - name: google.acl.v1.AccessControl
- *         root: acls
- * This implies the following inherited HTTP annotation:
- *     service Storage {
- *       // Get the underlying ACL object.
- *       rpc GetAcl(GetAclRequest) returns (Acl) {
- *         option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
- *       }
- *       ...
- *     }
- * 
- */ -public final class Mixin extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.protobuf.Mixin) - MixinOrBuilder { - // Use Mixin.newBuilder() to construct. - private Mixin(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Mixin() { - name_ = ""; - root_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Mixin( - 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(); - - root_ = 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.protobuf.ApiProto.internal_static_google_protobuf_Mixin_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.ApiProto.internal_static_google_protobuf_Mixin_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.Mixin.class, com.google.protobuf.Mixin.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * optional string name = 1; - * - *
-   * The fully qualified name of the API which is included.
-   * 
- */ - 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 fully qualified name of the API which is included.
-   * 
- */ - 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 ROOT_FIELD_NUMBER = 2; - private volatile java.lang.Object root_; - /** - * optional string root = 2; - * - *
-   * If non-empty specifies a path under which inherited HTTP paths
-   * are rooted.
-   * 
- */ - public java.lang.String getRoot() { - java.lang.Object ref = root_; - 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(); - root_ = s; - return s; - } - } - /** - * optional string root = 2; - * - *
-   * If non-empty specifies a path under which inherited HTTP paths
-   * are rooted.
-   * 
- */ - public com.google.protobuf.ByteString - getRootBytes() { - java.lang.Object ref = root_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - root_ = 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_); - } - if (!getRootBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, root_); - } - } - - 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 (!getRootBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, root_); - } - 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.protobuf.Mixin)) { - return super.equals(obj); - } - com.google.protobuf.Mixin other = (com.google.protobuf.Mixin) obj; - - boolean result = true; - result = result && getName() - .equals(other.getName()); - result = result && getRoot() - .equals(other.getRoot()); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + ROOT_FIELD_NUMBER; - hash = (53 * hash) + getRoot().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protobuf.Mixin parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Mixin 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.protobuf.Mixin parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Mixin parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.protobuf.Mixin parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.Mixin parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.protobuf.Mixin parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.protobuf.Mixin parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.protobuf.Mixin parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.Mixin 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.protobuf.Mixin 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.protobuf.Mixin} - * - *
-   * Declares an API to be included in this API. The including API must
-   * redeclare all the methods from the included API, but documentation
-   * and options are inherited as follows:
-   * - If after comment and whitespace stripping, the documentation
-   *   string of the redeclared method is empty, it will be inherited
-   *   from the original method.
-   * - Each annotation belonging to the service config (http,
-   *   visibility) which is not set in the redeclared method will be
-   *   inherited.
-   * - If an http annotation is inherited, the path pattern will be
-   *   modified as follows. Any version prefix will be replaced by the
-   *   version of the including API plus the [root][] path if specified.
-   * Example of a simple mixin:
-   *     package google.acl.v1;
-   *     service AccessControl {
-   *       // Get the underlying ACL object.
-   *       rpc GetAcl(GetAclRequest) returns (Acl) {
-   *         option (google.api.http).get = "/v1/{resource=**}:getAcl";
-   *       }
-   *     }
-   *     package google.storage.v2;
-   *     service Storage {
-   *       // (-- see AccessControl.GetAcl --)
-   *       rpc GetAcl(GetAclRequest) returns (Acl);
-   *       // Get a data record.
-   *       rpc GetData(GetDataRequest) returns (Data) {
-   *         option (google.api.http).get = "/v2/{resource=**}";
-   *       }
-   *     }
-   * Example of a mixin configuration:
-   *     apis:
-   *     - name: google.storage.v2.Storage
-   *       mixins:
-   *       - name: google.acl.v1.AccessControl
-   * The mixin construct implies that all methods in `AccessControl` are
-   * also declared with same name and request/response types in
-   * `Storage`. A documentation generator or annotation processor will
-   * see the effective `Storage.GetAcl` method after inherting
-   * documentation and annotations as follows:
-   *     service Storage {
-   *       // Get the underlying ACL object.
-   *       rpc GetAcl(GetAclRequest) returns (Acl) {
-   *         option (google.api.http).get = "/v2/{resource=**}:getAcl";
-   *       }
-   *       ...
-   *     }
-   * Note how the version in the path pattern changed from `v1` to `v2`.
-   * If the `root` field in the mixin is specified, it should be a
-   * relative path under which inherited HTTP paths are placed. Example:
-   *     apis:
-   *     - name: google.storage.v2.Storage
-   *       mixins:
-   *       - name: google.acl.v1.AccessControl
-   *         root: acls
-   * This implies the following inherited HTTP annotation:
-   *     service Storage {
-   *       // Get the underlying ACL object.
-   *       rpc GetAcl(GetAclRequest) returns (Acl) {
-   *         option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
-   *       }
-   *       ...
-   *     }
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.protobuf.Mixin) - com.google.protobuf.MixinOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.ApiProto.internal_static_google_protobuf_Mixin_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.ApiProto.internal_static_google_protobuf_Mixin_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.Mixin.class, com.google.protobuf.Mixin.Builder.class); - } - - // Construct using com.google.protobuf.Mixin.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_ = ""; - - root_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.protobuf.ApiProto.internal_static_google_protobuf_Mixin_descriptor; - } - - public com.google.protobuf.Mixin getDefaultInstanceForType() { - return com.google.protobuf.Mixin.getDefaultInstance(); - } - - public com.google.protobuf.Mixin build() { - com.google.protobuf.Mixin result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.protobuf.Mixin buildPartial() { - com.google.protobuf.Mixin result = new com.google.protobuf.Mixin(this); - result.name_ = name_; - result.root_ = root_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.protobuf.Mixin) { - return mergeFrom((com.google.protobuf.Mixin)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.protobuf.Mixin other) { - if (other == com.google.protobuf.Mixin.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getRoot().isEmpty()) { - root_ = other.root_; - 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.protobuf.Mixin parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.protobuf.Mixin) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - * - *
-     * The fully qualified name of the API which is included.
-     * 
- */ - 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 fully qualified name of the API which is included.
-     * 
- */ - 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 fully qualified name of the API which is included.
-     * 
- */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The fully qualified name of the API which is included.
-     * 
- */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The fully qualified name of the API which is included.
-     * 
- */ - 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 root_ = ""; - /** - * optional string root = 2; - * - *
-     * If non-empty specifies a path under which inherited HTTP paths
-     * are rooted.
-     * 
- */ - public java.lang.String getRoot() { - java.lang.Object ref = root_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - root_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string root = 2; - * - *
-     * If non-empty specifies a path under which inherited HTTP paths
-     * are rooted.
-     * 
- */ - public com.google.protobuf.ByteString - getRootBytes() { - java.lang.Object ref = root_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - root_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string root = 2; - * - *
-     * If non-empty specifies a path under which inherited HTTP paths
-     * are rooted.
-     * 
- */ - public Builder setRoot( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - root_ = value; - onChanged(); - return this; - } - /** - * optional string root = 2; - * - *
-     * If non-empty specifies a path under which inherited HTTP paths
-     * are rooted.
-     * 
- */ - public Builder clearRoot() { - - root_ = getDefaultInstance().getRoot(); - onChanged(); - return this; - } - /** - * optional string root = 2; - * - *
-     * If non-empty specifies a path under which inherited HTTP paths
-     * are rooted.
-     * 
- */ - public Builder setRootBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - root_ = 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.protobuf.Mixin) - } - - // @@protoc_insertion_point(class_scope:google.protobuf.Mixin) - private static final com.google.protobuf.Mixin DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.protobuf.Mixin(); - } - - public static com.google.protobuf.Mixin getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Mixin parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Mixin(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.protobuf.Mixin getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/MixinOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/MixinOrBuilder.java deleted file mode 100644 index 1ffcb50e4e00..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/MixinOrBuilder.java +++ /dev/null @@ -1,47 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/api.proto - -package com.google.protobuf; - -public interface MixinOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.protobuf.Mixin) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string name = 1; - * - *
-   * The fully qualified name of the API which is included.
-   * 
- */ - java.lang.String getName(); - /** - * optional string name = 1; - * - *
-   * The fully qualified name of the API which is included.
-   * 
- */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * optional string root = 2; - * - *
-   * If non-empty specifies a path under which inherited HTTP paths
-   * are rooted.
-   * 
- */ - java.lang.String getRoot(); - /** - * optional string root = 2; - * - *
-   * If non-empty specifies a path under which inherited HTTP paths
-   * are rooted.
-   * 
- */ - com.google.protobuf.ByteString - getRootBytes(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/NullValue.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/NullValue.java deleted file mode 100644 index 5fcf0cc0d0da..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/NullValue.java +++ /dev/null @@ -1,103 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/struct.proto - -package com.google.protobuf; - -/** - * Protobuf enum {@code google.protobuf.NullValue} - * - *
- * `NullValue` is a singleton enumeration to represent the null value for the
- * `Value` type union.
- *  The JSON representation for `NullValue` is JSON `null`.
- * 
- */ -public enum NullValue - implements com.google.protobuf.ProtocolMessageEnum { - /** - * NULL_VALUE = 0; - * - *
-   * Null value.
-   * 
- */ - NULL_VALUE(0, 0), - UNRECOGNIZED(-1, -1), - ; - - /** - * NULL_VALUE = 0; - * - *
-   * Null value.
-   * 
- */ - public static final int NULL_VALUE_VALUE = 0; - - - 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 NullValue valueOf(int value) { - switch (value) { - case 0: return NULL_VALUE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - NullValue> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public NullValue findValueByNumber(int number) { - return NullValue.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.protobuf.StructProto.getDescriptor() - .getEnumTypes().get(0); - } - - private static final NullValue[] VALUES = values(); - - public static NullValue 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 NullValue(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.protobuf.NullValue) -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Option.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Option.java deleted file mode 100644 index b0504cc19557..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Option.java +++ /dev/null @@ -1,737 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/type.proto - -package com.google.protobuf; - -/** - * Protobuf type {@code google.protobuf.Option} - * - *
- * A protocol buffer option, which can be attached to a message, field,
- * enumeration, etc.
- * 
- */ -public final class Option extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.protobuf.Option) - OptionOrBuilder { - // Use Option.newBuilder() to construct. - private Option(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Option() { - name_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Option( - 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 (value_ != null) { - subBuilder = value_.toBuilder(); - } - value_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(value_); - value_ = 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.protobuf.TypeProto.internal_static_google_protobuf_Option_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.TypeProto.internal_static_google_protobuf_Option_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.Option.class, com.google.protobuf.Option.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * optional string name = 1; - * - *
-   * The option's name. For example, `"java_package"`.
-   * 
- */ - 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 option's name. For example, `"java_package"`.
-   * 
- */ - 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 VALUE_FIELD_NUMBER = 2; - private com.google.protobuf.Any value_; - /** - * optional .google.protobuf.Any value = 2; - * - *
-   * The option's value. For example, `"com.google.protobuf"`.
-   * 
- */ - public boolean hasValue() { - return value_ != null; - } - /** - * optional .google.protobuf.Any value = 2; - * - *
-   * The option's value. For example, `"com.google.protobuf"`.
-   * 
- */ - public com.google.protobuf.Any getValue() { - return value_ == null ? com.google.protobuf.Any.getDefaultInstance() : value_; - } - /** - * optional .google.protobuf.Any value = 2; - * - *
-   * The option's value. For example, `"com.google.protobuf"`.
-   * 
- */ - public com.google.protobuf.AnyOrBuilder getValueOrBuilder() { - return getValue(); - } - - 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 (value_ != null) { - output.writeMessage(2, getValue()); - } - } - - 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 (value_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getValue()); - } - 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.protobuf.Option)) { - return super.equals(obj); - } - com.google.protobuf.Option other = (com.google.protobuf.Option) obj; - - boolean result = true; - result = result && getName() - .equals(other.getName()); - result = result && (hasValue() == other.hasValue()); - if (hasValue()) { - result = result && getValue() - .equals(other.getValue()); - } - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasValue()) { - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protobuf.Option parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Option 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.protobuf.Option parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Option parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.protobuf.Option parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.Option parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.protobuf.Option parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.protobuf.Option parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.protobuf.Option parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.protobuf.Option 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.protobuf.Option 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.protobuf.Option} - * - *
-   * A protocol buffer option, which can be attached to a message, field,
-   * enumeration, etc.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.protobuf.Option) - com.google.protobuf.OptionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.TypeProto.internal_static_google_protobuf_Option_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.TypeProto.internal_static_google_protobuf_Option_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.Option.class, com.google.protobuf.Option.Builder.class); - } - - // Construct using com.google.protobuf.Option.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 (valueBuilder_ == null) { - value_ = null; - } else { - value_ = null; - valueBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.protobuf.TypeProto.internal_static_google_protobuf_Option_descriptor; - } - - public com.google.protobuf.Option getDefaultInstanceForType() { - return com.google.protobuf.Option.getDefaultInstance(); - } - - public com.google.protobuf.Option build() { - com.google.protobuf.Option result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.protobuf.Option buildPartial() { - com.google.protobuf.Option result = new com.google.protobuf.Option(this); - result.name_ = name_; - if (valueBuilder_ == null) { - result.value_ = value_; - } else { - result.value_ = valueBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.protobuf.Option) { - return mergeFrom((com.google.protobuf.Option)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.protobuf.Option other) { - if (other == com.google.protobuf.Option.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasValue()) { - mergeValue(other.getValue()); - } - 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.protobuf.Option parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.protobuf.Option) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - * - *
-     * The option's name. For example, `"java_package"`.
-     * 
- */ - 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 option's name. For example, `"java_package"`.
-     * 
- */ - 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 option's name. For example, `"java_package"`.
-     * 
- */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The option's name. For example, `"java_package"`.
-     * 
- */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The option's name. For example, `"java_package"`.
-     * 
- */ - 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 value_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> valueBuilder_; - /** - * optional .google.protobuf.Any value = 2; - * - *
-     * The option's value. For example, `"com.google.protobuf"`.
-     * 
- */ - public boolean hasValue() { - return valueBuilder_ != null || value_ != null; - } - /** - * optional .google.protobuf.Any value = 2; - * - *
-     * The option's value. For example, `"com.google.protobuf"`.
-     * 
- */ - public com.google.protobuf.Any getValue() { - if (valueBuilder_ == null) { - return value_ == null ? com.google.protobuf.Any.getDefaultInstance() : value_; - } else { - return valueBuilder_.getMessage(); - } - } - /** - * optional .google.protobuf.Any value = 2; - * - *
-     * The option's value. For example, `"com.google.protobuf"`.
-     * 
- */ - public Builder setValue(com.google.protobuf.Any value) { - if (valueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - value_ = value; - onChanged(); - } else { - valueBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.protobuf.Any value = 2; - * - *
-     * The option's value. For example, `"com.google.protobuf"`.
-     * 
- */ - public Builder setValue( - com.google.protobuf.Any.Builder builderForValue) { - if (valueBuilder_ == null) { - value_ = builderForValue.build(); - onChanged(); - } else { - valueBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.protobuf.Any value = 2; - * - *
-     * The option's value. For example, `"com.google.protobuf"`.
-     * 
- */ - public Builder mergeValue(com.google.protobuf.Any value) { - if (valueBuilder_ == null) { - if (value_ != null) { - value_ = - com.google.protobuf.Any.newBuilder(value_).mergeFrom(value).buildPartial(); - } else { - value_ = value; - } - onChanged(); - } else { - valueBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.protobuf.Any value = 2; - * - *
-     * The option's value. For example, `"com.google.protobuf"`.
-     * 
- */ - public Builder clearValue() { - if (valueBuilder_ == null) { - value_ = null; - onChanged(); - } else { - value_ = null; - valueBuilder_ = null; - } - - return this; - } - /** - * optional .google.protobuf.Any value = 2; - * - *
-     * The option's value. For example, `"com.google.protobuf"`.
-     * 
- */ - public com.google.protobuf.Any.Builder getValueBuilder() { - - onChanged(); - return getValueFieldBuilder().getBuilder(); - } - /** - * optional .google.protobuf.Any value = 2; - * - *
-     * The option's value. For example, `"com.google.protobuf"`.
-     * 
- */ - public com.google.protobuf.AnyOrBuilder getValueOrBuilder() { - if (valueBuilder_ != null) { - return valueBuilder_.getMessageOrBuilder(); - } else { - return value_ == null ? - com.google.protobuf.Any.getDefaultInstance() : value_; - } - } - /** - * optional .google.protobuf.Any value = 2; - * - *
-     * The option's value. For example, `"com.google.protobuf"`.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getValueFieldBuilder() { - if (valueBuilder_ == null) { - valueBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - getValue(), - getParentForChildren(), - isClean()); - value_ = null; - } - return valueBuilder_; - } - 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.protobuf.Option) - } - - // @@protoc_insertion_point(class_scope:google.protobuf.Option) - private static final com.google.protobuf.Option DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.protobuf.Option(); - } - - public static com.google.protobuf.Option getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser