diff --git a/google-cloud-logging/clirr-ignored-differences.xml b/google-cloud-logging/clirr-ignored-differences.xml new file mode 100644 index 000000000..de48b6a5f --- /dev/null +++ b/google-cloud-logging/clirr-ignored-differences.xml @@ -0,0 +1,23 @@ + + + + + + 7005 + com/google/cloud/logging/v2/ConfigClient + * *(com.google.logging.v2.*Name*) + * *(com.google.logging.v2.*Name*) + + + 7005 + com/google/cloud/logging/v2/MetricsClient + * *LogMetric*(com.google.logging.v2.*Name*) + * *LogMetric*(com.google.logging.v2.*Name*) + + + 7005 + com/google/cloud/logging/v2/LoggingClient + * listLogs(com.google.logging.v2.ParentName) + * listLogs(com.google.logging.v2.ProjectName) + + \ No newline at end of file diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/LogEntry.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/LogEntry.java index ef0640b15..f1ea52d9e 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/LogEntry.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/LogEntry.java @@ -24,7 +24,7 @@ import com.google.common.collect.ImmutableMap; import com.google.logging.v2.LogEntryOperation; import com.google.logging.v2.LogEntrySourceLocation; -import com.google.logging.v2.ProjectLogName; +import com.google.logging.v2.LogName; import com.google.protobuf.Timestamp; import java.io.Serializable; import java.util.HashMap; @@ -466,7 +466,7 @@ com.google.logging.v2.LogEntry toPb(String projectId) { com.google.logging.v2.LogEntry.Builder builder = payload.toPb(); builder.putAllLabels(labels); if (logName != null) { - builder.setLogName(ProjectLogName.of(projectId, logName).toString()); + builder.setLogName(LogName.ofProjectLogName(projectId, logName).toString()); } if (resource != null) { builder.setResource(resource.toPb()); @@ -525,7 +525,7 @@ static LogEntry fromPb(com.google.logging.v2.LogEntry entryPb) { builder.setLabels(entryPb.getLabelsMap()); builder.setSeverity(Severity.fromPb(entryPb.getSeverity())); if (!entryPb.getLogName().equals("")) { - builder.setLogName(ProjectLogName.parse(entryPb.getLogName()).getLog()); + builder.setLogName(LogName.parse(entryPb.getLogName()).getLog()); } if (!entryPb.getResource().equals(com.google.api.MonitoredResource.getDefaultInstance())) { builder.setResource(MonitoredResource.fromPb(entryPb.getResource())); diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingImpl.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingImpl.java index e2a3c28ad..21d60fb27 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingImpl.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingImpl.java @@ -46,29 +46,7 @@ import com.google.common.collect.Maps; import com.google.common.util.concurrent.MoreExecutors; import com.google.common.util.concurrent.Uninterruptibles; -import com.google.logging.v2.CreateLogMetricRequest; -import com.google.logging.v2.CreateSinkRequest; -import com.google.logging.v2.DeleteLogMetricRequest; -import com.google.logging.v2.DeleteLogRequest; -import com.google.logging.v2.DeleteSinkRequest; -import com.google.logging.v2.GetLogMetricRequest; -import com.google.logging.v2.GetSinkRequest; -import com.google.logging.v2.ListLogEntriesRequest; -import com.google.logging.v2.ListLogEntriesResponse; -import com.google.logging.v2.ListLogMetricsRequest; -import com.google.logging.v2.ListLogMetricsResponse; -import com.google.logging.v2.ListMonitoredResourceDescriptorsRequest; -import com.google.logging.v2.ListMonitoredResourceDescriptorsResponse; -import com.google.logging.v2.ListSinksRequest; -import com.google.logging.v2.ListSinksResponse; -import com.google.logging.v2.ProjectLogName; -import com.google.logging.v2.ProjectMetricName; -import com.google.logging.v2.ProjectName; -import com.google.logging.v2.ProjectSinkName; -import com.google.logging.v2.UpdateLogMetricRequest; -import com.google.logging.v2.UpdateSinkRequest; -import com.google.logging.v2.WriteLogEntriesRequest; -import com.google.logging.v2.WriteLogEntriesResponse; +import com.google.logging.v2.*; import com.google.protobuf.Empty; import java.util.ArrayList; import java.util.List; @@ -254,7 +232,9 @@ public Sink update(SinkInfo sink) { public ApiFuture updateAsync(SinkInfo sink) { UpdateSinkRequest request = UpdateSinkRequest.newBuilder() - .setSinkName(ProjectSinkName.of(getOptions().getProjectId(), sink.getName()).toString()) + .setSinkName( + LogSinkName.ofProjectSinkName(getOptions().getProjectId(), sink.getName()) + .toString()) .setSink(sink.toPb(getOptions().getProjectId())) .build(); return transform(rpc.update(request), Sink.fromPbFunction(this)); @@ -269,7 +249,8 @@ public Sink getSink(String sink) { public ApiFuture getSinkAsync(String sink) { GetSinkRequest request = GetSinkRequest.newBuilder() - .setSinkName(ProjectSinkName.of(getOptions().getProjectId(), sink).toString()) + .setSinkName( + LogSinkName.ofProjectSinkName(getOptions().getProjectId(), sink).toString()) .build(); return transform(rpc.get(request), Sink.fromPbFunction(this)); } @@ -333,7 +314,8 @@ public boolean deleteSink(String sink) { public ApiFuture deleteSinkAsync(String sink) { DeleteSinkRequest request = DeleteSinkRequest.newBuilder() - .setSinkName(ProjectSinkName.of(getOptions().getProjectId(), sink).toString()) + .setSinkName( + LogSinkName.ofProjectSinkName(getOptions().getProjectId(), sink).toString()) .build(); return transform(rpc.delete(request), EMPTY_TO_BOOLEAN_FUNCTION); } @@ -345,7 +327,7 @@ public boolean deleteLog(String log) { public ApiFuture deleteLogAsync(String log) { DeleteLogRequest request = DeleteLogRequest.newBuilder() - .setLogName(ProjectLogName.of(getOptions().getProjectId(), log).toString()) + .setLogName(LogName.ofProjectLogName(getOptions().getProjectId(), log).toString()) .build(); return transform(rpc.delete(request), EMPTY_TO_BOOLEAN_FUNCTION); } @@ -441,7 +423,7 @@ public ApiFuture updateAsync(MetricInfo metric) { UpdateLogMetricRequest request = UpdateLogMetricRequest.newBuilder() .setMetricName( - ProjectMetricName.of(getOptions().getProjectId(), metric.getName()).toString()) + LogMetricName.of(getOptions().getProjectId(), metric.getName()).toString()) .setMetric(metric.toPb()) .build(); return transform(rpc.update(request), Metric.fromPbFunction(this)); @@ -456,7 +438,7 @@ public Metric getMetric(String metric) { public ApiFuture getMetricAsync(String metric) { GetLogMetricRequest request = GetLogMetricRequest.newBuilder() - .setMetricName(ProjectMetricName.of(getOptions().getProjectId(), metric).toString()) + .setMetricName(LogMetricName.of(getOptions().getProjectId(), metric).toString()) .build(); return transform(rpc.get(request), Metric.fromPbFunction(this)); } @@ -520,7 +502,7 @@ public boolean deleteMetric(String metric) { public ApiFuture deleteMetricAsync(String metric) { DeleteLogMetricRequest request = DeleteLogMetricRequest.newBuilder() - .setMetricName(ProjectMetricName.of(getOptions().getProjectId(), metric).toString()) + .setMetricName(LogMetricName.of(getOptions().getProjectId(), metric).toString()) .build(); return transform(rpc.delete(request), EMPTY_TO_BOOLEAN_FUNCTION); } @@ -533,7 +515,7 @@ private static WriteLogEntriesRequest writeLogEntriesRequest( WriteLogEntriesRequest.Builder builder = WriteLogEntriesRequest.newBuilder(); String logName = LOG_NAME.get(options); if (logName != null) { - builder.setLogName(ProjectLogName.of(projectId, logName).toString()); + builder.setLogName(LogName.ofProjectLogName(projectId, logName).toString()); } MonitoredResource resource = RESOURCE.get(options); if (resource != null) { diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigClient.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigClient.java index 1e6ddbe73..8549b9276 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigClient.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigClient.java @@ -28,23 +28,35 @@ import com.google.cloud.logging.v2.stub.ConfigServiceV2Stub; import com.google.cloud.logging.v2.stub.ConfigServiceV2StubSettings; import com.google.common.util.concurrent.MoreExecutors; +import com.google.logging.v2.BillingAccountLocationName; +import com.google.logging.v2.BillingAccountName; import com.google.logging.v2.CmekSettings; import com.google.logging.v2.CreateExclusionRequest; import com.google.logging.v2.CreateSinkRequest; import com.google.logging.v2.DeleteExclusionRequest; import com.google.logging.v2.DeleteSinkRequest; -import com.google.logging.v2.ExclusionName; +import com.google.logging.v2.FolderLocationName; +import com.google.logging.v2.FolderName; +import com.google.logging.v2.GetBucketRequest; import com.google.logging.v2.GetCmekSettingsRequest; import com.google.logging.v2.GetExclusionRequest; import com.google.logging.v2.GetSinkRequest; +import com.google.logging.v2.ListBucketsRequest; +import com.google.logging.v2.ListBucketsResponse; import com.google.logging.v2.ListExclusionsRequest; import com.google.logging.v2.ListExclusionsResponse; import com.google.logging.v2.ListSinksRequest; import com.google.logging.v2.ListSinksResponse; +import com.google.logging.v2.LocationName; +import com.google.logging.v2.LogBucket; import com.google.logging.v2.LogExclusion; +import com.google.logging.v2.LogExclusionName; import com.google.logging.v2.LogSink; -import com.google.logging.v2.ParentName; -import com.google.logging.v2.SinkName; +import com.google.logging.v2.LogSinkName; +import com.google.logging.v2.OrganizationLocationName; +import com.google.logging.v2.OrganizationName; +import com.google.logging.v2.ProjectName; +import com.google.logging.v2.UpdateBucketRequest; import com.google.logging.v2.UpdateCmekSettingsRequest; import com.google.logging.v2.UpdateExclusionRequest; import com.google.logging.v2.UpdateSinkRequest; @@ -65,8 +77,8 @@ *
  * 
  * try (ConfigClient configClient = ConfigClient.create()) {
- *   SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
- *   LogSink response = configClient.getSink(sinkName);
+ *   LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
+ *   configClient.deleteSink(sinkName);
  * }
  * 
  * 
@@ -175,687 +187,1403 @@ public ConfigServiceV2Stub getStub() { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists sinks. + * Deletes a sink. If the sink has a unique `writer_identity`, then that service account is also + * deleted. * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
-   *   for (LogSink element : configClient.listSinks(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
+   *   LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
+   *   configClient.deleteSink(sinkName);
    * }
    * 
* - * @param parent Required. The parent resource whose sinks are to be listed: - *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" + * @param sinkName Required. The full resource name of the sink to delete, including the parent + * resource and the sink identifier: + *

"projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + *

Example: `"projects/my-project-id/sinks/my-sink-id"`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListSinksPagedResponse listSinks(ParentName parent) { - ListSinksRequest request = - ListSinksRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); - return listSinks(request); + public final void deleteSink(LogSinkName sinkName) { + DeleteSinkRequest request = + DeleteSinkRequest.newBuilder() + .setSinkName(sinkName == null ? null : sinkName.toString()) + .build(); + deleteSink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists sinks. + * Deletes a sink. If the sink has a unique `writer_identity`, then that service account is also + * deleted. * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
-   *   for (LogSink element : configClient.listSinks(parent.toString()).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
+   *   LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
+   *   configClient.deleteSink(sinkName.toString());
    * }
    * 
* - * @param parent Required. The parent resource whose sinks are to be listed: - *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" + * @param sinkName Required. The full resource name of the sink to delete, including the parent + * resource and the sink identifier: + *

"projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + *

Example: `"projects/my-project-id/sinks/my-sink-id"`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListSinksPagedResponse listSinks(String parent) { - ListSinksRequest request = ListSinksRequest.newBuilder().setParent(parent).build(); - return listSinks(request); + public final void deleteSink(String sinkName) { + DeleteSinkRequest request = DeleteSinkRequest.newBuilder().setSinkName(sinkName).build(); + deleteSink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists sinks. + * Deletes a sink. If the sink has a unique `writer_identity`, then that service account is also + * deleted. * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
-   *   ListSinksRequest request = ListSinksRequest.newBuilder()
-   *     .setParent(parent.toString())
+   *   LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
+   *   DeleteSinkRequest request = DeleteSinkRequest.newBuilder()
+   *     .setSinkName(sinkName.toString())
    *     .build();
-   *   for (LogSink element : configClient.listSinks(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
+   *   configClient.deleteSink(request);
    * }
    * 
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListSinksPagedResponse listSinks(ListSinksRequest request) { - return listSinksPagedCallable().call(request); + public final void deleteSink(DeleteSinkRequest request) { + deleteSinkCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists sinks. + * Deletes a sink. If the sink has a unique `writer_identity`, then that service account is also + * deleted. * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
-   *   ListSinksRequest request = ListSinksRequest.newBuilder()
-   *     .setParent(parent.toString())
+   *   LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
+   *   DeleteSinkRequest request = DeleteSinkRequest.newBuilder()
+   *     .setSinkName(sinkName.toString())
    *     .build();
-   *   ApiFuture<ListSinksPagedResponse> future = configClient.listSinksPagedCallable().futureCall(request);
+   *   ApiFuture<Void> future = configClient.deleteSinkCallable().futureCall(request);
    *   // Do something
-   *   for (LogSink element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
+   *   future.get();
    * }
    * 
*/ - public final UnaryCallable listSinksPagedCallable() { - return stub.listSinksPagedCallable(); + public final UnaryCallable deleteSinkCallable() { + return stub.deleteSinkCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists sinks. + * Updates a sink. This method replaces the following fields in the existing sink with values from + * the new sink: `destination`, and `filter`. + * + *

The updated sink might also have a new `writer_identity`; see the `unique_writer_identity` + * field. * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
-   *   ListSinksRequest request = ListSinksRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListSinksResponse response = configClient.listSinksCallable().call(request);
-   *     for (LogSink element : response.getSinksList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
+   *   LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   LogSink response = configClient.updateSink(sinkName, sink, updateMask);
    * }
    * 
+ * + * @param sinkName Required. The full resource name of the sink to update, including the parent + * resource and the sink identifier: + *

"projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + *

Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @param sink Required. The updated sink, whose name is the same identifier that appears as part + * of `sink_name`. + * @param updateMask Optional. Field mask that specifies the fields in `sink` that need an update. + * A sink field will be overwritten if, and only if, it is in the update mask. `name` and + * output only fields cannot be updated. + *

An empty updateMask is temporarily treated as using the following mask for backwards + * compatibility purposes: destination,filter,includeChildren At some point in the future, + * behavior will be removed and specifying an empty updateMask will be an error. + *

For a detailed `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + *

Example: `updateMask=filter`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable listSinksCallable() { - return stub.listSinksCallable(); + public final LogSink updateSink(LogSinkName sinkName, LogSink sink, FieldMask updateMask) { + UpdateSinkRequest request = + UpdateSinkRequest.newBuilder() + .setSinkName(sinkName == null ? null : sinkName.toString()) + .setSink(sink) + .setUpdateMask(updateMask) + .build(); + return updateSink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets a sink. + * Updates a sink. This method replaces the following fields in the existing sink with values from + * the new sink: `destination`, and `filter`. + * + *

The updated sink might also have a new `writer_identity`; see the `unique_writer_identity` + * field. * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
-   *   LogSink response = configClient.getSink(sinkName);
+   *   LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   LogSink response = configClient.updateSink(sinkName.toString(), sink, updateMask);
    * }
    * 
* - * @param sinkName Required. The resource name of the sink: + * @param sinkName Required. The full resource name of the sink to update, including the parent + * resource and the sink identifier: *

"projects/[PROJECT_ID]/sinks/[SINK_ID]" * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" * "folders/[FOLDER_ID]/sinks/[SINK_ID]" *

Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @param sink Required. The updated sink, whose name is the same identifier that appears as part + * of `sink_name`. + * @param updateMask Optional. Field mask that specifies the fields in `sink` that need an update. + * A sink field will be overwritten if, and only if, it is in the update mask. `name` and + * output only fields cannot be updated. + *

An empty updateMask is temporarily treated as using the following mask for backwards + * compatibility purposes: destination,filter,includeChildren At some point in the future, + * behavior will be removed and specifying an empty updateMask will be an error. + *

For a detailed `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + *

Example: `updateMask=filter`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final LogSink getSink(SinkName sinkName) { - GetSinkRequest request = - GetSinkRequest.newBuilder() - .setSinkName(sinkName == null ? null : sinkName.toString()) + public final LogSink updateSink(String sinkName, LogSink sink, FieldMask updateMask) { + UpdateSinkRequest request = + UpdateSinkRequest.newBuilder() + .setSinkName(sinkName) + .setSink(sink) + .setUpdateMask(updateMask) .build(); - return getSink(request); + return updateSink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets a sink. + * Updates a sink. This method replaces the following fields in the existing sink with values from + * the new sink: `destination`, and `filter`. + * + *

The updated sink might also have a new `writer_identity`; see the `unique_writer_identity` + * field. * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
-   *   LogSink response = configClient.getSink(sinkName.toString());
+   *   LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   LogSink response = configClient.updateSink(sinkName, sink);
    * }
    * 
* - * @param sinkName Required. The resource name of the sink: + * @param sinkName Required. The full resource name of the sink to update, including the parent + * resource and the sink identifier: *

"projects/[PROJECT_ID]/sinks/[SINK_ID]" * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" * "folders/[FOLDER_ID]/sinks/[SINK_ID]" *

Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @param sink Required. The updated sink, whose name is the same identifier that appears as part + * of `sink_name`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final LogSink getSink(String sinkName) { - GetSinkRequest request = GetSinkRequest.newBuilder().setSinkName(sinkName).build(); - return getSink(request); + public final LogSink updateSink(LogSinkName sinkName, LogSink sink) { + UpdateSinkRequest request = + UpdateSinkRequest.newBuilder() + .setSinkName(sinkName == null ? null : sinkName.toString()) + .setSink(sink) + .build(); + return updateSink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets a sink. + * Updates a sink. This method replaces the following fields in the existing sink with values from + * the new sink: `destination`, and `filter`. + * + *

The updated sink might also have a new `writer_identity`; see the `unique_writer_identity` + * field. * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
-   *   GetSinkRequest request = GetSinkRequest.newBuilder()
-   *     .setSinkName(sinkName.toString())
-   *     .build();
-   *   LogSink response = configClient.getSink(request);
+   *   LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   LogSink response = configClient.updateSink(sinkName.toString(), sink);
    * }
    * 
* - * @param request The request object containing all of the parameters for the API call. + * @param sinkName Required. The full resource name of the sink to update, including the parent + * resource and the sink identifier: + *

"projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + *

Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @param sink Required. The updated sink, whose name is the same identifier that appears as part + * of `sink_name`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final LogSink getSink(GetSinkRequest request) { - return getSinkCallable().call(request); + public final LogSink updateSink(String sinkName, LogSink sink) { + UpdateSinkRequest request = + UpdateSinkRequest.newBuilder().setSinkName(sinkName).setSink(sink).build(); + return updateSink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets a sink. + * Updates a sink. This method replaces the following fields in the existing sink with values from + * the new sink: `destination`, and `filter`. + * + *

The updated sink might also have a new `writer_identity`; see the `unique_writer_identity` + * field. * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
-   *   GetSinkRequest request = GetSinkRequest.newBuilder()
+   *   LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   UpdateSinkRequest request = UpdateSinkRequest.newBuilder()
    *     .setSinkName(sinkName.toString())
+   *     .setSink(sink)
    *     .build();
-   *   ApiFuture<LogSink> future = configClient.getSinkCallable().futureCall(request);
-   *   // Do something
-   *   LogSink response = future.get();
+   *   LogSink response = configClient.updateSink(request);
    * }
    * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable getSinkCallable() { - return stub.getSinkCallable(); + public final LogSink updateSink(UpdateSinkRequest request) { + return updateSinkCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates a sink that exports specified log entries to a destination. The export of - * newly-ingested log entries begins immediately, unless the sink's `writer_identity` is not - * permitted to write to the destination. A sink can export log entries only from the resource - * owning the sink. + * Updates a sink. This method replaces the following fields in the existing sink with values from + * the new sink: `destination`, and `filter`. + * + *

The updated sink might also have a new `writer_identity`; see the `unique_writer_identity` + * field. * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
    *   LogSink sink = LogSink.newBuilder().build();
-   *   LogSink response = configClient.createSink(parent, sink);
-   * }
-   * 
- * - * @param parent Required. The resource in which to create the sink: - *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - *

Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. - * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not - * already in use. + * UpdateSinkRequest request = UpdateSinkRequest.newBuilder() + * .setSinkName(sinkName.toString()) + * .setSink(sink) + * .build(); + * ApiFuture<LogSink> future = configClient.updateSinkCallable().futureCall(request); + * // Do something + * LogSink response = future.get(); + * } + * + */ + public final UnaryCallable updateSinkCallable() { + return stub.updateSinkCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes an exclusion. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]");
+   *   configClient.deleteExclusion(name);
+   * }
+   * 
+ * + * @param name Required. The resource name of an existing exclusion to delete: + *

"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + *

Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final LogSink createSink(ParentName parent, LogSink sink) { - CreateSinkRequest request = - CreateSinkRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setSink(sink) - .build(); - return createSink(request); + public final void deleteExclusion(LogExclusionName name) { + DeleteExclusionRequest request = + DeleteExclusionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteExclusion(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates a sink that exports specified log entries to a destination. The export of - * newly-ingested log entries begins immediately, unless the sink's `writer_identity` is not - * permitted to write to the destination. A sink can export log entries only from the resource - * owning the sink. + * Deletes an exclusion. * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
-   *   LogSink sink = LogSink.newBuilder().build();
-   *   LogSink response = configClient.createSink(parent.toString(), sink);
+   *   LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]");
+   *   configClient.deleteExclusion(name.toString());
    * }
    * 
* - * @param parent Required. The resource in which to create the sink: - *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - *

Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. - * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not - * already in use. + * @param name Required. The resource name of an existing exclusion to delete: + *

"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + *

Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final LogSink createSink(String parent, LogSink sink) { - CreateSinkRequest request = - CreateSinkRequest.newBuilder().setParent(parent).setSink(sink).build(); - return createSink(request); + public final void deleteExclusion(String name) { + DeleteExclusionRequest request = DeleteExclusionRequest.newBuilder().setName(name).build(); + deleteExclusion(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates a sink that exports specified log entries to a destination. The export of - * newly-ingested log entries begins immediately, unless the sink's `writer_identity` is not - * permitted to write to the destination. A sink can export log entries only from the resource - * owning the sink. + * Deletes an exclusion. * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
-   *   LogSink sink = LogSink.newBuilder().build();
-   *   CreateSinkRequest request = CreateSinkRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setSink(sink)
+   *   LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]");
+   *   DeleteExclusionRequest request = DeleteExclusionRequest.newBuilder()
+   *     .setName(name.toString())
    *     .build();
-   *   LogSink response = configClient.createSink(request);
+   *   configClient.deleteExclusion(request);
    * }
    * 
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final LogSink createSink(CreateSinkRequest request) { - return createSinkCallable().call(request); + public final void deleteExclusion(DeleteExclusionRequest request) { + deleteExclusionCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates a sink that exports specified log entries to a destination. The export of - * newly-ingested log entries begins immediately, unless the sink's `writer_identity` is not - * permitted to write to the destination. A sink can export log entries only from the resource - * owning the sink. + * Deletes an exclusion. * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
-   *   LogSink sink = LogSink.newBuilder().build();
-   *   CreateSinkRequest request = CreateSinkRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setSink(sink)
+   *   LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]");
+   *   DeleteExclusionRequest request = DeleteExclusionRequest.newBuilder()
+   *     .setName(name.toString())
    *     .build();
-   *   ApiFuture<LogSink> future = configClient.createSinkCallable().futureCall(request);
+   *   ApiFuture<Void> future = configClient.deleteExclusionCallable().futureCall(request);
    *   // Do something
-   *   LogSink response = future.get();
+   *   future.get();
    * }
    * 
*/ - public final UnaryCallable createSinkCallable() { - return stub.createSinkCallable(); + public final UnaryCallable deleteExclusionCallable() { + return stub.deleteExclusionCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates a sink. This method replaces the following fields in the existing sink with values from - * the new sink: `destination`, and `filter`. - * - *

The updated sink might also have a new `writer_identity`; see the `unique_writer_identity` - * field. + * Lists buckets (Beta). * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
-   *   LogSink sink = LogSink.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   LogSink response = configClient.updateSink(sinkName, sink, updateMask);
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   for (LogBucket element : configClient.listBuckets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
    * }
    * 
* - * @param sinkName Required. The full resource name of the sink to update, including the parent - * resource and the sink identifier: - *

"projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - *

Example: `"projects/my-project-id/sinks/my-sink-id"`. - * @param sink Required. The updated sink, whose name is the same identifier that appears as part - * of `sink_name`. - * @param updateMask Optional. Field mask that specifies the fields in `sink` that need an update. - * A sink field will be overwritten if, and only if, it is in the update mask. `name` and - * output only fields cannot be updated. - *

An empty updateMask is temporarily treated as using the following mask for backwards - * compatibility purposes: destination,filter,includeChildren At some point in the future, - * behavior will be removed and specifying an empty updateMask will be an error. - *

For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - *

Example: `updateMask=filter`. + * @param parent Required. The parent resource whose buckets are to be listed: + *

"projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + *

Note: The locations portion of the resource must be specified, but supplying the + * character `-` in place of [LOCATION_ID] will return all buckets. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final LogSink updateSink(SinkName sinkName, LogSink sink, FieldMask updateMask) { - UpdateSinkRequest request = - UpdateSinkRequest.newBuilder() - .setSinkName(sinkName == null ? null : sinkName.toString()) - .setSink(sink) - .setUpdateMask(updateMask) + public final ListBucketsPagedResponse listBuckets(OrganizationLocationName parent) { + ListBucketsRequest request = + ListBucketsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) .build(); - return updateSink(request); + return listBuckets(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates a sink. This method replaces the following fields in the existing sink with values from - * the new sink: `destination`, and `filter`. - * - *

The updated sink might also have a new `writer_identity`; see the `unique_writer_identity` - * field. + * Lists buckets (Beta). * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
-   *   LogSink sink = LogSink.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   LogSink response = configClient.updateSink(sinkName.toString(), sink, updateMask);
+   *   FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
+   *   for (LogBucket element : configClient.listBuckets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
    * }
    * 
* - * @param sinkName Required. The full resource name of the sink to update, including the parent - * resource and the sink identifier: - *

"projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - *

Example: `"projects/my-project-id/sinks/my-sink-id"`. - * @param sink Required. The updated sink, whose name is the same identifier that appears as part - * of `sink_name`. - * @param updateMask Optional. Field mask that specifies the fields in `sink` that need an update. - * A sink field will be overwritten if, and only if, it is in the update mask. `name` and - * output only fields cannot be updated. - *

An empty updateMask is temporarily treated as using the following mask for backwards - * compatibility purposes: destination,filter,includeChildren At some point in the future, - * behavior will be removed and specifying an empty updateMask will be an error. - *

For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - *

Example: `updateMask=filter`. + * @param parent Required. The parent resource whose buckets are to be listed: + *

"projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + *

Note: The locations portion of the resource must be specified, but supplying the + * character `-` in place of [LOCATION_ID] will return all buckets. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final LogSink updateSink(String sinkName, LogSink sink, FieldMask updateMask) { - UpdateSinkRequest request = - UpdateSinkRequest.newBuilder() - .setSinkName(sinkName) - .setSink(sink) - .setUpdateMask(updateMask) + public final ListBucketsPagedResponse listBuckets(FolderLocationName parent) { + ListBucketsRequest request = + ListBucketsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) .build(); - return updateSink(request); + return listBuckets(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates a sink. This method replaces the following fields in the existing sink with values from - * the new sink: `destination`, and `filter`. - * - *

The updated sink might also have a new `writer_identity`; see the `unique_writer_identity` - * field. + * Lists buckets (Beta). * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
-   *   LogSink sink = LogSink.newBuilder().build();
-   *   LogSink response = configClient.updateSink(sinkName, sink);
+   *   BillingAccountLocationName parent = BillingAccountLocationName.of("[BILLING_ACCOUNT]", "[LOCATION]");
+   *   for (LogBucket element : configClient.listBuckets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
    * }
    * 
* - * @param sinkName Required. The full resource name of the sink to update, including the parent - * resource and the sink identifier: - *

"projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - *

Example: `"projects/my-project-id/sinks/my-sink-id"`. - * @param sink Required. The updated sink, whose name is the same identifier that appears as part - * of `sink_name`. + * @param parent Required. The parent resource whose buckets are to be listed: + *

"projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + *

Note: The locations portion of the resource must be specified, but supplying the + * character `-` in place of [LOCATION_ID] will return all buckets. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final LogSink updateSink(SinkName sinkName, LogSink sink) { - UpdateSinkRequest request = - UpdateSinkRequest.newBuilder() - .setSinkName(sinkName == null ? null : sinkName.toString()) - .setSink(sink) + public final ListBucketsPagedResponse listBuckets(BillingAccountLocationName parent) { + ListBucketsRequest request = + ListBucketsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) .build(); - return updateSink(request); + return listBuckets(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates a sink. This method replaces the following fields in the existing sink with values from - * the new sink: `destination`, and `filter`. - * - *

The updated sink might also have a new `writer_identity`; see the `unique_writer_identity` - * field. + * Lists buckets (Beta). * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
-   *   LogSink sink = LogSink.newBuilder().build();
-   *   LogSink response = configClient.updateSink(sinkName.toString(), sink);
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (LogBucket element : configClient.listBuckets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
    * }
    * 
* - * @param sinkName Required. The full resource name of the sink to update, including the parent - * resource and the sink identifier: - *

"projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - *

Example: `"projects/my-project-id/sinks/my-sink-id"`. - * @param sink Required. The updated sink, whose name is the same identifier that appears as part - * of `sink_name`. + * @param parent Required. The parent resource whose buckets are to be listed: + *

"projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + *

Note: The locations portion of the resource must be specified, but supplying the + * character `-` in place of [LOCATION_ID] will return all buckets. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final LogSink updateSink(String sinkName, LogSink sink) { - UpdateSinkRequest request = - UpdateSinkRequest.newBuilder().setSinkName(sinkName).setSink(sink).build(); - return updateSink(request); + public final ListBucketsPagedResponse listBuckets(LocationName parent) { + ListBucketsRequest request = + ListBucketsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listBuckets(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates a sink. This method replaces the following fields in the existing sink with values from - * the new sink: `destination`, and `filter`. - * - *

The updated sink might also have a new `writer_identity`; see the `unique_writer_identity` - * field. + * Lists buckets (Beta). * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
-   *   LogSink sink = LogSink.newBuilder().build();
-   *   UpdateSinkRequest request = UpdateSinkRequest.newBuilder()
-   *     .setSinkName(sinkName.toString())
-   *     .setSink(sink)
-   *     .build();
-   *   LogSink response = configClient.updateSink(request);
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   for (LogBucket element : configClient.listBuckets(parent.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
    * }
    * 
* - * @param request The request object containing all of the parameters for the API call. + * @param parent Required. The parent resource whose buckets are to be listed: + *

"projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + *

Note: The locations portion of the resource must be specified, but supplying the + * character `-` in place of [LOCATION_ID] will return all buckets. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final LogSink updateSink(UpdateSinkRequest request) { - return updateSinkCallable().call(request); + public final ListBucketsPagedResponse listBuckets(String parent) { + ListBucketsRequest request = ListBucketsRequest.newBuilder().setParent(parent).build(); + return listBuckets(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates a sink. This method replaces the following fields in the existing sink with values from - * the new sink: `destination`, and `filter`. - * - *

The updated sink might also have a new `writer_identity`; see the `unique_writer_identity` - * field. + * Lists buckets (Beta). * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
-   *   LogSink sink = LogSink.newBuilder().build();
-   *   UpdateSinkRequest request = UpdateSinkRequest.newBuilder()
-   *     .setSinkName(sinkName.toString())
-   *     .setSink(sink)
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   ListBucketsRequest request = ListBucketsRequest.newBuilder()
+   *     .setParent(parent.toString())
    *     .build();
-   *   ApiFuture<LogSink> future = configClient.updateSinkCallable().futureCall(request);
-   *   // Do something
-   *   LogSink response = future.get();
-   * }
+   *   for (LogBucket element : configClient.listBuckets(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBucketsPagedResponse listBuckets(ListBucketsRequest request) { + return listBucketsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists buckets (Beta). + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   ListBucketsRequest request = ListBucketsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<ListBucketsPagedResponse> future = configClient.listBucketsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (LogBucket element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listBucketsPagedCallable() { + return stub.listBucketsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists buckets (Beta). + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   ListBucketsRequest request = ListBucketsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   while (true) {
+   *     ListBucketsResponse response = configClient.listBucketsCallable().call(request);
+   *     for (LogBucket element : response.getBucketsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listBucketsCallable() { + return stub.listBucketsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a bucket (Beta). + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   LogBucketName name = LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]");
+   *   GetBucketRequest request = GetBucketRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   LogBucket response = configClient.getBucket(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LogBucket getBucket(GetBucketRequest request) { + return getBucketCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a bucket (Beta). + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   LogBucketName name = LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]");
+   *   GetBucketRequest request = GetBucketRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<LogBucket> future = configClient.getBucketCallable().futureCall(request);
+   *   // Do something
+   *   LogBucket response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getBucketCallable() { + return stub.getBucketCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a bucket. This method replaces the following fields in the existing bucket with values + * from the new bucket: `retention_period` + * + *

If the retention period is decreased and the bucket is locked, FAILED_PRECONDITION will be + * returned. + * + *

If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION will be + * returned. + * + *

A buckets region may not be modified after it is created. This method is in Beta. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   LogBucketName name = LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]");
+   *   LogBucket bucket = LogBucket.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   UpdateBucketRequest request = UpdateBucketRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setBucket(bucket)
+   *     .setUpdateMask(updateMask)
+   *     .build();
+   *   LogBucket response = configClient.updateBucket(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LogBucket updateBucket(UpdateBucketRequest request) { + return updateBucketCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a bucket. This method replaces the following fields in the existing bucket with values + * from the new bucket: `retention_period` + * + *

If the retention period is decreased and the bucket is locked, FAILED_PRECONDITION will be + * returned. + * + *

If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION will be + * returned. + * + *

A buckets region may not be modified after it is created. This method is in Beta. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   LogBucketName name = LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]");
+   *   LogBucket bucket = LogBucket.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   UpdateBucketRequest request = UpdateBucketRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setBucket(bucket)
+   *     .setUpdateMask(updateMask)
+   *     .build();
+   *   ApiFuture<LogBucket> future = configClient.updateBucketCallable().futureCall(request);
+   *   // Do something
+   *   LogBucket response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable updateBucketCallable() { + return stub.updateBucketCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists sinks. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   for (LogSink element : configClient.listSinks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The parent resource whose sinks are to be listed: + *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSinksPagedResponse listSinks(ProjectName parent) { + ListSinksRequest request = + ListSinksRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listSinks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists sinks. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   for (LogSink element : configClient.listSinks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The parent resource whose sinks are to be listed: + *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSinksPagedResponse listSinks(OrganizationName parent) { + ListSinksRequest request = + ListSinksRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listSinks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists sinks. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   FolderName parent = FolderName.of("[FOLDER]");
+   *   for (LogSink element : configClient.listSinks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The parent resource whose sinks are to be listed: + *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSinksPagedResponse listSinks(FolderName parent) { + ListSinksRequest request = + ListSinksRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listSinks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists sinks. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   BillingAccountName parent = BillingAccountName.of("[BILLING_ACCOUNT]");
+   *   for (LogSink element : configClient.listSinks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The parent resource whose sinks are to be listed: + *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSinksPagedResponse listSinks(BillingAccountName parent) { + ListSinksRequest request = + ListSinksRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listSinks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists sinks. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   for (LogSink element : configClient.listSinks(parent.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The parent resource whose sinks are to be listed: + *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSinksPagedResponse listSinks(String parent) { + ListSinksRequest request = ListSinksRequest.newBuilder().setParent(parent).build(); + return listSinks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists sinks. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   ListSinksRequest request = ListSinksRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   for (LogSink element : configClient.listSinks(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSinksPagedResponse listSinks(ListSinksRequest request) { + return listSinksPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists sinks. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   ListSinksRequest request = ListSinksRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<ListSinksPagedResponse> future = configClient.listSinksPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (LogSink element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listSinksPagedCallable() { + return stub.listSinksPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists sinks. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   ListSinksRequest request = ListSinksRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   while (true) {
+   *     ListSinksResponse response = configClient.listSinksCallable().call(request);
+   *     for (LogSink element : response.getSinksList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listSinksCallable() { + return stub.listSinksCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a sink. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
+   *   LogSink response = configClient.getSink(sinkName);
+   * }
+   * 
+ * + * @param sinkName Required. The resource name of the sink: + *

"projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + *

Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LogSink getSink(LogSinkName sinkName) { + GetSinkRequest request = + GetSinkRequest.newBuilder() + .setSinkName(sinkName == null ? null : sinkName.toString()) + .build(); + return getSink(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a sink. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
+   *   LogSink response = configClient.getSink(sinkName.toString());
+   * }
+   * 
+ * + * @param sinkName Required. The resource name of the sink: + *

"projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + *

Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LogSink getSink(String sinkName) { + GetSinkRequest request = GetSinkRequest.newBuilder().setSinkName(sinkName).build(); + return getSink(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a sink. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
+   *   GetSinkRequest request = GetSinkRequest.newBuilder()
+   *     .setSinkName(sinkName.toString())
+   *     .build();
+   *   LogSink response = configClient.getSink(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LogSink getSink(GetSinkRequest request) { + return getSinkCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a sink. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
+   *   GetSinkRequest request = GetSinkRequest.newBuilder()
+   *     .setSinkName(sinkName.toString())
+   *     .build();
+   *   ApiFuture<LogSink> future = configClient.getSinkCallable().futureCall(request);
+   *   // Do something
+   *   LogSink response = future.get();
+   * }
    * 
*/ - public final UnaryCallable updateSinkCallable() { - return stub.updateSinkCallable(); + public final UnaryCallable getSinkCallable() { + return stub.getSinkCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes a sink. If the sink has a unique `writer_identity`, then that service account is also - * deleted. + * Creates a sink that exports specified log entries to a destination. The export of + * newly-ingested log entries begins immediately, unless the sink's `writer_identity` is not + * permitted to write to the destination. A sink can export log entries only from the resource + * owning the sink. * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
-   *   configClient.deleteSink(sinkName);
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   LogSink response = configClient.createSink(parent, sink);
    * }
    * 
* - * @param sinkName Required. The full resource name of the sink to delete, including the parent - * resource and the sink identifier: - *

"projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - *

Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @param parent Required. The resource in which to create the sink: + *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" + *

Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not + * already in use. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteSink(SinkName sinkName) { - DeleteSinkRequest request = - DeleteSinkRequest.newBuilder() - .setSinkName(sinkName == null ? null : sinkName.toString()) + public final LogSink createSink(ProjectName parent, LogSink sink) { + CreateSinkRequest request = + CreateSinkRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSink(sink) .build(); - deleteSink(request); + return createSink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes a sink. If the sink has a unique `writer_identity`, then that service account is also - * deleted. + * Creates a sink that exports specified log entries to a destination. The export of + * newly-ingested log entries begins immediately, unless the sink's `writer_identity` is not + * permitted to write to the destination. A sink can export log entries only from the resource + * owning the sink. * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
-   *   configClient.deleteSink(sinkName.toString());
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   LogSink response = configClient.createSink(parent, sink);
    * }
    * 
* - * @param sinkName Required. The full resource name of the sink to delete, including the parent - * resource and the sink identifier: - *

"projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - *

Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @param parent Required. The resource in which to create the sink: + *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" + *

Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not + * already in use. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteSink(String sinkName) { - DeleteSinkRequest request = DeleteSinkRequest.newBuilder().setSinkName(sinkName).build(); - deleteSink(request); + public final LogSink createSink(OrganizationName parent, LogSink sink) { + CreateSinkRequest request = + CreateSinkRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSink(sink) + .build(); + return createSink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes a sink. If the sink has a unique `writer_identity`, then that service account is also - * deleted. + * Creates a sink that exports specified log entries to a destination. The export of + * newly-ingested log entries begins immediately, unless the sink's `writer_identity` is not + * permitted to write to the destination. A sink can export log entries only from the resource + * owning the sink. * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
-   *   DeleteSinkRequest request = DeleteSinkRequest.newBuilder()
-   *     .setSinkName(sinkName.toString())
+   *   FolderName parent = FolderName.of("[FOLDER]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   LogSink response = configClient.createSink(parent, sink);
+   * }
+   * 
+ * + * @param parent Required. The resource in which to create the sink: + *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" + *

Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not + * already in use. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LogSink createSink(FolderName parent, LogSink sink) { + CreateSinkRequest request = + CreateSinkRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSink(sink) + .build(); + return createSink(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a sink that exports specified log entries to a destination. The export of + * newly-ingested log entries begins immediately, unless the sink's `writer_identity` is not + * permitted to write to the destination. A sink can export log entries only from the resource + * owning the sink. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   BillingAccountName parent = BillingAccountName.of("[BILLING_ACCOUNT]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   LogSink response = configClient.createSink(parent, sink);
+   * }
+   * 
+ * + * @param parent Required. The resource in which to create the sink: + *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" + *

Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not + * already in use. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LogSink createSink(BillingAccountName parent, LogSink sink) { + CreateSinkRequest request = + CreateSinkRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSink(sink) + .build(); + return createSink(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a sink that exports specified log entries to a destination. The export of + * newly-ingested log entries begins immediately, unless the sink's `writer_identity` is not + * permitted to write to the destination. A sink can export log entries only from the resource + * owning the sink. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   LogSink response = configClient.createSink(parent.toString(), sink);
+   * }
+   * 
+ * + * @param parent Required. The resource in which to create the sink: + *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" + *

Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not + * already in use. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LogSink createSink(String parent, LogSink sink) { + CreateSinkRequest request = + CreateSinkRequest.newBuilder().setParent(parent).setSink(sink).build(); + return createSink(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a sink that exports specified log entries to a destination. The export of + * newly-ingested log entries begins immediately, unless the sink's `writer_identity` is not + * permitted to write to the destination. A sink can export log entries only from the resource + * owning the sink. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   CreateSinkRequest request = CreateSinkRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setSink(sink)
    *     .build();
-   *   configClient.deleteSink(request);
+   *   LogSink response = configClient.createSink(request);
    * }
    * 
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteSink(DeleteSinkRequest request) { - deleteSinkCallable().call(request); + public final LogSink createSink(CreateSinkRequest request) { + return createSinkCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a sink that exports specified log entries to a destination. The export of + * newly-ingested log entries begins immediately, unless the sink's `writer_identity` is not + * permitted to write to the destination. A sink can export log entries only from the resource + * owning the sink. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   CreateSinkRequest request = CreateSinkRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setSink(sink)
+   *     .build();
+   *   ApiFuture<LogSink> future = configClient.createSinkCallable().futureCall(request);
+   *   // Do something
+   *   LogSink response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable createSinkCallable() { + return stub.createSinkCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists all the exclusions in a parent resource. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   for (LogExclusion element : configClient.listExclusions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The parent resource whose exclusions are to be listed. + *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListExclusionsPagedResponse listExclusions(ProjectName parent) { + ListExclusionsRequest request = + ListExclusionsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listExclusions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists all the exclusions in a parent resource. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   for (LogExclusion element : configClient.listExclusions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The parent resource whose exclusions are to be listed. + *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListExclusionsPagedResponse listExclusions(OrganizationName parent) { + ListExclusionsRequest request = + ListExclusionsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listExclusions(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes a sink. If the sink has a unique `writer_identity`, then that service account is also - * deleted. + * Lists all the exclusions in a parent resource. * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
-   *   DeleteSinkRequest request = DeleteSinkRequest.newBuilder()
-   *     .setSinkName(sinkName.toString())
-   *     .build();
-   *   ApiFuture<Void> future = configClient.deleteSinkCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
+   *   FolderName parent = FolderName.of("[FOLDER]");
+   *   for (LogExclusion element : configClient.listExclusions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
    * }
    * 
+ * + * @param parent Required. The parent resource whose exclusions are to be listed. + *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable deleteSinkCallable() { - return stub.deleteSinkCallable(); + public final ListExclusionsPagedResponse listExclusions(FolderName parent) { + ListExclusionsRequest request = + ListExclusionsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listExclusions(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -866,7 +1594,7 @@ public final UnaryCallable deleteSinkCallable() { * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   BillingAccountName parent = BillingAccountName.of("[BILLING_ACCOUNT]");
    *   for (LogExclusion element : configClient.listExclusions(parent).iterateAll()) {
    *     // doThingsWith(element);
    *   }
@@ -878,7 +1606,7 @@ public final UnaryCallable deleteSinkCallable() {
    *     "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]"
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  public final ListExclusionsPagedResponse listExclusions(ParentName parent) {
+  public final ListExclusionsPagedResponse listExclusions(BillingAccountName parent) {
     ListExclusionsRequest request =
         ListExclusionsRequest.newBuilder()
             .setParent(parent == null ? null : parent.toString())
@@ -894,7 +1622,7 @@ public final ListExclusionsPagedResponse listExclusions(ParentName parent) {
    *
    * 

    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   for (LogExclusion element : configClient.listExclusions(parent.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
@@ -919,7 +1647,7 @@ public final ListExclusionsPagedResponse listExclusions(String parent) {
    *
    * 

    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   ListExclusionsRequest request = ListExclusionsRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -944,7 +1672,7 @@ public final ListExclusionsPagedResponse listExclusions(ListExclusionsRequest re
    *
    * 

    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   ListExclusionsRequest request = ListExclusionsRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -969,7 +1697,7 @@ public final ListExclusionsPagedResponse listExclusions(ListExclusionsRequest re
    *
    * 

    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   ListExclusionsRequest request = ListExclusionsRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -1001,7 +1729,7 @@ public final ListExclusionsPagedResponse listExclusions(ListExclusionsRequest re
    *
    * 

    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]");
+   *   LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]");
    *   LogExclusion response = configClient.getExclusion(name);
    * }
    * 
@@ -1014,7 +1742,7 @@ public final ListExclusionsPagedResponse listExclusions(ListExclusionsRequest re *

Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final LogExclusion getExclusion(ExclusionName name) { + public final LogExclusion getExclusion(LogExclusionName name) { GetExclusionRequest request = GetExclusionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getExclusion(request); @@ -1028,7 +1756,7 @@ public final LogExclusion getExclusion(ExclusionName name) { * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]");
+   *   LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]");
    *   LogExclusion response = configClient.getExclusion(name.toString());
    * }
    * 
@@ -1054,7 +1782,7 @@ public final LogExclusion getExclusion(String name) { * *

    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]");
+   *   LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]");
    *   GetExclusionRequest request = GetExclusionRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -1077,7 +1805,7 @@ public final LogExclusion getExclusion(GetExclusionRequest request) {
    *
    * 

    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]");
+   *   LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]");
    *   GetExclusionRequest request = GetExclusionRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -1100,7 +1828,103 @@ public final UnaryCallable getExclusionCallab
    *
    * 

    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   LogExclusion exclusion = LogExclusion.newBuilder().build();
+   *   LogExclusion response = configClient.createExclusion(parent, exclusion);
+   * }
+   * 
+ * + * @param parent Required. The parent resource in which to create the exclusion: + *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" + *

Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that + * is not already used in the parent resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LogExclusion createExclusion(ProjectName parent, LogExclusion exclusion) { + CreateExclusionRequest request = + CreateExclusionRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setExclusion(exclusion) + .build(); + return createExclusion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a new exclusion in a specified parent resource. Only log entries belonging to that + * resource can be excluded. You can have up to 10 exclusions in a resource. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   LogExclusion exclusion = LogExclusion.newBuilder().build();
+   *   LogExclusion response = configClient.createExclusion(parent, exclusion);
+   * }
+   * 
+ * + * @param parent Required. The parent resource in which to create the exclusion: + *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" + *

Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that + * is not already used in the parent resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LogExclusion createExclusion(OrganizationName parent, LogExclusion exclusion) { + CreateExclusionRequest request = + CreateExclusionRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setExclusion(exclusion) + .build(); + return createExclusion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a new exclusion in a specified parent resource. Only log entries belonging to that + * resource can be excluded. You can have up to 10 exclusions in a resource. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   FolderName parent = FolderName.of("[FOLDER]");
+   *   LogExclusion exclusion = LogExclusion.newBuilder().build();
+   *   LogExclusion response = configClient.createExclusion(parent, exclusion);
+   * }
+   * 
+ * + * @param parent Required. The parent resource in which to create the exclusion: + *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" + *

Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that + * is not already used in the parent resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LogExclusion createExclusion(FolderName parent, LogExclusion exclusion) { + CreateExclusionRequest request = + CreateExclusionRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setExclusion(exclusion) + .build(); + return createExclusion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a new exclusion in a specified parent resource. Only log entries belonging to that + * resource can be excluded. You can have up to 10 exclusions in a resource. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   BillingAccountName parent = BillingAccountName.of("[BILLING_ACCOUNT]");
    *   LogExclusion exclusion = LogExclusion.newBuilder().build();
    *   LogExclusion response = configClient.createExclusion(parent, exclusion);
    * }
@@ -1114,7 +1938,7 @@ public final UnaryCallable getExclusionCallab
    *     is not already used in the parent resource.
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  public final LogExclusion createExclusion(ParentName parent, LogExclusion exclusion) {
+  public final LogExclusion createExclusion(BillingAccountName parent, LogExclusion exclusion) {
     CreateExclusionRequest request =
         CreateExclusionRequest.newBuilder()
             .setParent(parent == null ? null : parent.toString())
@@ -1132,7 +1956,7 @@ public final LogExclusion createExclusion(ParentName parent, LogExclusion exclus
    *
    * 

    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   LogExclusion exclusion = LogExclusion.newBuilder().build();
    *   LogExclusion response = configClient.createExclusion(parent.toString(), exclusion);
    * }
@@ -1161,7 +1985,7 @@ public final LogExclusion createExclusion(String parent, LogExclusion exclusion)
    *
    * 

    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   LogExclusion exclusion = LogExclusion.newBuilder().build();
    *   CreateExclusionRequest request = CreateExclusionRequest.newBuilder()
    *     .setParent(parent.toString())
@@ -1187,7 +2011,7 @@ public final LogExclusion createExclusion(CreateExclusionRequest request) {
    *
    * 

    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   LogExclusion exclusion = LogExclusion.newBuilder().build();
    *   CreateExclusionRequest request = CreateExclusionRequest.newBuilder()
    *     .setParent(parent.toString())
@@ -1211,7 +2035,7 @@ public final UnaryCallable createExclusion
    *
    * 

    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]");
+   *   LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]");
    *   LogExclusion exclusion = LogExclusion.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
    *   LogExclusion response = configClient.updateExclusion(name, exclusion, updateMask);
@@ -1235,7 +2059,7 @@ public final UnaryCallable createExclusion
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
   public final LogExclusion updateExclusion(
-      ExclusionName name, LogExclusion exclusion, FieldMask updateMask) {
+      LogExclusionName name, LogExclusion exclusion, FieldMask updateMask) {
     UpdateExclusionRequest request =
         UpdateExclusionRequest.newBuilder()
             .setName(name == null ? null : name.toString())
@@ -1253,7 +2077,7 @@ public final LogExclusion updateExclusion(
    *
    * 

    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]");
+   *   LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]");
    *   LogExclusion exclusion = LogExclusion.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
    *   LogExclusion response = configClient.updateExclusion(name.toString(), exclusion, updateMask);
@@ -1295,7 +2119,7 @@ public final LogExclusion updateExclusion(
    *
    * 

    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]");
+   *   LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]");
    *   LogExclusion exclusion = LogExclusion.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
    *   UpdateExclusionRequest request = UpdateExclusionRequest.newBuilder()
@@ -1322,7 +2146,7 @@ public final LogExclusion updateExclusion(UpdateExclusionRequest request) {
    *
    * 

    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]");
+   *   LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]");
    *   LogExclusion exclusion = LogExclusion.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
    *   UpdateExclusionRequest request = UpdateExclusionRequest.newBuilder()
@@ -1340,104 +2164,6 @@ public final UnaryCallable updateExclusion
     return stub.updateExclusionCallable();
   }
 
-  // AUTO-GENERATED DOCUMENTATION AND METHOD
-  /**
-   * Deletes an exclusion.
-   *
-   * 

Sample code: - * - *


-   * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]");
-   *   configClient.deleteExclusion(name);
-   * }
-   * 
- * - * @param name Required. The resource name of an existing exclusion to delete: - *

"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - *

Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteExclusion(ExclusionName name) { - DeleteExclusionRequest request = - DeleteExclusionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteExclusion(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes an exclusion. - * - *

Sample code: - * - *


-   * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]");
-   *   configClient.deleteExclusion(name.toString());
-   * }
-   * 
- * - * @param name Required. The resource name of an existing exclusion to delete: - *

"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - *

Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteExclusion(String name) { - DeleteExclusionRequest request = DeleteExclusionRequest.newBuilder().setName(name).build(); - deleteExclusion(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes an exclusion. - * - *

Sample code: - * - *


-   * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]");
-   *   DeleteExclusionRequest request = DeleteExclusionRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   configClient.deleteExclusion(request);
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteExclusion(DeleteExclusionRequest request) { - deleteExclusionCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes an exclusion. - * - *

Sample code: - * - *


-   * try (ConfigClient configClient = ConfigClient.create()) {
-   *   ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]");
-   *   DeleteExclusionRequest request = DeleteExclusionRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> future = configClient.deleteExclusionCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - public final UnaryCallable deleteExclusionCallable() { - return stub.deleteExclusionCallable(); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Gets the Logs Router CMEK settings for the given resource. @@ -1445,14 +2171,17 @@ public final UnaryCallable deleteExclusionCallabl *

Note: CMEK for the Logs Router can currently only be configured for GCP organizations. Once * configured, it applies to all projects and folders in the GCP organization. * - *

See [Enabling CMEK for Logs Router](/logging/docs/routing/managed-encryption) for more - * information. + *

See [Enabling CMEK for Logs + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   GetCmekSettingsRequest request = GetCmekSettingsRequest.newBuilder().build();
+   *   CmekSettingsName name = CmekSettingsName.ofProjectCmekSettingsName("[PROJECT]");
+   *   GetCmekSettingsRequest request = GetCmekSettingsRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
    *   CmekSettings response = configClient.getCmekSettings(request);
    * }
    * 
@@ -1471,14 +2200,17 @@ public final CmekSettings getCmekSettings(GetCmekSettingsRequest request) { *

Note: CMEK for the Logs Router can currently only be configured for GCP organizations. Once * configured, it applies to all projects and folders in the GCP organization. * - *

See [Enabling CMEK for Logs Router](/logging/docs/routing/managed-encryption) for more - * information. + *

See [Enabling CMEK for Logs + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   GetCmekSettingsRequest request = GetCmekSettingsRequest.newBuilder().build();
+   *   CmekSettingsName name = CmekSettingsName.ofProjectCmekSettingsName("[PROJECT]");
+   *   GetCmekSettingsRequest request = GetCmekSettingsRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
    *   ApiFuture<CmekSettings> future = configClient.getCmekSettingsCallable().futureCall(request);
    *   // Do something
    *   CmekSettings response = future.get();
@@ -1501,14 +2233,19 @@ public final UnaryCallable getCmekSettings
    * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or 3) access to the key
    * is disabled.
    *
-   * 

See [Enabling CMEK for Logs Router](/logging/docs/routing/managed-encryption) for more - * information. + *

See [Enabling CMEK for Logs + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   UpdateCmekSettingsRequest request = UpdateCmekSettingsRequest.newBuilder().build();
+   *   String name = "";
+   *   CmekSettings cmekSettings = CmekSettings.newBuilder().build();
+   *   UpdateCmekSettingsRequest request = UpdateCmekSettingsRequest.newBuilder()
+   *     .setName(name)
+   *     .setCmekSettings(cmekSettings)
+   *     .build();
    *   CmekSettings response = configClient.updateCmekSettings(request);
    * }
    * 
@@ -1532,14 +2269,19 @@ public final CmekSettings updateCmekSettings(UpdateCmekSettingsRequest request) * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or 3) access to the key * is disabled. * - *

See [Enabling CMEK for Logs Router](/logging/docs/routing/managed-encryption) for more - * information. + *

See [Enabling CMEK for Logs + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. * *

Sample code: * *


    * try (ConfigClient configClient = ConfigClient.create()) {
-   *   UpdateCmekSettingsRequest request = UpdateCmekSettingsRequest.newBuilder().build();
+   *   String name = "";
+   *   CmekSettings cmekSettings = CmekSettings.newBuilder().build();
+   *   UpdateCmekSettingsRequest request = UpdateCmekSettingsRequest.newBuilder()
+   *     .setName(name)
+   *     .setCmekSettings(cmekSettings)
+   *     .build();
    *   ApiFuture<CmekSettings> future = configClient.updateCmekSettingsCallable().futureCall(request);
    *   // Do something
    *   CmekSettings response = future.get();
@@ -1580,6 +2322,86 @@ public boolean awaitTermination(long duration, TimeUnit unit) throws Interrupted
     return stub.awaitTermination(duration, unit);
   }
 
+  public static class ListBucketsPagedResponse
+      extends AbstractPagedListResponse<
+          ListBucketsRequest,
+          ListBucketsResponse,
+          LogBucket,
+          ListBucketsPage,
+          ListBucketsFixedSizeCollection> {
+
+    public static ApiFuture createAsync(
+        PageContext context,
+        ApiFuture futureResponse) {
+      ApiFuture futurePage =
+          ListBucketsPage.createEmptyPage().createPageAsync(context, futureResponse);
+      return ApiFutures.transform(
+          futurePage,
+          new ApiFunction() {
+            @Override
+            public ListBucketsPagedResponse apply(ListBucketsPage input) {
+              return new ListBucketsPagedResponse(input);
+            }
+          },
+          MoreExecutors.directExecutor());
+    }
+
+    private ListBucketsPagedResponse(ListBucketsPage page) {
+      super(page, ListBucketsFixedSizeCollection.createEmptyCollection());
+    }
+  }
+
+  public static class ListBucketsPage
+      extends AbstractPage {
+
+    private ListBucketsPage(
+        PageContext context,
+        ListBucketsResponse response) {
+      super(context, response);
+    }
+
+    private static ListBucketsPage createEmptyPage() {
+      return new ListBucketsPage(null, null);
+    }
+
+    @Override
+    protected ListBucketsPage createPage(
+        PageContext context,
+        ListBucketsResponse response) {
+      return new ListBucketsPage(context, response);
+    }
+
+    @Override
+    public ApiFuture createPageAsync(
+        PageContext context,
+        ApiFuture futureResponse) {
+      return super.createPageAsync(context, futureResponse);
+    }
+  }
+
+  public static class ListBucketsFixedSizeCollection
+      extends AbstractFixedSizeCollection<
+          ListBucketsRequest,
+          ListBucketsResponse,
+          LogBucket,
+          ListBucketsPage,
+          ListBucketsFixedSizeCollection> {
+
+    private ListBucketsFixedSizeCollection(List pages, int collectionSize) {
+      super(pages, collectionSize);
+    }
+
+    private static ListBucketsFixedSizeCollection createEmptyCollection() {
+      return new ListBucketsFixedSizeCollection(null, 0);
+    }
+
+    @Override
+    protected ListBucketsFixedSizeCollection createCollection(
+        List pages, int collectionSize) {
+      return new ListBucketsFixedSizeCollection(pages, collectionSize);
+    }
+  }
+
   public static class ListSinksPagedResponse
       extends AbstractPagedListResponse<
           ListSinksRequest,
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigSettings.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigSettings.java
index a741361c3..a27a8dcf3 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigSettings.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigSettings.java
@@ -15,6 +15,7 @@
  */
 package com.google.cloud.logging.v2;
 
+import static com.google.cloud.logging.v2.ConfigClient.ListBucketsPagedResponse;
 import static com.google.cloud.logging.v2.ConfigClient.ListExclusionsPagedResponse;
 import static com.google.cloud.logging.v2.ConfigClient.ListSinksPagedResponse;
 
@@ -35,15 +36,20 @@
 import com.google.logging.v2.CreateSinkRequest;
 import com.google.logging.v2.DeleteExclusionRequest;
 import com.google.logging.v2.DeleteSinkRequest;
+import com.google.logging.v2.GetBucketRequest;
 import com.google.logging.v2.GetCmekSettingsRequest;
 import com.google.logging.v2.GetExclusionRequest;
 import com.google.logging.v2.GetSinkRequest;
+import com.google.logging.v2.ListBucketsRequest;
+import com.google.logging.v2.ListBucketsResponse;
 import com.google.logging.v2.ListExclusionsRequest;
 import com.google.logging.v2.ListExclusionsResponse;
 import com.google.logging.v2.ListSinksRequest;
 import com.google.logging.v2.ListSinksResponse;
+import com.google.logging.v2.LogBucket;
 import com.google.logging.v2.LogExclusion;
 import com.google.logging.v2.LogSink;
+import com.google.logging.v2.UpdateBucketRequest;
 import com.google.logging.v2.UpdateCmekSettingsRequest;
 import com.google.logging.v2.UpdateExclusionRequest;
 import com.google.logging.v2.UpdateSinkRequest;
@@ -67,16 +73,16 @@
  * 

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 getSink to 30 seconds: + *

For example, to set the total timeout of deleteSink to 30 seconds: * *

  * 
  * ConfigSettings.Builder configSettingsBuilder =
  *     ConfigSettings.newBuilder();
  * configSettingsBuilder
- *     .getSinkSettings()
+ *     .deleteSinkSettings()
  *     .setRetrySettings(
- *         configSettingsBuilder.getSinkSettings().getRetrySettings().toBuilder()
+ *         configSettingsBuilder.deleteSinkSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ConfigSettings configSettings = configSettingsBuilder.build();
@@ -86,6 +92,37 @@
 @Generated("by gapic-generator")
 @BetaApi
 public class ConfigSettings extends ClientSettings {
+  /** Returns the object with the settings used for calls to deleteSink. */
+  public UnaryCallSettings deleteSinkSettings() {
+    return ((ConfigServiceV2StubSettings) getStubSettings()).deleteSinkSettings();
+  }
+
+  /** Returns the object with the settings used for calls to updateSink. */
+  public UnaryCallSettings updateSinkSettings() {
+    return ((ConfigServiceV2StubSettings) getStubSettings()).updateSinkSettings();
+  }
+
+  /** Returns the object with the settings used for calls to deleteExclusion. */
+  public UnaryCallSettings deleteExclusionSettings() {
+    return ((ConfigServiceV2StubSettings) getStubSettings()).deleteExclusionSettings();
+  }
+
+  /** Returns the object with the settings used for calls to listBuckets. */
+  public PagedCallSettings
+      listBucketsSettings() {
+    return ((ConfigServiceV2StubSettings) getStubSettings()).listBucketsSettings();
+  }
+
+  /** Returns the object with the settings used for calls to getBucket. */
+  public UnaryCallSettings getBucketSettings() {
+    return ((ConfigServiceV2StubSettings) getStubSettings()).getBucketSettings();
+  }
+
+  /** Returns the object with the settings used for calls to updateBucket. */
+  public UnaryCallSettings updateBucketSettings() {
+    return ((ConfigServiceV2StubSettings) getStubSettings()).updateBucketSettings();
+  }
+
   /** Returns the object with the settings used for calls to listSinks. */
   public PagedCallSettings
       listSinksSettings() {
@@ -102,16 +139,6 @@ public UnaryCallSettings createSinkSettings() {
     return ((ConfigServiceV2StubSettings) getStubSettings()).createSinkSettings();
   }
 
-  /** Returns the object with the settings used for calls to updateSink. */
-  public UnaryCallSettings updateSinkSettings() {
-    return ((ConfigServiceV2StubSettings) getStubSettings()).updateSinkSettings();
-  }
-
-  /** Returns the object with the settings used for calls to deleteSink. */
-  public UnaryCallSettings deleteSinkSettings() {
-    return ((ConfigServiceV2StubSettings) getStubSettings()).deleteSinkSettings();
-  }
-
   /** Returns the object with the settings used for calls to listExclusions. */
   public PagedCallSettings<
           ListExclusionsRequest, ListExclusionsResponse, ListExclusionsPagedResponse>
@@ -134,11 +161,6 @@ public UnaryCallSettings updateExclusionSe
     return ((ConfigServiceV2StubSettings) getStubSettings()).updateExclusionSettings();
   }
 
-  /** Returns the object with the settings used for calls to deleteExclusion. */
-  public UnaryCallSettings deleteExclusionSettings() {
-    return ((ConfigServiceV2StubSettings) getStubSettings()).deleteExclusionSettings();
-  }
-
   /** Returns the object with the settings used for calls to getCmekSettings. */
   public UnaryCallSettings getCmekSettingsSettings() {
     return ((ConfigServiceV2StubSettings) getStubSettings()).getCmekSettingsSettings();
@@ -245,6 +267,38 @@ public Builder applyToAllUnaryMethods(
       return this;
     }
 
+    /** Returns the builder for the settings used for calls to deleteSink. */
+    public UnaryCallSettings.Builder deleteSinkSettings() {
+      return getStubSettingsBuilder().deleteSinkSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to updateSink. */
+    public UnaryCallSettings.Builder updateSinkSettings() {
+      return getStubSettingsBuilder().updateSinkSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to deleteExclusion. */
+    public UnaryCallSettings.Builder deleteExclusionSettings() {
+      return getStubSettingsBuilder().deleteExclusionSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to listBuckets. */
+    public PagedCallSettings.Builder<
+            ListBucketsRequest, ListBucketsResponse, ListBucketsPagedResponse>
+        listBucketsSettings() {
+      return getStubSettingsBuilder().listBucketsSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to getBucket. */
+    public UnaryCallSettings.Builder getBucketSettings() {
+      return getStubSettingsBuilder().getBucketSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to updateBucket. */
+    public UnaryCallSettings.Builder updateBucketSettings() {
+      return getStubSettingsBuilder().updateBucketSettings();
+    }
+
     /** Returns the builder for the settings used for calls to listSinks. */
     public PagedCallSettings.Builder
         listSinksSettings() {
@@ -261,16 +315,6 @@ public UnaryCallSettings.Builder createSinkSettings(
       return getStubSettingsBuilder().createSinkSettings();
     }
 
-    /** Returns the builder for the settings used for calls to updateSink. */
-    public UnaryCallSettings.Builder updateSinkSettings() {
-      return getStubSettingsBuilder().updateSinkSettings();
-    }
-
-    /** Returns the builder for the settings used for calls to deleteSink. */
-    public UnaryCallSettings.Builder deleteSinkSettings() {
-      return getStubSettingsBuilder().deleteSinkSettings();
-    }
-
     /** Returns the builder for the settings used for calls to listExclusions. */
     public PagedCallSettings.Builder<
             ListExclusionsRequest, ListExclusionsResponse, ListExclusionsPagedResponse>
@@ -295,11 +339,6 @@ public UnaryCallSettings.Builder getExclusion
       return getStubSettingsBuilder().updateExclusionSettings();
     }
 
-    /** Returns the builder for the settings used for calls to deleteExclusion. */
-    public UnaryCallSettings.Builder deleteExclusionSettings() {
-      return getStubSettingsBuilder().deleteExclusionSettings();
-    }
-
     /** Returns the builder for the settings used for calls to getCmekSettings. */
     public UnaryCallSettings.Builder
         getCmekSettingsSettings() {
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/LoggingClient.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/LoggingClient.java
index 585d34796..b1d60ed8c 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/LoggingClient.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/LoggingClient.java
@@ -30,7 +30,9 @@
 import com.google.cloud.logging.v2.stub.LoggingServiceV2Stub;
 import com.google.cloud.logging.v2.stub.LoggingServiceV2StubSettings;
 import com.google.common.util.concurrent.MoreExecutors;
+import com.google.logging.v2.BillingAccountName;
 import com.google.logging.v2.DeleteLogRequest;
+import com.google.logging.v2.FolderName;
 import com.google.logging.v2.ListLogEntriesRequest;
 import com.google.logging.v2.ListLogEntriesResponse;
 import com.google.logging.v2.ListLogsRequest;
@@ -39,7 +41,8 @@
 import com.google.logging.v2.ListMonitoredResourceDescriptorsResponse;
 import com.google.logging.v2.LogEntry;
 import com.google.logging.v2.LogName;
-import com.google.logging.v2.ParentName;
+import com.google.logging.v2.OrganizationName;
+import com.google.logging.v2.ProjectName;
 import com.google.logging.v2.WriteLogEntriesRequest;
 import com.google.logging.v2.WriteLogEntriesResponse;
 import com.google.protobuf.Empty;
@@ -59,7 +62,7 @@
  * 
  * 
  * try (LoggingClient loggingClient = LoggingClient.create()) {
- *   LogName logName = ProjectLogName.of("[PROJECT]", "[LOG]");
+ *   LogName logName = LogName.ofProjectLogName("[PROJECT]", "[LOG]");
  *   loggingClient.deleteLog(logName);
  * }
  * 
@@ -177,7 +180,7 @@ public LoggingServiceV2Stub getStub() {
    *
    * 

    * try (LoggingClient loggingClient = LoggingClient.create()) {
-   *   LogName logName = ProjectLogName.of("[PROJECT]", "[LOG]");
+   *   LogName logName = LogName.ofProjectLogName("[PROJECT]", "[LOG]");
    *   loggingClient.deleteLog(logName);
    * }
    * 
@@ -208,7 +211,7 @@ public final void deleteLog(LogName logName) { * *

    * try (LoggingClient loggingClient = LoggingClient.create()) {
-   *   LogName logName = ProjectLogName.of("[PROJECT]", "[LOG]");
+   *   LogName logName = LogName.ofProjectLogName("[PROJECT]", "[LOG]");
    *   loggingClient.deleteLog(logName.toString());
    * }
    * 
@@ -236,7 +239,7 @@ public final void deleteLog(String logName) { * *

    * try (LoggingClient loggingClient = LoggingClient.create()) {
-   *   LogName logName = ProjectLogName.of("[PROJECT]", "[LOG]");
+   *   LogName logName = LogName.ofProjectLogName("[PROJECT]", "[LOG]");
    *   DeleteLogRequest request = DeleteLogRequest.newBuilder()
    *     .setLogName(logName.toString())
    *     .build();
@@ -261,7 +264,7 @@ public final void deleteLog(DeleteLogRequest request) {
    *
    * 

    * try (LoggingClient loggingClient = LoggingClient.create()) {
-   *   LogName logName = ProjectLogName.of("[PROJECT]", "[LOG]");
+   *   LogName logName = LogName.ofProjectLogName("[PROJECT]", "[LOG]");
    *   DeleteLogRequest request = DeleteLogRequest.newBuilder()
    *     .setLogName(logName.toString())
    *     .build();
@@ -275,6 +278,142 @@ public final UnaryCallable deleteLogCallable() {
     return stub.deleteLogCallable();
   }
 
+  // AUTO-GENERATED DOCUMENTATION AND METHOD
+  /**
+   * Lists log entries. Use this method to retrieve log entries that originated from a
+   * project/folder/organization/billing account. For ways to export log entries, see [Exporting
+   * Logs](https://cloud.google.com/logging/docs/export).
+   *
+   * 

Sample code: + * + *


+   * try (LoggingClient loggingClient = LoggingClient.create()) {
+   *   List<String> formattedResourceNames = new ArrayList<>();
+   *   String filter = "";
+   *   String orderBy = "";
+   *   for (LogEntry element : loggingClient.listLogEntries(formattedResourceNames, filter, orderBy).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param resourceNames Required. Names of one or more parent resources from which to retrieve log + * entries: + *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" + *

Projects listed in the `project_ids` field are added to this list. + * @param filter Optional. A filter that chooses which log entries to return. See [Advanced Logs + * Queries](https://cloud.google.com/logging/docs/view/advanced-queries). Only log entries + * that match the filter are returned. An empty filter matches all log entries in the + * resources listed in `resource_names`. Referencing a parent resource that is not listed in + * `resource_names` will cause the filter to return no results. The maximum length of the + * filter is 20000 characters. + * @param orderBy Optional. How the results should be sorted. Presently, the only permitted values + * are `"timestamp asc"` (default) and `"timestamp desc"`. The first option returns entries in + * order of increasing values of `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 their `insert_id` values. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLogEntriesPagedResponse listLogEntries( + List resourceNames, String filter, String orderBy) { + ListLogEntriesRequest request = + ListLogEntriesRequest.newBuilder() + .addAllResourceNames(resourceNames) + .setFilter(filter) + .setOrderBy(orderBy) + .build(); + return listLogEntries(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists log entries. Use this method to retrieve log entries that originated from a + * project/folder/organization/billing account. For ways to export log entries, see [Exporting + * Logs](https://cloud.google.com/logging/docs/export). + * + *

Sample code: + * + *


+   * try (LoggingClient loggingClient = LoggingClient.create()) {
+   *   List<ProjectName> resourceNames = new ArrayList<>();
+   *   ListLogEntriesRequest request = ListLogEntriesRequest.newBuilder()
+   *     .addAllResourceNames(ProjectName.toStringList(resourceNames))
+   *     .build();
+   *   for (LogEntry element : loggingClient.listLogEntries(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLogEntriesPagedResponse listLogEntries(ListLogEntriesRequest request) { + return listLogEntriesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists log entries. Use this method to retrieve log entries that originated from a + * project/folder/organization/billing account. For ways to export log entries, see [Exporting + * Logs](https://cloud.google.com/logging/docs/export). + * + *

Sample code: + * + *


+   * try (LoggingClient loggingClient = LoggingClient.create()) {
+   *   List<ProjectName> resourceNames = new ArrayList<>();
+   *   ListLogEntriesRequest request = ListLogEntriesRequest.newBuilder()
+   *     .addAllResourceNames(ProjectName.toStringList(resourceNames))
+   *     .build();
+   *   ApiFuture<ListLogEntriesPagedResponse> future = loggingClient.listLogEntriesPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (LogEntry element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listLogEntriesPagedCallable() { + return stub.listLogEntriesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists log entries. Use this method to retrieve log entries that originated from a + * project/folder/organization/billing account. For ways to export log entries, see [Exporting + * Logs](https://cloud.google.com/logging/docs/export). + * + *

Sample code: + * + *


+   * try (LoggingClient loggingClient = LoggingClient.create()) {
+   *   List<ProjectName> resourceNames = new ArrayList<>();
+   *   ListLogEntriesRequest request = ListLogEntriesRequest.newBuilder()
+   *     .addAllResourceNames(ProjectName.toStringList(resourceNames))
+   *     .build();
+   *   while (true) {
+   *     ListLogEntriesResponse response = loggingClient.listLogEntriesCallable().call(request);
+   *     for (LogEntry element : response.getEntriesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listLogEntriesCallable() { + return stub.listLogEntriesCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Writes log entries to Logging. This API method is the only way to send log entries to Logging. @@ -286,7 +425,7 @@ public final UnaryCallable deleteLogCallable() { * *

    * try (LoggingClient loggingClient = LoggingClient.create()) {
-   *   LogName logName = ProjectLogName.of("[PROJECT]", "[LOG]");
+   *   LogName logName = LogName.ofProjectLogName("[PROJECT]", "[LOG]");
    *   MonitoredResource resource = MonitoredResource.newBuilder().build();
    *   Map<String, String> labels = new HashMap<>();
    *   List<LogEntry> entries = new ArrayList<>();
@@ -301,10 +440,9 @@ public final UnaryCallable deleteLogCallable() {
    *     

`[LOG_ID]` must be URL-encoded. For example: *

"projects/my-project-id/logs/syslog" * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" - *

The permission <code>logging.logEntries.create</code> is needed on each - * project, organization, billing account, or folder that is receiving new log entries, - * whether the resource is specified in <code>logName</code> or in an individual - * log entry. + *

The permission `logging.logEntries.create` is needed on each project, organization, + * billing account, or folder that is receiving new log entries, whether the resource is + * specified in `logName` or in an individual log entry. * @param resource Optional. A default monitored resource object that is assigned to all log * entries in `entries` that do not specify a value for `resource`. Example: *

{ "type": "gce_instance", "labels": { "zone": "us-central1-a", "instance_id": @@ -325,12 +463,14 @@ public final UnaryCallable deleteLogCallable() { * earlier in the list will sort before the entries later in the list. See the `entries.list` * method. *

Log entries with timestamps that are more than the [logs retention - * period](/logging/quota-policy) in the past or more than 24 hours in the future will not be - * available when calling `entries.list`. However, those log entries can still be [exported - * with LogSinks](/logging/docs/api/tasks/exporting-logs). - *

To improve throughput and to avoid exceeding the [quota limit](/logging/quota-policy) - * for calls to `entries.write`, you should try to include several log entries in this list, - * rather than calling this method for each individual log entry. + * period](https://cloud.google.com/logging/quota-policy) in the past or more than 24 hours in + * the future will not be available when calling `entries.list`. However, those log entries + * can still be [exported with + * LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + *

To improve throughput and to avoid exceeding the [quota + * limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, you + * should try to include several log entries in this list, rather than calling this method for + * each individual log entry. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final WriteLogEntriesResponse writeLogEntries( @@ -359,7 +499,7 @@ public final WriteLogEntriesResponse writeLogEntries( * *


    * try (LoggingClient loggingClient = LoggingClient.create()) {
-   *   LogName logName = ProjectLogName.of("[PROJECT]", "[LOG]");
+   *   LogName logName = LogName.ofProjectLogName("[PROJECT]", "[LOG]");
    *   MonitoredResource resource = MonitoredResource.newBuilder().build();
    *   Map<String, String> labels = new HashMap<>();
    *   List<LogEntry> entries = new ArrayList<>();
@@ -374,10 +514,9 @@ public final WriteLogEntriesResponse writeLogEntries(
    *     

`[LOG_ID]` must be URL-encoded. For example: *

"projects/my-project-id/logs/syslog" * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" - *

The permission <code>logging.logEntries.create</code> is needed on each - * project, organization, billing account, or folder that is receiving new log entries, - * whether the resource is specified in <code>logName</code> or in an individual - * log entry. + *

The permission `logging.logEntries.create` is needed on each project, organization, + * billing account, or folder that is receiving new log entries, whether the resource is + * specified in `logName` or in an individual log entry. * @param resource Optional. A default monitored resource object that is assigned to all log * entries in `entries` that do not specify a value for `resource`. Example: *

{ "type": "gce_instance", "labels": { "zone": "us-central1-a", "instance_id": @@ -398,12 +537,14 @@ public final WriteLogEntriesResponse writeLogEntries( * earlier in the list will sort before the entries later in the list. See the `entries.list` * method. *

Log entries with timestamps that are more than the [logs retention - * period](/logging/quota-policy) in the past or more than 24 hours in the future will not be - * available when calling `entries.list`. However, those log entries can still be [exported - * with LogSinks](/logging/docs/api/tasks/exporting-logs). - *

To improve throughput and to avoid exceeding the [quota limit](/logging/quota-policy) - * for calls to `entries.write`, you should try to include several log entries in this list, - * rather than calling this method for each individual log entry. + * period](https://cloud.google.com/logging/quota-policy) in the past or more than 24 hours in + * the future will not be available when calling `entries.list`. However, those log entries + * can still be [exported with + * LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + *

To improve throughput and to avoid exceeding the [quota + * limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, you + * should try to include several log entries in this list, rather than calling this method for + * each individual log entry. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final WriteLogEntriesResponse writeLogEntries( @@ -475,67 +616,14 @@ public final WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest requ // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists log entries. Use this method to retrieve log entries that originated from a - * project/folder/organization/billing account. For ways to export log entries, see [Exporting - * Logs](/logging/docs/export). - * - *

Sample code: - * - *


-   * try (LoggingClient loggingClient = LoggingClient.create()) {
-   *   List<String> formattedResourceNames = new ArrayList<>();
-   *   String filter = "";
-   *   String orderBy = "";
-   *   for (LogEntry element : loggingClient.listLogEntries(formattedResourceNames, filter, orderBy).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * - * @param resourceNames Required. Names of one or more parent resources from which to retrieve log - * entries: - *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - *

Projects listed in the `project_ids` field are added to this list. - * @param filter Optional. A filter that chooses which log entries to return. See [Advanced Logs - * Queries](/logging/docs/view/advanced-queries). Only log entries that match the filter are - * returned. An empty filter matches all log entries in the resources listed in - * `resource_names`. Referencing a parent resource that is not listed in `resource_names` will - * cause the filter to return no results. The maximum length of the filter is 20000 - * characters. - * @param orderBy Optional. How the results should be sorted. Presently, the only permitted values - * are `"timestamp asc"` (default) and `"timestamp desc"`. The first option returns entries in - * order of increasing values of `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 their `insert_id` values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListLogEntriesPagedResponse listLogEntries( - List resourceNames, String filter, String orderBy) { - ListLogEntriesRequest request = - ListLogEntriesRequest.newBuilder() - .addAllResourceNames(resourceNames) - .setFilter(filter) - .setOrderBy(orderBy) - .build(); - return listLogEntries(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Lists log entries. Use this method to retrieve log entries that originated from a - * project/folder/organization/billing account. For ways to export log entries, see [Exporting - * Logs](/logging/docs/export). + * Lists the descriptors for monitored resource types used by Logging. * *

Sample code: * *


    * try (LoggingClient loggingClient = LoggingClient.create()) {
-   *   List<ParentName> resourceNames = new ArrayList<>();
-   *   ListLogEntriesRequest request = ListLogEntriesRequest.newBuilder()
-   *     .addAllResourceNames(ParentName.toStringList(resourceNames))
-   *     .build();
-   *   for (LogEntry element : loggingClient.listLogEntries(request).iterateAll()) {
+   *   ListMonitoredResourceDescriptorsRequest request = ListMonitoredResourceDescriptorsRequest.newBuilder().build();
+   *   for (MonitoredResourceDescriptor element : loggingClient.listMonitoredResourceDescriptors(request).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
@@ -544,54 +632,46 @@ public final ListLogEntriesPagedResponse listLogEntries(
    * @param request The request object containing all of the parameters for the API call.
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  public final ListLogEntriesPagedResponse listLogEntries(ListLogEntriesRequest request) {
-    return listLogEntriesPagedCallable().call(request);
+  public final ListMonitoredResourceDescriptorsPagedResponse listMonitoredResourceDescriptors(
+      ListMonitoredResourceDescriptorsRequest request) {
+    return listMonitoredResourceDescriptorsPagedCallable().call(request);
   }
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Lists log entries. Use this method to retrieve log entries that originated from a
-   * project/folder/organization/billing account. For ways to export log entries, see [Exporting
-   * Logs](/logging/docs/export).
+   * Lists the descriptors for monitored resource types used by Logging.
    *
    * 

Sample code: * *


    * try (LoggingClient loggingClient = LoggingClient.create()) {
-   *   List<ParentName> resourceNames = new ArrayList<>();
-   *   ListLogEntriesRequest request = ListLogEntriesRequest.newBuilder()
-   *     .addAllResourceNames(ParentName.toStringList(resourceNames))
-   *     .build();
-   *   ApiFuture<ListLogEntriesPagedResponse> future = loggingClient.listLogEntriesPagedCallable().futureCall(request);
+   *   ListMonitoredResourceDescriptorsRequest request = ListMonitoredResourceDescriptorsRequest.newBuilder().build();
+   *   ApiFuture<ListMonitoredResourceDescriptorsPagedResponse> future = loggingClient.listMonitoredResourceDescriptorsPagedCallable().futureCall(request);
    *   // Do something
-   *   for (LogEntry element : future.get().iterateAll()) {
+   *   for (MonitoredResourceDescriptor element : future.get().iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
*/ - public final UnaryCallable - listLogEntriesPagedCallable() { - return stub.listLogEntriesPagedCallable(); + public final UnaryCallable< + ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsPagedResponse> + listMonitoredResourceDescriptorsPagedCallable() { + return stub.listMonitoredResourceDescriptorsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists log entries. Use this method to retrieve log entries that originated from a - * project/folder/organization/billing account. For ways to export log entries, see [Exporting - * Logs](/logging/docs/export). + * Lists the descriptors for monitored resource types used by Logging. * *

Sample code: * *


    * try (LoggingClient loggingClient = LoggingClient.create()) {
-   *   List<ParentName> resourceNames = new ArrayList<>();
-   *   ListLogEntriesRequest request = ListLogEntriesRequest.newBuilder()
-   *     .addAllResourceNames(ParentName.toStringList(resourceNames))
-   *     .build();
+   *   ListMonitoredResourceDescriptorsRequest request = ListMonitoredResourceDescriptorsRequest.newBuilder().build();
    *   while (true) {
-   *     ListLogEntriesResponse response = loggingClient.listLogEntriesCallable().call(request);
-   *     for (LogEntry element : response.getEntriesList()) {
+   *     ListMonitoredResourceDescriptorsResponse response = loggingClient.listMonitoredResourceDescriptorsCallable().call(request);
+   *     for (MonitoredResourceDescriptor element : response.getResourceDescriptorsList()) {
    *       // doThingsWith(element);
    *     }
    *     String nextPageToken = response.getNextPageToken();
@@ -604,85 +684,91 @@ public final ListLogEntriesPagedResponse listLogEntries(ListLogEntriesRequest re
    * }
    * 
*/ - public final UnaryCallable - listLogEntriesCallable() { - return stub.listLogEntriesCallable(); + public final UnaryCallable< + ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsResponse> + listMonitoredResourceDescriptorsCallable() { + return stub.listMonitoredResourceDescriptorsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists the descriptors for monitored resource types used by Logging. + * Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have + * entries are listed. * *

Sample code: * *


    * try (LoggingClient loggingClient = LoggingClient.create()) {
-   *   ListMonitoredResourceDescriptorsRequest request = ListMonitoredResourceDescriptorsRequest.newBuilder().build();
-   *   for (MonitoredResourceDescriptor element : loggingClient.listMonitoredResourceDescriptors(request).iterateAll()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   for (String element : loggingClient.listLogs(parent).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* - * @param request The request object containing all of the parameters for the API call. + * @param parent Required. The resource name that owns the logs: + *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListMonitoredResourceDescriptorsPagedResponse listMonitoredResourceDescriptors( - ListMonitoredResourceDescriptorsRequest request) { - return listMonitoredResourceDescriptorsPagedCallable().call(request); + public final ListLogsPagedResponse listLogs(ProjectName parent) { + ListLogsRequest request = + ListLogsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listLogs(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists the descriptors for monitored resource types used by Logging. + * Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have + * entries are listed. * *

Sample code: * *


    * try (LoggingClient loggingClient = LoggingClient.create()) {
-   *   ListMonitoredResourceDescriptorsRequest request = ListMonitoredResourceDescriptorsRequest.newBuilder().build();
-   *   ApiFuture<ListMonitoredResourceDescriptorsPagedResponse> future = loggingClient.listMonitoredResourceDescriptorsPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (MonitoredResourceDescriptor element : future.get().iterateAll()) {
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   for (String element : loggingClient.listLogs(parent).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
+ * + * @param parent Required. The resource name that owns the logs: + *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable< - ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsPagedResponse> - listMonitoredResourceDescriptorsPagedCallable() { - return stub.listMonitoredResourceDescriptorsPagedCallable(); + public final ListLogsPagedResponse listLogs(OrganizationName parent) { + ListLogsRequest request = + ListLogsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listLogs(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists the descriptors for monitored resource types used by Logging. + * Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have + * entries are listed. * *

Sample code: * *


    * try (LoggingClient loggingClient = LoggingClient.create()) {
-   *   ListMonitoredResourceDescriptorsRequest request = ListMonitoredResourceDescriptorsRequest.newBuilder().build();
-   *   while (true) {
-   *     ListMonitoredResourceDescriptorsResponse response = loggingClient.listMonitoredResourceDescriptorsCallable().call(request);
-   *     for (MonitoredResourceDescriptor element : response.getResourceDescriptorsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
+   *   FolderName parent = FolderName.of("[FOLDER]");
+   *   for (String element : loggingClient.listLogs(parent).iterateAll()) {
+   *     // doThingsWith(element);
    *   }
    * }
    * 
+ * + * @param parent Required. The resource name that owns the logs: + *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable< - ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsResponse> - listMonitoredResourceDescriptorsCallable() { - return stub.listMonitoredResourceDescriptorsCallable(); + public final ListLogsPagedResponse listLogs(FolderName parent) { + ListLogsRequest request = + ListLogsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listLogs(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -694,7 +780,7 @@ public final ListMonitoredResourceDescriptorsPagedResponse listMonitoredResource * *


    * try (LoggingClient loggingClient = LoggingClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   BillingAccountName parent = BillingAccountName.of("[BILLING_ACCOUNT]");
    *   for (String element : loggingClient.listLogs(parent).iterateAll()) {
    *     // doThingsWith(element);
    *   }
@@ -706,7 +792,7 @@ public final ListMonitoredResourceDescriptorsPagedResponse listMonitoredResource
    *     "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]"
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  public final ListLogsPagedResponse listLogs(ParentName parent) {
+  public final ListLogsPagedResponse listLogs(BillingAccountName parent) {
     ListLogsRequest request =
         ListLogsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
     return listLogs(request);
@@ -721,7 +807,7 @@ public final ListLogsPagedResponse listLogs(ParentName parent) {
    *
    * 

    * try (LoggingClient loggingClient = LoggingClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   for (String element : loggingClient.listLogs(parent.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
@@ -747,7 +833,7 @@ public final ListLogsPagedResponse listLogs(String parent) {
    *
    * 

    * try (LoggingClient loggingClient = LoggingClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   ListLogsRequest request = ListLogsRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -773,7 +859,7 @@ public final ListLogsPagedResponse listLogs(ListLogsRequest request) {
    *
    * 

    * try (LoggingClient loggingClient = LoggingClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   ListLogsRequest request = ListLogsRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -798,7 +884,7 @@ public final UnaryCallable listLogsPaged
    *
    * 

    * try (LoggingClient loggingClient = LoggingClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   ListLogsRequest request = ListLogsRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/LoggingSettings.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/LoggingSettings.java
index e1f26543c..ac0a7ff6e 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/LoggingSettings.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/LoggingSettings.java
@@ -85,12 +85,6 @@ public UnaryCallSettings deleteLogSettings() {
     return ((LoggingServiceV2StubSettings) getStubSettings()).deleteLogSettings();
   }
 
-  /** Returns the object with the settings used for calls to writeLogEntries. */
-  public BatchingCallSettings
-      writeLogEntriesSettings() {
-    return ((LoggingServiceV2StubSettings) getStubSettings()).writeLogEntriesSettings();
-  }
-
   /** Returns the object with the settings used for calls to listLogEntries. */
   public PagedCallSettings<
           ListLogEntriesRequest, ListLogEntriesResponse, ListLogEntriesPagedResponse>
@@ -98,6 +92,12 @@ public UnaryCallSettings deleteLogSettings() {
     return ((LoggingServiceV2StubSettings) getStubSettings()).listLogEntriesSettings();
   }
 
+  /** Returns the object with the settings used for calls to writeLogEntries. */
+  public BatchingCallSettings
+      writeLogEntriesSettings() {
+    return ((LoggingServiceV2StubSettings) getStubSettings()).writeLogEntriesSettings();
+  }
+
   /** Returns the object with the settings used for calls to listMonitoredResourceDescriptors. */
   public PagedCallSettings<
           ListMonitoredResourceDescriptorsRequest,
@@ -215,12 +215,6 @@ public UnaryCallSettings.Builder deleteLogSettings() {
       return getStubSettingsBuilder().deleteLogSettings();
     }
 
-    /** Returns the builder for the settings used for calls to writeLogEntries. */
-    public BatchingCallSettings.Builder
-        writeLogEntriesSettings() {
-      return getStubSettingsBuilder().writeLogEntriesSettings();
-    }
-
     /** Returns the builder for the settings used for calls to listLogEntries. */
     public PagedCallSettings.Builder<
             ListLogEntriesRequest, ListLogEntriesResponse, ListLogEntriesPagedResponse>
@@ -228,6 +222,12 @@ public UnaryCallSettings.Builder deleteLogSettings() {
       return getStubSettingsBuilder().listLogEntriesSettings();
     }
 
+    /** Returns the builder for the settings used for calls to writeLogEntries. */
+    public BatchingCallSettings.Builder
+        writeLogEntriesSettings() {
+      return getStubSettingsBuilder().writeLogEntriesSettings();
+    }
+
     /** Returns the builder for the settings used for calls to listMonitoredResourceDescriptors. */
     public PagedCallSettings.Builder<
             ListMonitoredResourceDescriptorsRequest,
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/MetricsClient.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/MetricsClient.java
index d41bb68c3..3edc54dd0 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/MetricsClient.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/MetricsClient.java
@@ -34,8 +34,8 @@
 import com.google.logging.v2.ListLogMetricsRequest;
 import com.google.logging.v2.ListLogMetricsResponse;
 import com.google.logging.v2.LogMetric;
-import com.google.logging.v2.MetricName;
-import com.google.logging.v2.ParentName;
+import com.google.logging.v2.LogMetricName;
+import com.google.logging.v2.ProjectName;
 import com.google.logging.v2.UpdateLogMetricRequest;
 import com.google.protobuf.Empty;
 import java.io.IOException;
@@ -53,8 +53,9 @@
  * 
  * 
  * try (MetricsClient metricsClient = MetricsClient.create()) {
- *   MetricName metricName = ProjectMetricName.of("[PROJECT]", "[METRIC]");
- *   LogMetric response = metricsClient.getLogMetric(metricName);
+ *   LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]");
+ *   LogMetric metric = LogMetric.newBuilder().build();
+ *   LogMetric response = metricsClient.updateLogMetric(metricName, metric);
  * }
  * 
  * 
@@ -161,6 +162,207 @@ public MetricsServiceV2Stub getStub() { return stub; } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates or updates a logs-based metric. + * + *

Sample code: + * + *


+   * try (MetricsClient metricsClient = MetricsClient.create()) {
+   *   LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]");
+   *   LogMetric metric = LogMetric.newBuilder().build();
+   *   LogMetric response = metricsClient.updateLogMetric(metricName, metric);
+   * }
+   * 
+ * + * @param metricName Required. The resource name of the metric to update: + *

"projects/[PROJECT_ID]/metrics/[METRIC_ID]" + *

The updated metric must be provided in the request and it's `name` field must be the + * same as `[METRIC_ID]` If the metric does not exist in `[PROJECT_ID]`, then a new metric is + * created. + * @param metric Required. The updated metric. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LogMetric updateLogMetric(LogMetricName metricName, LogMetric metric) { + UpdateLogMetricRequest request = + UpdateLogMetricRequest.newBuilder() + .setMetricName(metricName == null ? null : metricName.toString()) + .setMetric(metric) + .build(); + return updateLogMetric(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates or updates a logs-based metric. + * + *

Sample code: + * + *


+   * try (MetricsClient metricsClient = MetricsClient.create()) {
+   *   LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]");
+   *   LogMetric metric = LogMetric.newBuilder().build();
+   *   LogMetric response = metricsClient.updateLogMetric(metricName.toString(), metric);
+   * }
+   * 
+ * + * @param metricName Required. The resource name of the metric to update: + *

"projects/[PROJECT_ID]/metrics/[METRIC_ID]" + *

The updated metric must be provided in the request and it's `name` field must be the + * same as `[METRIC_ID]` If the metric does not exist in `[PROJECT_ID]`, then a new metric is + * created. + * @param metric Required. The updated metric. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LogMetric updateLogMetric(String metricName, LogMetric metric) { + UpdateLogMetricRequest request = + UpdateLogMetricRequest.newBuilder().setMetricName(metricName).setMetric(metric).build(); + return updateLogMetric(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates or updates a logs-based metric. + * + *

Sample code: + * + *


+   * try (MetricsClient metricsClient = MetricsClient.create()) {
+   *   LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]");
+   *   LogMetric metric = LogMetric.newBuilder().build();
+   *   UpdateLogMetricRequest request = UpdateLogMetricRequest.newBuilder()
+   *     .setMetricName(metricName.toString())
+   *     .setMetric(metric)
+   *     .build();
+   *   LogMetric response = metricsClient.updateLogMetric(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LogMetric updateLogMetric(UpdateLogMetricRequest request) { + return updateLogMetricCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates or updates a logs-based metric. + * + *

Sample code: + * + *


+   * try (MetricsClient metricsClient = MetricsClient.create()) {
+   *   LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]");
+   *   LogMetric metric = LogMetric.newBuilder().build();
+   *   UpdateLogMetricRequest request = UpdateLogMetricRequest.newBuilder()
+   *     .setMetricName(metricName.toString())
+   *     .setMetric(metric)
+   *     .build();
+   *   ApiFuture<LogMetric> future = metricsClient.updateLogMetricCallable().futureCall(request);
+   *   // Do something
+   *   LogMetric response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable updateLogMetricCallable() { + return stub.updateLogMetricCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a logs-based metric. + * + *

Sample code: + * + *


+   * try (MetricsClient metricsClient = MetricsClient.create()) {
+   *   LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]");
+   *   metricsClient.deleteLogMetric(metricName);
+   * }
+   * 
+ * + * @param metricName Required. The resource name of the metric to delete: + *

"projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteLogMetric(LogMetricName metricName) { + DeleteLogMetricRequest request = + DeleteLogMetricRequest.newBuilder() + .setMetricName(metricName == null ? null : metricName.toString()) + .build(); + deleteLogMetric(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a logs-based metric. + * + *

Sample code: + * + *


+   * try (MetricsClient metricsClient = MetricsClient.create()) {
+   *   LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]");
+   *   metricsClient.deleteLogMetric(metricName.toString());
+   * }
+   * 
+ * + * @param metricName Required. The resource name of the metric to delete: + *

"projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteLogMetric(String metricName) { + DeleteLogMetricRequest request = + DeleteLogMetricRequest.newBuilder().setMetricName(metricName).build(); + deleteLogMetric(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a logs-based metric. + * + *

Sample code: + * + *


+   * try (MetricsClient metricsClient = MetricsClient.create()) {
+   *   LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]");
+   *   DeleteLogMetricRequest request = DeleteLogMetricRequest.newBuilder()
+   *     .setMetricName(metricName.toString())
+   *     .build();
+   *   metricsClient.deleteLogMetric(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteLogMetric(DeleteLogMetricRequest request) { + deleteLogMetricCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a logs-based metric. + * + *

Sample code: + * + *


+   * try (MetricsClient metricsClient = MetricsClient.create()) {
+   *   LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]");
+   *   DeleteLogMetricRequest request = DeleteLogMetricRequest.newBuilder()
+   *     .setMetricName(metricName.toString())
+   *     .build();
+   *   ApiFuture<Void> future = metricsClient.deleteLogMetricCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteLogMetricCallable() { + return stub.deleteLogMetricCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Lists logs-based metrics. @@ -169,7 +371,7 @@ public MetricsServiceV2Stub getStub() { * *

    * try (MetricsClient metricsClient = MetricsClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   for (LogMetric element : metricsClient.listLogMetrics(parent).iterateAll()) {
    *     // doThingsWith(element);
    *   }
@@ -180,7 +382,7 @@ public MetricsServiceV2Stub getStub() {
    *     

"projects/[PROJECT_ID]" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListLogMetricsPagedResponse listLogMetrics(ParentName parent) { + public final ListLogMetricsPagedResponse listLogMetrics(ProjectName parent) { ListLogMetricsRequest request = ListLogMetricsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) @@ -196,7 +398,7 @@ public final ListLogMetricsPagedResponse listLogMetrics(ParentName parent) { * *


    * try (MetricsClient metricsClient = MetricsClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   for (LogMetric element : metricsClient.listLogMetrics(parent.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
@@ -220,7 +422,7 @@ public final ListLogMetricsPagedResponse listLogMetrics(String parent) {
    *
    * 

    * try (MetricsClient metricsClient = MetricsClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   ListLogMetricsRequest request = ListLogMetricsRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -245,7 +447,7 @@ public final ListLogMetricsPagedResponse listLogMetrics(ListLogMetricsRequest re
    *
    * 

    * try (MetricsClient metricsClient = MetricsClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   ListLogMetricsRequest request = ListLogMetricsRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -270,7 +472,7 @@ public final ListLogMetricsPagedResponse listLogMetrics(ListLogMetricsRequest re
    *
    * 

    * try (MetricsClient metricsClient = MetricsClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   ListLogMetricsRequest request = ListLogMetricsRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -302,7 +504,7 @@ public final ListLogMetricsPagedResponse listLogMetrics(ListLogMetricsRequest re
    *
    * 

    * try (MetricsClient metricsClient = MetricsClient.create()) {
-   *   MetricName metricName = ProjectMetricName.of("[PROJECT]", "[METRIC]");
+   *   LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]");
    *   LogMetric response = metricsClient.getLogMetric(metricName);
    * }
    * 
@@ -311,7 +513,7 @@ public final ListLogMetricsPagedResponse listLogMetrics(ListLogMetricsRequest re *

"projects/[PROJECT_ID]/metrics/[METRIC_ID]" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final LogMetric getLogMetric(MetricName metricName) { + public final LogMetric getLogMetric(LogMetricName metricName) { GetLogMetricRequest request = GetLogMetricRequest.newBuilder() .setMetricName(metricName == null ? null : metricName.toString()) @@ -327,7 +529,7 @@ public final LogMetric getLogMetric(MetricName metricName) { * *


    * try (MetricsClient metricsClient = MetricsClient.create()) {
-   *   MetricName metricName = ProjectMetricName.of("[PROJECT]", "[METRIC]");
+   *   LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]");
    *   LogMetric response = metricsClient.getLogMetric(metricName.toString());
    * }
    * 
@@ -350,7 +552,7 @@ public final LogMetric getLogMetric(String metricName) { * *

    * try (MetricsClient metricsClient = MetricsClient.create()) {
-   *   MetricName metricName = ProjectMetricName.of("[PROJECT]", "[METRIC]");
+   *   LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]");
    *   GetLogMetricRequest request = GetLogMetricRequest.newBuilder()
    *     .setMetricName(metricName.toString())
    *     .build();
@@ -373,7 +575,7 @@ public final LogMetric getLogMetric(GetLogMetricRequest request) {
    *
    * 

    * try (MetricsClient metricsClient = MetricsClient.create()) {
-   *   MetricName metricName = ProjectMetricName.of("[PROJECT]", "[METRIC]");
+   *   LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]");
    *   GetLogMetricRequest request = GetLogMetricRequest.newBuilder()
    *     .setMetricName(metricName.toString())
    *     .build();
@@ -395,7 +597,7 @@ public final UnaryCallable getLogMetricCallable(
    *
    * 

    * try (MetricsClient metricsClient = MetricsClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   LogMetric metric = LogMetric.newBuilder().build();
    *   LogMetric response = metricsClient.createLogMetric(parent, metric);
    * }
@@ -408,7 +610,7 @@ public final UnaryCallable getLogMetricCallable(
    *     already exists.
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  public final LogMetric createLogMetric(ParentName parent, LogMetric metric) {
+  public final LogMetric createLogMetric(ProjectName parent, LogMetric metric) {
     CreateLogMetricRequest request =
         CreateLogMetricRequest.newBuilder()
             .setParent(parent == null ? null : parent.toString())
@@ -425,7 +627,7 @@ public final LogMetric createLogMetric(ParentName parent, LogMetric metric) {
    *
    * 

    * try (MetricsClient metricsClient = MetricsClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   LogMetric metric = LogMetric.newBuilder().build();
    *   LogMetric response = metricsClient.createLogMetric(parent.toString(), metric);
    * }
@@ -452,7 +654,7 @@ public final LogMetric createLogMetric(String parent, LogMetric metric) {
    *
    * 

    * try (MetricsClient metricsClient = MetricsClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   LogMetric metric = LogMetric.newBuilder().build();
    *   CreateLogMetricRequest request = CreateLogMetricRequest.newBuilder()
    *     .setParent(parent.toString())
@@ -477,7 +679,7 @@ public final LogMetric createLogMetric(CreateLogMetricRequest request) {
    *
    * 

    * try (MetricsClient metricsClient = MetricsClient.create()) {
-   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   LogMetric metric = LogMetric.newBuilder().build();
    *   CreateLogMetricRequest request = CreateLogMetricRequest.newBuilder()
    *     .setParent(parent.toString())
@@ -493,207 +695,6 @@ public final UnaryCallable createLogMetricCal
     return stub.createLogMetricCallable();
   }
 
-  // AUTO-GENERATED DOCUMENTATION AND METHOD
-  /**
-   * Creates or updates a logs-based metric.
-   *
-   * 

Sample code: - * - *


-   * try (MetricsClient metricsClient = MetricsClient.create()) {
-   *   MetricName metricName = ProjectMetricName.of("[PROJECT]", "[METRIC]");
-   *   LogMetric metric = LogMetric.newBuilder().build();
-   *   LogMetric response = metricsClient.updateLogMetric(metricName, metric);
-   * }
-   * 
- * - * @param metricName Required. The resource name of the metric to update: - *

"projects/[PROJECT_ID]/metrics/[METRIC_ID]" - *

The updated metric must be provided in the request and it's `name` field must be the - * same as `[METRIC_ID]` If the metric does not exist in `[PROJECT_ID]`, then a new metric is - * created. - * @param metric Required. The updated metric. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final LogMetric updateLogMetric(MetricName metricName, LogMetric metric) { - UpdateLogMetricRequest request = - UpdateLogMetricRequest.newBuilder() - .setMetricName(metricName == null ? null : metricName.toString()) - .setMetric(metric) - .build(); - return updateLogMetric(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Creates or updates a logs-based metric. - * - *

Sample code: - * - *


-   * try (MetricsClient metricsClient = MetricsClient.create()) {
-   *   MetricName metricName = ProjectMetricName.of("[PROJECT]", "[METRIC]");
-   *   LogMetric metric = LogMetric.newBuilder().build();
-   *   LogMetric response = metricsClient.updateLogMetric(metricName.toString(), metric);
-   * }
-   * 
- * - * @param metricName Required. The resource name of the metric to update: - *

"projects/[PROJECT_ID]/metrics/[METRIC_ID]" - *

The updated metric must be provided in the request and it's `name` field must be the - * same as `[METRIC_ID]` If the metric does not exist in `[PROJECT_ID]`, then a new metric is - * created. - * @param metric Required. The updated metric. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final LogMetric updateLogMetric(String metricName, LogMetric metric) { - UpdateLogMetricRequest request = - UpdateLogMetricRequest.newBuilder().setMetricName(metricName).setMetric(metric).build(); - return updateLogMetric(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Creates or updates a logs-based metric. - * - *

Sample code: - * - *


-   * try (MetricsClient metricsClient = MetricsClient.create()) {
-   *   MetricName metricName = ProjectMetricName.of("[PROJECT]", "[METRIC]");
-   *   LogMetric metric = LogMetric.newBuilder().build();
-   *   UpdateLogMetricRequest request = UpdateLogMetricRequest.newBuilder()
-   *     .setMetricName(metricName.toString())
-   *     .setMetric(metric)
-   *     .build();
-   *   LogMetric response = metricsClient.updateLogMetric(request);
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final LogMetric updateLogMetric(UpdateLogMetricRequest request) { - return updateLogMetricCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Creates or updates a logs-based metric. - * - *

Sample code: - * - *


-   * try (MetricsClient metricsClient = MetricsClient.create()) {
-   *   MetricName metricName = ProjectMetricName.of("[PROJECT]", "[METRIC]");
-   *   LogMetric metric = LogMetric.newBuilder().build();
-   *   UpdateLogMetricRequest request = UpdateLogMetricRequest.newBuilder()
-   *     .setMetricName(metricName.toString())
-   *     .setMetric(metric)
-   *     .build();
-   *   ApiFuture<LogMetric> future = metricsClient.updateLogMetricCallable().futureCall(request);
-   *   // Do something
-   *   LogMetric response = future.get();
-   * }
-   * 
- */ - public final UnaryCallable updateLogMetricCallable() { - return stub.updateLogMetricCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes a logs-based metric. - * - *

Sample code: - * - *


-   * try (MetricsClient metricsClient = MetricsClient.create()) {
-   *   MetricName metricName = ProjectMetricName.of("[PROJECT]", "[METRIC]");
-   *   metricsClient.deleteLogMetric(metricName);
-   * }
-   * 
- * - * @param metricName Required. The resource name of the metric to delete: - *

"projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteLogMetric(MetricName metricName) { - DeleteLogMetricRequest request = - DeleteLogMetricRequest.newBuilder() - .setMetricName(metricName == null ? null : metricName.toString()) - .build(); - deleteLogMetric(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes a logs-based metric. - * - *

Sample code: - * - *


-   * try (MetricsClient metricsClient = MetricsClient.create()) {
-   *   MetricName metricName = ProjectMetricName.of("[PROJECT]", "[METRIC]");
-   *   metricsClient.deleteLogMetric(metricName.toString());
-   * }
-   * 
- * - * @param metricName Required. The resource name of the metric to delete: - *

"projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteLogMetric(String metricName) { - DeleteLogMetricRequest request = - DeleteLogMetricRequest.newBuilder().setMetricName(metricName).build(); - deleteLogMetric(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes a logs-based metric. - * - *

Sample code: - * - *


-   * try (MetricsClient metricsClient = MetricsClient.create()) {
-   *   MetricName metricName = ProjectMetricName.of("[PROJECT]", "[METRIC]");
-   *   DeleteLogMetricRequest request = DeleteLogMetricRequest.newBuilder()
-   *     .setMetricName(metricName.toString())
-   *     .build();
-   *   metricsClient.deleteLogMetric(request);
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteLogMetric(DeleteLogMetricRequest request) { - deleteLogMetricCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes a logs-based metric. - * - *

Sample code: - * - *


-   * try (MetricsClient metricsClient = MetricsClient.create()) {
-   *   MetricName metricName = ProjectMetricName.of("[PROJECT]", "[METRIC]");
-   *   DeleteLogMetricRequest request = DeleteLogMetricRequest.newBuilder()
-   *     .setMetricName(metricName.toString())
-   *     .build();
-   *   ApiFuture<Void> future = metricsClient.deleteLogMetricCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - public final UnaryCallable deleteLogMetricCallable() { - return stub.deleteLogMetricCallable(); - } - @Override public final void close() { stub.close(); diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/MetricsSettings.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/MetricsSettings.java index 03341b0fc..f59061f6c 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/MetricsSettings.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/MetricsSettings.java @@ -56,16 +56,16 @@ *

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 getLogMetric to 30 seconds: + *

For example, to set the total timeout of updateLogMetric to 30 seconds: * *

  * 
  * MetricsSettings.Builder metricsSettingsBuilder =
  *     MetricsSettings.newBuilder();
  * metricsSettingsBuilder
- *     .getLogMetricSettings()
+ *     .updateLogMetricSettings()
  *     .setRetrySettings(
- *         metricsSettingsBuilder.getLogMetricSettings().getRetrySettings().toBuilder()
+ *         metricsSettingsBuilder.updateLogMetricSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * MetricsSettings metricsSettings = metricsSettingsBuilder.build();
@@ -75,6 +75,16 @@
 @Generated("by gapic-generator")
 @BetaApi
 public class MetricsSettings extends ClientSettings {
+  /** Returns the object with the settings used for calls to updateLogMetric. */
+  public UnaryCallSettings updateLogMetricSettings() {
+    return ((MetricsServiceV2StubSettings) getStubSettings()).updateLogMetricSettings();
+  }
+
+  /** Returns the object with the settings used for calls to deleteLogMetric. */
+  public UnaryCallSettings deleteLogMetricSettings() {
+    return ((MetricsServiceV2StubSettings) getStubSettings()).deleteLogMetricSettings();
+  }
+
   /** Returns the object with the settings used for calls to listLogMetrics. */
   public PagedCallSettings<
           ListLogMetricsRequest, ListLogMetricsResponse, ListLogMetricsPagedResponse>
@@ -92,16 +102,6 @@ public UnaryCallSettings createLogMetricSetti
     return ((MetricsServiceV2StubSettings) getStubSettings()).createLogMetricSettings();
   }
 
-  /** Returns the object with the settings used for calls to updateLogMetric. */
-  public UnaryCallSettings updateLogMetricSettings() {
-    return ((MetricsServiceV2StubSettings) getStubSettings()).updateLogMetricSettings();
-  }
-
-  /** Returns the object with the settings used for calls to deleteLogMetric. */
-  public UnaryCallSettings deleteLogMetricSettings() {
-    return ((MetricsServiceV2StubSettings) getStubSettings()).deleteLogMetricSettings();
-  }
-
   public static final MetricsSettings create(MetricsServiceV2StubSettings stub) throws IOException {
     return new MetricsSettings.Builder(stub.toBuilder()).build();
   }
@@ -198,6 +198,16 @@ public Builder applyToAllUnaryMethods(
       return this;
     }
 
+    /** Returns the builder for the settings used for calls to updateLogMetric. */
+    public UnaryCallSettings.Builder updateLogMetricSettings() {
+      return getStubSettingsBuilder().updateLogMetricSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to deleteLogMetric. */
+    public UnaryCallSettings.Builder deleteLogMetricSettings() {
+      return getStubSettingsBuilder().deleteLogMetricSettings();
+    }
+
     /** Returns the builder for the settings used for calls to listLogMetrics. */
     public PagedCallSettings.Builder<
             ListLogMetricsRequest, ListLogMetricsResponse, ListLogMetricsPagedResponse>
@@ -215,16 +225,6 @@ public UnaryCallSettings.Builder createLogMet
       return getStubSettingsBuilder().createLogMetricSettings();
     }
 
-    /** Returns the builder for the settings used for calls to updateLogMetric. */
-    public UnaryCallSettings.Builder updateLogMetricSettings() {
-      return getStubSettingsBuilder().updateLogMetricSettings();
-    }
-
-    /** Returns the builder for the settings used for calls to deleteLogMetric. */
-    public UnaryCallSettings.Builder deleteLogMetricSettings() {
-      return getStubSettingsBuilder().deleteLogMetricSettings();
-    }
-
     @Override
     public MetricsSettings build() throws IOException {
       return new MetricsSettings(this);
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/package-info.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/package-info.java
index c698c5ea1..15ab78c84 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/package-info.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/package-info.java
@@ -28,8 +28,8 @@
  * 
  * 
  * try (ConfigClient configClient = ConfigClient.create()) {
- *   SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
- *   LogSink response = configClient.getSink(sinkName);
+ *   LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
+ *   configClient.deleteSink(sinkName);
  * }
  * 
  * 
@@ -43,7 +43,7 @@ *
  * 
  * try (LoggingClient loggingClient = LoggingClient.create()) {
- *   LogName logName = ProjectLogName.of("[PROJECT]", "[LOG]");
+ *   LogName logName = LogName.ofProjectLogName("[PROJECT]", "[LOG]");
  *   loggingClient.deleteLog(logName);
  * }
  * 
@@ -58,8 +58,9 @@
  * 
  * 
  * try (MetricsClient metricsClient = MetricsClient.create()) {
- *   MetricName metricName = ProjectMetricName.of("[PROJECT]", "[METRIC]");
- *   LogMetric response = metricsClient.getLogMetric(metricName);
+ *   LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]");
+ *   LogMetric metric = LogMetric.newBuilder().build();
+ *   LogMetric response = metricsClient.updateLogMetric(metricName, metric);
  * }
  * 
  * 
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/ConfigServiceV2Stub.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/ConfigServiceV2Stub.java index 703a3521a..146eb3f37 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/ConfigServiceV2Stub.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/ConfigServiceV2Stub.java @@ -15,6 +15,7 @@ */ package com.google.cloud.logging.v2.stub; +import static com.google.cloud.logging.v2.ConfigClient.ListBucketsPagedResponse; import static com.google.cloud.logging.v2.ConfigClient.ListExclusionsPagedResponse; import static com.google.cloud.logging.v2.ConfigClient.ListSinksPagedResponse; @@ -26,15 +27,20 @@ import com.google.logging.v2.CreateSinkRequest; import com.google.logging.v2.DeleteExclusionRequest; import com.google.logging.v2.DeleteSinkRequest; +import com.google.logging.v2.GetBucketRequest; import com.google.logging.v2.GetCmekSettingsRequest; import com.google.logging.v2.GetExclusionRequest; import com.google.logging.v2.GetSinkRequest; +import com.google.logging.v2.ListBucketsRequest; +import com.google.logging.v2.ListBucketsResponse; import com.google.logging.v2.ListExclusionsRequest; import com.google.logging.v2.ListExclusionsResponse; import com.google.logging.v2.ListSinksRequest; import com.google.logging.v2.ListSinksResponse; +import com.google.logging.v2.LogBucket; import com.google.logging.v2.LogExclusion; import com.google.logging.v2.LogSink; +import com.google.logging.v2.UpdateBucketRequest; import com.google.logging.v2.UpdateCmekSettingsRequest; import com.google.logging.v2.UpdateExclusionRequest; import com.google.logging.v2.UpdateSinkRequest; @@ -51,6 +57,34 @@ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public abstract class ConfigServiceV2Stub implements BackgroundResource { + public UnaryCallable deleteSinkCallable() { + throw new UnsupportedOperationException("Not implemented: deleteSinkCallable()"); + } + + public UnaryCallable updateSinkCallable() { + throw new UnsupportedOperationException("Not implemented: updateSinkCallable()"); + } + + public UnaryCallable deleteExclusionCallable() { + throw new UnsupportedOperationException("Not implemented: deleteExclusionCallable()"); + } + + public UnaryCallable listBucketsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listBucketsPagedCallable()"); + } + + public UnaryCallable listBucketsCallable() { + throw new UnsupportedOperationException("Not implemented: listBucketsCallable()"); + } + + public UnaryCallable getBucketCallable() { + throw new UnsupportedOperationException("Not implemented: getBucketCallable()"); + } + + public UnaryCallable updateBucketCallable() { + throw new UnsupportedOperationException("Not implemented: updateBucketCallable()"); + } + public UnaryCallable listSinksPagedCallable() { throw new UnsupportedOperationException("Not implemented: listSinksPagedCallable()"); } @@ -67,14 +101,6 @@ public UnaryCallable createSinkCallable() { throw new UnsupportedOperationException("Not implemented: createSinkCallable()"); } - public UnaryCallable updateSinkCallable() { - throw new UnsupportedOperationException("Not implemented: updateSinkCallable()"); - } - - public UnaryCallable deleteSinkCallable() { - throw new UnsupportedOperationException("Not implemented: deleteSinkCallable()"); - } - public UnaryCallable listExclusionsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listExclusionsPagedCallable()"); @@ -96,10 +122,6 @@ public UnaryCallable updateExclusionCallab throw new UnsupportedOperationException("Not implemented: updateExclusionCallable()"); } - public UnaryCallable deleteExclusionCallable() { - throw new UnsupportedOperationException("Not implemented: deleteExclusionCallable()"); - } - public UnaryCallable getCmekSettingsCallable() { throw new UnsupportedOperationException("Not implemented: getCmekSettingsCallable()"); } diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/ConfigServiceV2StubSettings.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/ConfigServiceV2StubSettings.java index 3953e3e5e..8f752d1c9 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/ConfigServiceV2StubSettings.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/ConfigServiceV2StubSettings.java @@ -15,6 +15,7 @@ */ package com.google.cloud.logging.v2.stub; +import static com.google.cloud.logging.v2.ConfigClient.ListBucketsPagedResponse; import static com.google.cloud.logging.v2.ConfigClient.ListExclusionsPagedResponse; import static com.google.cloud.logging.v2.ConfigClient.ListSinksPagedResponse; @@ -49,15 +50,20 @@ import com.google.logging.v2.CreateSinkRequest; import com.google.logging.v2.DeleteExclusionRequest; import com.google.logging.v2.DeleteSinkRequest; +import com.google.logging.v2.GetBucketRequest; import com.google.logging.v2.GetCmekSettingsRequest; import com.google.logging.v2.GetExclusionRequest; import com.google.logging.v2.GetSinkRequest; +import com.google.logging.v2.ListBucketsRequest; +import com.google.logging.v2.ListBucketsResponse; import com.google.logging.v2.ListExclusionsRequest; import com.google.logging.v2.ListExclusionsResponse; import com.google.logging.v2.ListSinksRequest; import com.google.logging.v2.ListSinksResponse; +import com.google.logging.v2.LogBucket; import com.google.logging.v2.LogExclusion; import com.google.logging.v2.LogSink; +import com.google.logging.v2.UpdateBucketRequest; import com.google.logging.v2.UpdateCmekSettingsRequest; import com.google.logging.v2.UpdateExclusionRequest; import com.google.logging.v2.UpdateSinkRequest; @@ -82,16 +88,16 @@ *

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 getSink to 30 seconds: + *

For example, to set the total timeout of deleteSink to 30 seconds: * *

  * 
  * ConfigServiceV2StubSettings.Builder configSettingsBuilder =
  *     ConfigServiceV2StubSettings.newBuilder();
  * configSettingsBuilder
- *     .getSinkSettings()
+ *     .deleteSinkSettings()
  *     .setRetrySettings(
- *         configSettingsBuilder.getSinkSettings().getRetrySettings().toBuilder()
+ *         configSettingsBuilder.deleteSinkSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ConfigServiceV2StubSettings configSettings = configSettingsBuilder.build();
@@ -111,23 +117,58 @@ public class ConfigServiceV2StubSettings extends StubSettings deleteSinkSettings;
+  private final UnaryCallSettings updateSinkSettings;
+  private final UnaryCallSettings deleteExclusionSettings;
+  private final PagedCallSettings
+      listBucketsSettings;
+  private final UnaryCallSettings getBucketSettings;
+  private final UnaryCallSettings updateBucketSettings;
   private final PagedCallSettings
       listSinksSettings;
   private final UnaryCallSettings getSinkSettings;
   private final UnaryCallSettings createSinkSettings;
-  private final UnaryCallSettings updateSinkSettings;
-  private final UnaryCallSettings deleteSinkSettings;
   private final PagedCallSettings<
           ListExclusionsRequest, ListExclusionsResponse, ListExclusionsPagedResponse>
       listExclusionsSettings;
   private final UnaryCallSettings getExclusionSettings;
   private final UnaryCallSettings createExclusionSettings;
   private final UnaryCallSettings updateExclusionSettings;
-  private final UnaryCallSettings deleteExclusionSettings;
   private final UnaryCallSettings getCmekSettingsSettings;
   private final UnaryCallSettings
       updateCmekSettingsSettings;
 
+  /** Returns the object with the settings used for calls to deleteSink. */
+  public UnaryCallSettings deleteSinkSettings() {
+    return deleteSinkSettings;
+  }
+
+  /** Returns the object with the settings used for calls to updateSink. */
+  public UnaryCallSettings updateSinkSettings() {
+    return updateSinkSettings;
+  }
+
+  /** Returns the object with the settings used for calls to deleteExclusion. */
+  public UnaryCallSettings deleteExclusionSettings() {
+    return deleteExclusionSettings;
+  }
+
+  /** Returns the object with the settings used for calls to listBuckets. */
+  public PagedCallSettings
+      listBucketsSettings() {
+    return listBucketsSettings;
+  }
+
+  /** Returns the object with the settings used for calls to getBucket. */
+  public UnaryCallSettings getBucketSettings() {
+    return getBucketSettings;
+  }
+
+  /** Returns the object with the settings used for calls to updateBucket. */
+  public UnaryCallSettings updateBucketSettings() {
+    return updateBucketSettings;
+  }
+
   /** Returns the object with the settings used for calls to listSinks. */
   public PagedCallSettings
       listSinksSettings() {
@@ -144,16 +185,6 @@ public UnaryCallSettings createSinkSettings() {
     return createSinkSettings;
   }
 
-  /** Returns the object with the settings used for calls to updateSink. */
-  public UnaryCallSettings updateSinkSettings() {
-    return updateSinkSettings;
-  }
-
-  /** Returns the object with the settings used for calls to deleteSink. */
-  public UnaryCallSettings deleteSinkSettings() {
-    return deleteSinkSettings;
-  }
-
   /** Returns the object with the settings used for calls to listExclusions. */
   public PagedCallSettings<
           ListExclusionsRequest, ListExclusionsResponse, ListExclusionsPagedResponse>
@@ -176,11 +207,6 @@ public UnaryCallSettings updateExclusionSe
     return updateExclusionSettings;
   }
 
-  /** Returns the object with the settings used for calls to deleteExclusion. */
-  public UnaryCallSettings deleteExclusionSettings() {
-    return deleteExclusionSettings;
-  }
-
   /** Returns the object with the settings used for calls to getCmekSettings. */
   public UnaryCallSettings getCmekSettingsSettings() {
     return getCmekSettingsSettings;
@@ -260,20 +286,59 @@ public Builder toBuilder() {
   protected ConfigServiceV2StubSettings(Builder settingsBuilder) throws IOException {
     super(settingsBuilder);
 
+    deleteSinkSettings = settingsBuilder.deleteSinkSettings().build();
+    updateSinkSettings = settingsBuilder.updateSinkSettings().build();
+    deleteExclusionSettings = settingsBuilder.deleteExclusionSettings().build();
+    listBucketsSettings = settingsBuilder.listBucketsSettings().build();
+    getBucketSettings = settingsBuilder.getBucketSettings().build();
+    updateBucketSettings = settingsBuilder.updateBucketSettings().build();
     listSinksSettings = settingsBuilder.listSinksSettings().build();
     getSinkSettings = settingsBuilder.getSinkSettings().build();
     createSinkSettings = settingsBuilder.createSinkSettings().build();
-    updateSinkSettings = settingsBuilder.updateSinkSettings().build();
-    deleteSinkSettings = settingsBuilder.deleteSinkSettings().build();
     listExclusionsSettings = settingsBuilder.listExclusionsSettings().build();
     getExclusionSettings = settingsBuilder.getExclusionSettings().build();
     createExclusionSettings = settingsBuilder.createExclusionSettings().build();
     updateExclusionSettings = settingsBuilder.updateExclusionSettings().build();
-    deleteExclusionSettings = settingsBuilder.deleteExclusionSettings().build();
     getCmekSettingsSettings = settingsBuilder.getCmekSettingsSettings().build();
     updateCmekSettingsSettings = settingsBuilder.updateCmekSettingsSettings().build();
   }
 
+  private static final PagedListDescriptor
+      LIST_BUCKETS_PAGE_STR_DESC =
+          new PagedListDescriptor() {
+            @Override
+            public String emptyToken() {
+              return "";
+            }
+
+            @Override
+            public ListBucketsRequest injectToken(ListBucketsRequest payload, String token) {
+              return ListBucketsRequest.newBuilder(payload).setPageToken(token).build();
+            }
+
+            @Override
+            public ListBucketsRequest injectPageSize(ListBucketsRequest payload, int pageSize) {
+              return ListBucketsRequest.newBuilder(payload).setPageSize(pageSize).build();
+            }
+
+            @Override
+            public Integer extractPageSize(ListBucketsRequest payload) {
+              return payload.getPageSize();
+            }
+
+            @Override
+            public String extractNextToken(ListBucketsResponse payload) {
+              return payload.getNextPageToken();
+            }
+
+            @Override
+            public Iterable extractResources(ListBucketsResponse payload) {
+              return payload.getBucketsList() != null
+                  ? payload.getBucketsList()
+                  : ImmutableList.of();
+            }
+          };
+
   private static final PagedListDescriptor
       LIST_SINKS_PAGE_STR_DESC =
           new PagedListDescriptor() {
@@ -348,6 +413,23 @@ public Iterable extractResources(ListExclusionsResponse payload) {
             }
           };
 
+  private static final PagedListResponseFactory<
+          ListBucketsRequest, ListBucketsResponse, ListBucketsPagedResponse>
+      LIST_BUCKETS_PAGE_STR_FACT =
+          new PagedListResponseFactory<
+              ListBucketsRequest, ListBucketsResponse, ListBucketsPagedResponse>() {
+            @Override
+            public ApiFuture getFuturePagedResponse(
+                UnaryCallable callable,
+                ListBucketsRequest request,
+                ApiCallContext context,
+                ApiFuture futureResponse) {
+              PageContext pageContext =
+                  PageContext.create(callable, LIST_BUCKETS_PAGE_STR_DESC, request, context);
+              return ListBucketsPagedResponse.createAsync(pageContext, futureResponse);
+            }
+          };
+
   private static final PagedListResponseFactory<
           ListSinksRequest, ListSinksResponse, ListSinksPagedResponse>
       LIST_SINKS_PAGE_STR_FACT =
@@ -386,13 +468,19 @@ public ApiFuture getFuturePagedResponse(
   public static class Builder extends StubSettings.Builder {
     private final ImmutableList> unaryMethodSettingsBuilders;
 
+    private final UnaryCallSettings.Builder deleteSinkSettings;
+    private final UnaryCallSettings.Builder updateSinkSettings;
+    private final UnaryCallSettings.Builder deleteExclusionSettings;
+    private final PagedCallSettings.Builder<
+            ListBucketsRequest, ListBucketsResponse, ListBucketsPagedResponse>
+        listBucketsSettings;
+    private final UnaryCallSettings.Builder getBucketSettings;
+    private final UnaryCallSettings.Builder updateBucketSettings;
     private final PagedCallSettings.Builder<
             ListSinksRequest, ListSinksResponse, ListSinksPagedResponse>
         listSinksSettings;
     private final UnaryCallSettings.Builder getSinkSettings;
     private final UnaryCallSettings.Builder createSinkSettings;
-    private final UnaryCallSettings.Builder updateSinkSettings;
-    private final UnaryCallSettings.Builder deleteSinkSettings;
     private final PagedCallSettings.Builder<
             ListExclusionsRequest, ListExclusionsResponse, ListExclusionsPagedResponse>
         listExclusionsSettings;
@@ -401,7 +489,6 @@ public static class Builder extends StubSettings.Builder
         updateExclusionSettings;
-    private final UnaryCallSettings.Builder deleteExclusionSettings;
     private final UnaryCallSettings.Builder
         getCmekSettingsSettings;
     private final UnaryCallSettings.Builder
@@ -445,17 +532,6 @@ public static class Builder extends StubSettings.Builder>of(
+              deleteSinkSettings,
+              updateSinkSettings,
+              deleteExclusionSettings,
+              listBucketsSettings,
+              getBucketSettings,
+              updateBucketSettings,
               listSinksSettings,
               getSinkSettings,
               createSinkSettings,
-              updateSinkSettings,
-              deleteSinkSettings,
               listExclusionsSettings,
               getExclusionSettings,
               createExclusionSettings,
               updateExclusionSettings,
-              deleteExclusionSettings,
               getCmekSettingsSettings,
               updateCmekSettingsSettings);
 
@@ -520,38 +605,58 @@ private static Builder createDefault() {
     private static Builder initDefaults(Builder builder) {
 
       builder
-          .listSinksSettings()
+          .deleteSinkSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .getSinkSettings()
+          .updateSinkSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .createSinkSettings()
+          .deleteExclusionSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .listBucketsSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent2"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .getBucketSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent2"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .updateBucketSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .updateSinkSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .listSinksSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent2"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .deleteSinkSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .getSinkSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent2"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .createSinkSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
           .listExclusionsSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent2"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
           .getExclusionSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent2"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
@@ -564,11 +669,6 @@ private static Builder initDefaults(Builder builder) {
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
-      builder
-          .deleteExclusionSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
-
       builder
           .getCmekSettingsSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent2"))
@@ -585,31 +685,37 @@ private static Builder initDefaults(Builder builder) {
     protected Builder(ConfigServiceV2StubSettings settings) {
       super(settings);
 
+      deleteSinkSettings = settings.deleteSinkSettings.toBuilder();
+      updateSinkSettings = settings.updateSinkSettings.toBuilder();
+      deleteExclusionSettings = settings.deleteExclusionSettings.toBuilder();
+      listBucketsSettings = settings.listBucketsSettings.toBuilder();
+      getBucketSettings = settings.getBucketSettings.toBuilder();
+      updateBucketSettings = settings.updateBucketSettings.toBuilder();
       listSinksSettings = settings.listSinksSettings.toBuilder();
       getSinkSettings = settings.getSinkSettings.toBuilder();
       createSinkSettings = settings.createSinkSettings.toBuilder();
-      updateSinkSettings = settings.updateSinkSettings.toBuilder();
-      deleteSinkSettings = settings.deleteSinkSettings.toBuilder();
       listExclusionsSettings = settings.listExclusionsSettings.toBuilder();
       getExclusionSettings = settings.getExclusionSettings.toBuilder();
       createExclusionSettings = settings.createExclusionSettings.toBuilder();
       updateExclusionSettings = settings.updateExclusionSettings.toBuilder();
-      deleteExclusionSettings = settings.deleteExclusionSettings.toBuilder();
       getCmekSettingsSettings = settings.getCmekSettingsSettings.toBuilder();
       updateCmekSettingsSettings = settings.updateCmekSettingsSettings.toBuilder();
 
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
+              deleteSinkSettings,
+              updateSinkSettings,
+              deleteExclusionSettings,
+              listBucketsSettings,
+              getBucketSettings,
+              updateBucketSettings,
               listSinksSettings,
               getSinkSettings,
               createSinkSettings,
-              updateSinkSettings,
-              deleteSinkSettings,
               listExclusionsSettings,
               getExclusionSettings,
               createExclusionSettings,
               updateExclusionSettings,
-              deleteExclusionSettings,
               getCmekSettingsSettings,
               updateCmekSettingsSettings);
     }
@@ -630,6 +736,38 @@ public Builder applyToAllUnaryMethods(
       return unaryMethodSettingsBuilders;
     }
 
+    /** Returns the builder for the settings used for calls to deleteSink. */
+    public UnaryCallSettings.Builder deleteSinkSettings() {
+      return deleteSinkSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to updateSink. */
+    public UnaryCallSettings.Builder updateSinkSettings() {
+      return updateSinkSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to deleteExclusion. */
+    public UnaryCallSettings.Builder deleteExclusionSettings() {
+      return deleteExclusionSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to listBuckets. */
+    public PagedCallSettings.Builder<
+            ListBucketsRequest, ListBucketsResponse, ListBucketsPagedResponse>
+        listBucketsSettings() {
+      return listBucketsSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to getBucket. */
+    public UnaryCallSettings.Builder getBucketSettings() {
+      return getBucketSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to updateBucket. */
+    public UnaryCallSettings.Builder updateBucketSettings() {
+      return updateBucketSettings;
+    }
+
     /** Returns the builder for the settings used for calls to listSinks. */
     public PagedCallSettings.Builder
         listSinksSettings() {
@@ -646,16 +784,6 @@ public UnaryCallSettings.Builder createSinkSettings(
       return createSinkSettings;
     }
 
-    /** Returns the builder for the settings used for calls to updateSink. */
-    public UnaryCallSettings.Builder updateSinkSettings() {
-      return updateSinkSettings;
-    }
-
-    /** Returns the builder for the settings used for calls to deleteSink. */
-    public UnaryCallSettings.Builder deleteSinkSettings() {
-      return deleteSinkSettings;
-    }
-
     /** Returns the builder for the settings used for calls to listExclusions. */
     public PagedCallSettings.Builder<
             ListExclusionsRequest, ListExclusionsResponse, ListExclusionsPagedResponse>
@@ -680,11 +808,6 @@ public UnaryCallSettings.Builder getExclusion
       return updateExclusionSettings;
     }
 
-    /** Returns the builder for the settings used for calls to deleteExclusion. */
-    public UnaryCallSettings.Builder deleteExclusionSettings() {
-      return deleteExclusionSettings;
-    }
-
     /** Returns the builder for the settings used for calls to getCmekSettings. */
     public UnaryCallSettings.Builder
         getCmekSettingsSettings() {
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcConfigServiceV2Stub.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcConfigServiceV2Stub.java
index 6e097337b..bce5de2a9 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcConfigServiceV2Stub.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcConfigServiceV2Stub.java
@@ -15,6 +15,7 @@
  */
 package com.google.cloud.logging.v2.stub;
 
+import static com.google.cloud.logging.v2.ConfigClient.ListBucketsPagedResponse;
 import static com.google.cloud.logging.v2.ConfigClient.ListExclusionsPagedResponse;
 import static com.google.cloud.logging.v2.ConfigClient.ListSinksPagedResponse;
 
@@ -32,15 +33,20 @@
 import com.google.logging.v2.CreateSinkRequest;
 import com.google.logging.v2.DeleteExclusionRequest;
 import com.google.logging.v2.DeleteSinkRequest;
+import com.google.logging.v2.GetBucketRequest;
 import com.google.logging.v2.GetCmekSettingsRequest;
 import com.google.logging.v2.GetExclusionRequest;
 import com.google.logging.v2.GetSinkRequest;
+import com.google.logging.v2.ListBucketsRequest;
+import com.google.logging.v2.ListBucketsResponse;
 import com.google.logging.v2.ListExclusionsRequest;
 import com.google.logging.v2.ListExclusionsResponse;
 import com.google.logging.v2.ListSinksRequest;
 import com.google.logging.v2.ListSinksResponse;
+import com.google.logging.v2.LogBucket;
 import com.google.logging.v2.LogExclusion;
 import com.google.logging.v2.LogSink;
+import com.google.logging.v2.UpdateBucketRequest;
 import com.google.logging.v2.UpdateCmekSettingsRequest;
 import com.google.logging.v2.UpdateExclusionRequest;
 import com.google.logging.v2.UpdateSinkRequest;
@@ -62,6 +68,53 @@
 @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
 public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub {
 
+  private static final MethodDescriptor deleteSinkMethodDescriptor =
+      MethodDescriptor.newBuilder()
+          .setType(MethodDescriptor.MethodType.UNARY)
+          .setFullMethodName("google.logging.v2.ConfigServiceV2/DeleteSink")
+          .setRequestMarshaller(ProtoUtils.marshaller(DeleteSinkRequest.getDefaultInstance()))
+          .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+          .build();
+  private static final MethodDescriptor updateSinkMethodDescriptor =
+      MethodDescriptor.newBuilder()
+          .setType(MethodDescriptor.MethodType.UNARY)
+          .setFullMethodName("google.logging.v2.ConfigServiceV2/UpdateSink")
+          .setRequestMarshaller(ProtoUtils.marshaller(UpdateSinkRequest.getDefaultInstance()))
+          .setResponseMarshaller(ProtoUtils.marshaller(LogSink.getDefaultInstance()))
+          .build();
+  private static final MethodDescriptor
+      deleteExclusionMethodDescriptor =
+          MethodDescriptor.newBuilder()
+              .setType(MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName("google.logging.v2.ConfigServiceV2/DeleteExclusion")
+              .setRequestMarshaller(
+                  ProtoUtils.marshaller(DeleteExclusionRequest.getDefaultInstance()))
+              .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+              .build();
+  private static final MethodDescriptor
+      listBucketsMethodDescriptor =
+          MethodDescriptor.newBuilder()
+              .setType(MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName("google.logging.v2.ConfigServiceV2/ListBuckets")
+              .setRequestMarshaller(ProtoUtils.marshaller(ListBucketsRequest.getDefaultInstance()))
+              .setResponseMarshaller(
+                  ProtoUtils.marshaller(ListBucketsResponse.getDefaultInstance()))
+              .build();
+  private static final MethodDescriptor getBucketMethodDescriptor =
+      MethodDescriptor.newBuilder()
+          .setType(MethodDescriptor.MethodType.UNARY)
+          .setFullMethodName("google.logging.v2.ConfigServiceV2/GetBucket")
+          .setRequestMarshaller(ProtoUtils.marshaller(GetBucketRequest.getDefaultInstance()))
+          .setResponseMarshaller(ProtoUtils.marshaller(LogBucket.getDefaultInstance()))
+          .build();
+  private static final MethodDescriptor
+      updateBucketMethodDescriptor =
+          MethodDescriptor.newBuilder()
+              .setType(MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName("google.logging.v2.ConfigServiceV2/UpdateBucket")
+              .setRequestMarshaller(ProtoUtils.marshaller(UpdateBucketRequest.getDefaultInstance()))
+              .setResponseMarshaller(ProtoUtils.marshaller(LogBucket.getDefaultInstance()))
+              .build();
   private static final MethodDescriptor
       listSinksMethodDescriptor =
           MethodDescriptor.newBuilder()
@@ -84,20 +137,6 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub {
           .setRequestMarshaller(ProtoUtils.marshaller(CreateSinkRequest.getDefaultInstance()))
           .setResponseMarshaller(ProtoUtils.marshaller(LogSink.getDefaultInstance()))
           .build();
-  private static final MethodDescriptor updateSinkMethodDescriptor =
-      MethodDescriptor.newBuilder()
-          .setType(MethodDescriptor.MethodType.UNARY)
-          .setFullMethodName("google.logging.v2.ConfigServiceV2/UpdateSink")
-          .setRequestMarshaller(ProtoUtils.marshaller(UpdateSinkRequest.getDefaultInstance()))
-          .setResponseMarshaller(ProtoUtils.marshaller(LogSink.getDefaultInstance()))
-          .build();
-  private static final MethodDescriptor deleteSinkMethodDescriptor =
-      MethodDescriptor.newBuilder()
-          .setType(MethodDescriptor.MethodType.UNARY)
-          .setFullMethodName("google.logging.v2.ConfigServiceV2/DeleteSink")
-          .setRequestMarshaller(ProtoUtils.marshaller(DeleteSinkRequest.getDefaultInstance()))
-          .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
-          .build();
   private static final MethodDescriptor
       listExclusionsMethodDescriptor =
           MethodDescriptor.newBuilder()
@@ -134,15 +173,6 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub {
                   ProtoUtils.marshaller(UpdateExclusionRequest.getDefaultInstance()))
               .setResponseMarshaller(ProtoUtils.marshaller(LogExclusion.getDefaultInstance()))
               .build();
-  private static final MethodDescriptor
-      deleteExclusionMethodDescriptor =
-          MethodDescriptor.newBuilder()
-              .setType(MethodDescriptor.MethodType.UNARY)
-              .setFullMethodName("google.logging.v2.ConfigServiceV2/DeleteExclusion")
-              .setRequestMarshaller(
-                  ProtoUtils.marshaller(DeleteExclusionRequest.getDefaultInstance()))
-              .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
-              .build();
   private static final MethodDescriptor
       getCmekSettingsMethodDescriptor =
           MethodDescriptor.newBuilder()
@@ -164,19 +194,24 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub {
 
   private final BackgroundResource backgroundResources;
 
+  private final UnaryCallable deleteSinkCallable;
+  private final UnaryCallable updateSinkCallable;
+  private final UnaryCallable deleteExclusionCallable;
+  private final UnaryCallable listBucketsCallable;
+  private final UnaryCallable
+      listBucketsPagedCallable;
+  private final UnaryCallable getBucketCallable;
+  private final UnaryCallable updateBucketCallable;
   private final UnaryCallable listSinksCallable;
   private final UnaryCallable listSinksPagedCallable;
   private final UnaryCallable getSinkCallable;
   private final UnaryCallable createSinkCallable;
-  private final UnaryCallable updateSinkCallable;
-  private final UnaryCallable deleteSinkCallable;
   private final UnaryCallable listExclusionsCallable;
   private final UnaryCallable
       listExclusionsPagedCallable;
   private final UnaryCallable getExclusionCallable;
   private final UnaryCallable createExclusionCallable;
   private final UnaryCallable updateExclusionCallable;
-  private final UnaryCallable deleteExclusionCallable;
   private final UnaryCallable getCmekSettingsCallable;
   private final UnaryCallable updateCmekSettingsCallable;
 
@@ -221,6 +256,84 @@ protected GrpcConfigServiceV2Stub(
       throws IOException {
     this.callableFactory = callableFactory;
 
+    GrpcCallSettings deleteSinkTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(deleteSinkMethodDescriptor)
+            .setParamsExtractor(
+                new RequestParamsExtractor() {
+                  @Override
+                  public Map extract(DeleteSinkRequest request) {
+                    ImmutableMap.Builder params = ImmutableMap.builder();
+                    params.put("sink_name", String.valueOf(request.getSinkName()));
+                    return params.build();
+                  }
+                })
+            .build();
+    GrpcCallSettings updateSinkTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(updateSinkMethodDescriptor)
+            .setParamsExtractor(
+                new RequestParamsExtractor() {
+                  @Override
+                  public Map extract(UpdateSinkRequest request) {
+                    ImmutableMap.Builder params = ImmutableMap.builder();
+                    params.put("sink_name", String.valueOf(request.getSinkName()));
+                    return params.build();
+                  }
+                })
+            .build();
+    GrpcCallSettings deleteExclusionTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(deleteExclusionMethodDescriptor)
+            .setParamsExtractor(
+                new RequestParamsExtractor() {
+                  @Override
+                  public Map extract(DeleteExclusionRequest request) {
+                    ImmutableMap.Builder params = ImmutableMap.builder();
+                    params.put("name", String.valueOf(request.getName()));
+                    return params.build();
+                  }
+                })
+            .build();
+    GrpcCallSettings listBucketsTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(listBucketsMethodDescriptor)
+            .setParamsExtractor(
+                new RequestParamsExtractor() {
+                  @Override
+                  public Map extract(ListBucketsRequest request) {
+                    ImmutableMap.Builder params = ImmutableMap.builder();
+                    params.put("parent", String.valueOf(request.getParent()));
+                    return params.build();
+                  }
+                })
+            .build();
+    GrpcCallSettings getBucketTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(getBucketMethodDescriptor)
+            .setParamsExtractor(
+                new RequestParamsExtractor() {
+                  @Override
+                  public Map extract(GetBucketRequest request) {
+                    ImmutableMap.Builder params = ImmutableMap.builder();
+                    params.put("name", String.valueOf(request.getName()));
+                    return params.build();
+                  }
+                })
+            .build();
+    GrpcCallSettings updateBucketTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(updateBucketMethodDescriptor)
+            .setParamsExtractor(
+                new RequestParamsExtractor() {
+                  @Override
+                  public Map extract(UpdateBucketRequest request) {
+                    ImmutableMap.Builder params = ImmutableMap.builder();
+                    params.put("name", String.valueOf(request.getName()));
+                    return params.build();
+                  }
+                })
+            .build();
     GrpcCallSettings listSinksTransportSettings =
         GrpcCallSettings.newBuilder()
             .setMethodDescriptor(listSinksMethodDescriptor)
@@ -260,32 +373,6 @@ public Map extract(CreateSinkRequest request) {
                   }
                 })
             .build();
-    GrpcCallSettings updateSinkTransportSettings =
-        GrpcCallSettings.newBuilder()
-            .setMethodDescriptor(updateSinkMethodDescriptor)
-            .setParamsExtractor(
-                new RequestParamsExtractor() {
-                  @Override
-                  public Map extract(UpdateSinkRequest request) {
-                    ImmutableMap.Builder params = ImmutableMap.builder();
-                    params.put("sink_name", String.valueOf(request.getSinkName()));
-                    return params.build();
-                  }
-                })
-            .build();
-    GrpcCallSettings deleteSinkTransportSettings =
-        GrpcCallSettings.newBuilder()
-            .setMethodDescriptor(deleteSinkMethodDescriptor)
-            .setParamsExtractor(
-                new RequestParamsExtractor() {
-                  @Override
-                  public Map extract(DeleteSinkRequest request) {
-                    ImmutableMap.Builder params = ImmutableMap.builder();
-                    params.put("sink_name", String.valueOf(request.getSinkName()));
-                    return params.build();
-                  }
-                })
-            .build();
     GrpcCallSettings
         listExclusionsTransportSettings =
             GrpcCallSettings.newBuilder()
@@ -339,19 +426,6 @@ public Map extract(UpdateExclusionRequest request) {
                   }
                 })
             .build();
-    GrpcCallSettings deleteExclusionTransportSettings =
-        GrpcCallSettings.newBuilder()
-            .setMethodDescriptor(deleteExclusionMethodDescriptor)
-            .setParamsExtractor(
-                new RequestParamsExtractor() {
-                  @Override
-                  public Map extract(DeleteExclusionRequest request) {
-                    ImmutableMap.Builder params = ImmutableMap.builder();
-                    params.put("name", String.valueOf(request.getName()));
-                    return params.build();
-                  }
-                })
-            .build();
     GrpcCallSettings getCmekSettingsTransportSettings =
         GrpcCallSettings.newBuilder()
             .setMethodDescriptor(getCmekSettingsMethodDescriptor)
@@ -379,6 +453,27 @@ public Map extract(UpdateCmekSettingsRequest request) {
                 })
             .build();
 
+    this.deleteSinkCallable =
+        callableFactory.createUnaryCallable(
+            deleteSinkTransportSettings, settings.deleteSinkSettings(), clientContext);
+    this.updateSinkCallable =
+        callableFactory.createUnaryCallable(
+            updateSinkTransportSettings, settings.updateSinkSettings(), clientContext);
+    this.deleteExclusionCallable =
+        callableFactory.createUnaryCallable(
+            deleteExclusionTransportSettings, settings.deleteExclusionSettings(), clientContext);
+    this.listBucketsCallable =
+        callableFactory.createUnaryCallable(
+            listBucketsTransportSettings, settings.listBucketsSettings(), clientContext);
+    this.listBucketsPagedCallable =
+        callableFactory.createPagedCallable(
+            listBucketsTransportSettings, settings.listBucketsSettings(), clientContext);
+    this.getBucketCallable =
+        callableFactory.createUnaryCallable(
+            getBucketTransportSettings, settings.getBucketSettings(), clientContext);
+    this.updateBucketCallable =
+        callableFactory.createUnaryCallable(
+            updateBucketTransportSettings, settings.updateBucketSettings(), clientContext);
     this.listSinksCallable =
         callableFactory.createUnaryCallable(
             listSinksTransportSettings, settings.listSinksSettings(), clientContext);
@@ -391,12 +486,6 @@ public Map extract(UpdateCmekSettingsRequest request) {
     this.createSinkCallable =
         callableFactory.createUnaryCallable(
             createSinkTransportSettings, settings.createSinkSettings(), clientContext);
-    this.updateSinkCallable =
-        callableFactory.createUnaryCallable(
-            updateSinkTransportSettings, settings.updateSinkSettings(), clientContext);
-    this.deleteSinkCallable =
-        callableFactory.createUnaryCallable(
-            deleteSinkTransportSettings, settings.deleteSinkSettings(), clientContext);
     this.listExclusionsCallable =
         callableFactory.createUnaryCallable(
             listExclusionsTransportSettings, settings.listExclusionsSettings(), clientContext);
@@ -412,9 +501,6 @@ public Map extract(UpdateCmekSettingsRequest request) {
     this.updateExclusionCallable =
         callableFactory.createUnaryCallable(
             updateExclusionTransportSettings, settings.updateExclusionSettings(), clientContext);
-    this.deleteExclusionCallable =
-        callableFactory.createUnaryCallable(
-            deleteExclusionTransportSettings, settings.deleteExclusionSettings(), clientContext);
     this.getCmekSettingsCallable =
         callableFactory.createUnaryCallable(
             getCmekSettingsTransportSettings, settings.getCmekSettingsSettings(), clientContext);
@@ -427,6 +513,34 @@ public Map extract(UpdateCmekSettingsRequest request) {
     backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources());
   }
 
+  public UnaryCallable deleteSinkCallable() {
+    return deleteSinkCallable;
+  }
+
+  public UnaryCallable updateSinkCallable() {
+    return updateSinkCallable;
+  }
+
+  public UnaryCallable deleteExclusionCallable() {
+    return deleteExclusionCallable;
+  }
+
+  public UnaryCallable listBucketsPagedCallable() {
+    return listBucketsPagedCallable;
+  }
+
+  public UnaryCallable listBucketsCallable() {
+    return listBucketsCallable;
+  }
+
+  public UnaryCallable getBucketCallable() {
+    return getBucketCallable;
+  }
+
+  public UnaryCallable updateBucketCallable() {
+    return updateBucketCallable;
+  }
+
   public UnaryCallable listSinksPagedCallable() {
     return listSinksPagedCallable;
   }
@@ -443,14 +557,6 @@ public UnaryCallable createSinkCallable() {
     return createSinkCallable;
   }
 
-  public UnaryCallable updateSinkCallable() {
-    return updateSinkCallable;
-  }
-
-  public UnaryCallable deleteSinkCallable() {
-    return deleteSinkCallable;
-  }
-
   public UnaryCallable
       listExclusionsPagedCallable() {
     return listExclusionsPagedCallable;
@@ -472,10 +578,6 @@ public UnaryCallable updateExclusionCallab
     return updateExclusionCallable;
   }
 
-  public UnaryCallable deleteExclusionCallable() {
-    return deleteExclusionCallable;
-  }
-
   public UnaryCallable getCmekSettingsCallable() {
     return getCmekSettingsCallable;
   }
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcLoggingServiceV2Stub.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcLoggingServiceV2Stub.java
index 7ba813dca..05c3a310e 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcLoggingServiceV2Stub.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcLoggingServiceV2Stub.java
@@ -62,16 +62,6 @@ public class GrpcLoggingServiceV2Stub extends LoggingServiceV2Stub {
           .setRequestMarshaller(ProtoUtils.marshaller(DeleteLogRequest.getDefaultInstance()))
           .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
           .build();
-  private static final MethodDescriptor
-      writeLogEntriesMethodDescriptor =
-          MethodDescriptor.newBuilder()
-              .setType(MethodDescriptor.MethodType.UNARY)
-              .setFullMethodName("google.logging.v2.LoggingServiceV2/WriteLogEntries")
-              .setRequestMarshaller(
-                  ProtoUtils.marshaller(WriteLogEntriesRequest.getDefaultInstance()))
-              .setResponseMarshaller(
-                  ProtoUtils.marshaller(WriteLogEntriesResponse.getDefaultInstance()))
-              .build();
   private static final MethodDescriptor
       listLogEntriesMethodDescriptor =
           MethodDescriptor.newBuilder()
@@ -82,6 +72,16 @@ public class GrpcLoggingServiceV2Stub extends LoggingServiceV2Stub {
               .setResponseMarshaller(
                   ProtoUtils.marshaller(ListLogEntriesResponse.getDefaultInstance()))
               .build();
+  private static final MethodDescriptor
+      writeLogEntriesMethodDescriptor =
+          MethodDescriptor.newBuilder()
+              .setType(MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName("google.logging.v2.LoggingServiceV2/WriteLogEntries")
+              .setRequestMarshaller(
+                  ProtoUtils.marshaller(WriteLogEntriesRequest.getDefaultInstance()))
+              .setResponseMarshaller(
+                  ProtoUtils.marshaller(WriteLogEntriesResponse.getDefaultInstance()))
+              .build();
   private static final MethodDescriptor<
           ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsResponse>
       listMonitoredResourceDescriptorsMethodDescriptor =
@@ -110,11 +110,11 @@ public class GrpcLoggingServiceV2Stub extends LoggingServiceV2Stub {
   private final BackgroundResource backgroundResources;
 
   private final UnaryCallable deleteLogCallable;
-  private final UnaryCallable
-      writeLogEntriesCallable;
   private final UnaryCallable listLogEntriesCallable;
   private final UnaryCallable
       listLogEntriesPagedCallable;
+  private final UnaryCallable
+      writeLogEntriesCallable;
   private final UnaryCallable<
           ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsResponse>
       listMonitoredResourceDescriptorsCallable;
@@ -178,16 +178,16 @@ public Map extract(DeleteLogRequest request) {
                   }
                 })
             .build();
-    GrpcCallSettings
-        writeLogEntriesTransportSettings =
-            GrpcCallSettings.newBuilder()
-                .setMethodDescriptor(writeLogEntriesMethodDescriptor)
-                .build();
     GrpcCallSettings
         listLogEntriesTransportSettings =
             GrpcCallSettings.newBuilder()
                 .setMethodDescriptor(listLogEntriesMethodDescriptor)
                 .build();
+    GrpcCallSettings
+        writeLogEntriesTransportSettings =
+            GrpcCallSettings.newBuilder()
+                .setMethodDescriptor(writeLogEntriesMethodDescriptor)
+                .build();
     GrpcCallSettings<
             ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsResponse>
         listMonitoredResourceDescriptorsTransportSettings =
@@ -213,15 +213,15 @@ public Map extract(ListLogsRequest request) {
     this.deleteLogCallable =
         callableFactory.createUnaryCallable(
             deleteLogTransportSettings, settings.deleteLogSettings(), clientContext);
-    this.writeLogEntriesCallable =
-        callableFactory.createBatchingCallable(
-            writeLogEntriesTransportSettings, settings.writeLogEntriesSettings(), clientContext);
     this.listLogEntriesCallable =
         callableFactory.createUnaryCallable(
             listLogEntriesTransportSettings, settings.listLogEntriesSettings(), clientContext);
     this.listLogEntriesPagedCallable =
         callableFactory.createPagedCallable(
             listLogEntriesTransportSettings, settings.listLogEntriesSettings(), clientContext);
+    this.writeLogEntriesCallable =
+        callableFactory.createBatchingCallable(
+            writeLogEntriesTransportSettings, settings.writeLogEntriesSettings(), clientContext);
     this.listMonitoredResourceDescriptorsCallable =
         callableFactory.createUnaryCallable(
             listMonitoredResourceDescriptorsTransportSettings,
@@ -246,10 +246,6 @@ public UnaryCallable deleteLogCallable() {
     return deleteLogCallable;
   }
 
-  public UnaryCallable writeLogEntriesCallable() {
-    return writeLogEntriesCallable;
-  }
-
   public UnaryCallable
       listLogEntriesPagedCallable() {
     return listLogEntriesPagedCallable;
@@ -259,6 +255,10 @@ public UnaryCallable listLogEntri
     return listLogEntriesCallable;
   }
 
+  public UnaryCallable writeLogEntriesCallable() {
+    return writeLogEntriesCallable;
+  }
+
   public UnaryCallable<
           ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsPagedResponse>
       listMonitoredResourceDescriptorsPagedCallable() {
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcMetricsServiceV2Stub.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcMetricsServiceV2Stub.java
index d2022b0b2..5773dc95c 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcMetricsServiceV2Stub.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/GrpcMetricsServiceV2Stub.java
@@ -51,6 +51,24 @@
 @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
 public class GrpcMetricsServiceV2Stub extends MetricsServiceV2Stub {
 
+  private static final MethodDescriptor
+      updateLogMetricMethodDescriptor =
+          MethodDescriptor.newBuilder()
+              .setType(MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName("google.logging.v2.MetricsServiceV2/UpdateLogMetric")
+              .setRequestMarshaller(
+                  ProtoUtils.marshaller(UpdateLogMetricRequest.getDefaultInstance()))
+              .setResponseMarshaller(ProtoUtils.marshaller(LogMetric.getDefaultInstance()))
+              .build();
+  private static final MethodDescriptor
+      deleteLogMetricMethodDescriptor =
+          MethodDescriptor.newBuilder()
+              .setType(MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName("google.logging.v2.MetricsServiceV2/DeleteLogMetric")
+              .setRequestMarshaller(
+                  ProtoUtils.marshaller(DeleteLogMetricRequest.getDefaultInstance()))
+              .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+              .build();
   private static final MethodDescriptor
       listLogMetricsMethodDescriptor =
           MethodDescriptor.newBuilder()
@@ -78,34 +96,16 @@ public class GrpcMetricsServiceV2Stub extends MetricsServiceV2Stub {
                   ProtoUtils.marshaller(CreateLogMetricRequest.getDefaultInstance()))
               .setResponseMarshaller(ProtoUtils.marshaller(LogMetric.getDefaultInstance()))
               .build();
-  private static final MethodDescriptor
-      updateLogMetricMethodDescriptor =
-          MethodDescriptor.newBuilder()
-              .setType(MethodDescriptor.MethodType.UNARY)
-              .setFullMethodName("google.logging.v2.MetricsServiceV2/UpdateLogMetric")
-              .setRequestMarshaller(
-                  ProtoUtils.marshaller(UpdateLogMetricRequest.getDefaultInstance()))
-              .setResponseMarshaller(ProtoUtils.marshaller(LogMetric.getDefaultInstance()))
-              .build();
-  private static final MethodDescriptor
-      deleteLogMetricMethodDescriptor =
-          MethodDescriptor.newBuilder()
-              .setType(MethodDescriptor.MethodType.UNARY)
-              .setFullMethodName("google.logging.v2.MetricsServiceV2/DeleteLogMetric")
-              .setRequestMarshaller(
-                  ProtoUtils.marshaller(DeleteLogMetricRequest.getDefaultInstance()))
-              .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
-              .build();
 
   private final BackgroundResource backgroundResources;
 
+  private final UnaryCallable updateLogMetricCallable;
+  private final UnaryCallable deleteLogMetricCallable;
   private final UnaryCallable listLogMetricsCallable;
   private final UnaryCallable
       listLogMetricsPagedCallable;
   private final UnaryCallable getLogMetricCallable;
   private final UnaryCallable createLogMetricCallable;
-  private final UnaryCallable updateLogMetricCallable;
-  private final UnaryCallable deleteLogMetricCallable;
 
   private final GrpcStubCallableFactory callableFactory;
 
@@ -148,6 +148,32 @@ protected GrpcMetricsServiceV2Stub(
       throws IOException {
     this.callableFactory = callableFactory;
 
+    GrpcCallSettings updateLogMetricTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(updateLogMetricMethodDescriptor)
+            .setParamsExtractor(
+                new RequestParamsExtractor() {
+                  @Override
+                  public Map extract(UpdateLogMetricRequest request) {
+                    ImmutableMap.Builder params = ImmutableMap.builder();
+                    params.put("metric_name", String.valueOf(request.getMetricName()));
+                    return params.build();
+                  }
+                })
+            .build();
+    GrpcCallSettings deleteLogMetricTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(deleteLogMetricMethodDescriptor)
+            .setParamsExtractor(
+                new RequestParamsExtractor() {
+                  @Override
+                  public Map extract(DeleteLogMetricRequest request) {
+                    ImmutableMap.Builder params = ImmutableMap.builder();
+                    params.put("metric_name", String.valueOf(request.getMetricName()));
+                    return params.build();
+                  }
+                })
+            .build();
     GrpcCallSettings
         listLogMetricsTransportSettings =
             GrpcCallSettings.newBuilder()
@@ -188,33 +214,13 @@ public Map extract(CreateLogMetricRequest request) {
                   }
                 })
             .build();
-    GrpcCallSettings updateLogMetricTransportSettings =
-        GrpcCallSettings.newBuilder()
-            .setMethodDescriptor(updateLogMetricMethodDescriptor)
-            .setParamsExtractor(
-                new RequestParamsExtractor() {
-                  @Override
-                  public Map extract(UpdateLogMetricRequest request) {
-                    ImmutableMap.Builder params = ImmutableMap.builder();
-                    params.put("metric_name", String.valueOf(request.getMetricName()));
-                    return params.build();
-                  }
-                })
-            .build();
-    GrpcCallSettings deleteLogMetricTransportSettings =
-        GrpcCallSettings.newBuilder()
-            .setMethodDescriptor(deleteLogMetricMethodDescriptor)
-            .setParamsExtractor(
-                new RequestParamsExtractor() {
-                  @Override
-                  public Map extract(DeleteLogMetricRequest request) {
-                    ImmutableMap.Builder params = ImmutableMap.builder();
-                    params.put("metric_name", String.valueOf(request.getMetricName()));
-                    return params.build();
-                  }
-                })
-            .build();
 
+    this.updateLogMetricCallable =
+        callableFactory.createUnaryCallable(
+            updateLogMetricTransportSettings, settings.updateLogMetricSettings(), clientContext);
+    this.deleteLogMetricCallable =
+        callableFactory.createUnaryCallable(
+            deleteLogMetricTransportSettings, settings.deleteLogMetricSettings(), clientContext);
     this.listLogMetricsCallable =
         callableFactory.createUnaryCallable(
             listLogMetricsTransportSettings, settings.listLogMetricsSettings(), clientContext);
@@ -227,16 +233,18 @@ public Map extract(DeleteLogMetricRequest request) {
     this.createLogMetricCallable =
         callableFactory.createUnaryCallable(
             createLogMetricTransportSettings, settings.createLogMetricSettings(), clientContext);
-    this.updateLogMetricCallable =
-        callableFactory.createUnaryCallable(
-            updateLogMetricTransportSettings, settings.updateLogMetricSettings(), clientContext);
-    this.deleteLogMetricCallable =
-        callableFactory.createUnaryCallable(
-            deleteLogMetricTransportSettings, settings.deleteLogMetricSettings(), clientContext);
 
     backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources());
   }
 
+  public UnaryCallable updateLogMetricCallable() {
+    return updateLogMetricCallable;
+  }
+
+  public UnaryCallable deleteLogMetricCallable() {
+    return deleteLogMetricCallable;
+  }
+
   public UnaryCallable
       listLogMetricsPagedCallable() {
     return listLogMetricsPagedCallable;
@@ -254,14 +262,6 @@ public UnaryCallable createLogMetricCallable(
     return createLogMetricCallable;
   }
 
-  public UnaryCallable updateLogMetricCallable() {
-    return updateLogMetricCallable;
-  }
-
-  public UnaryCallable deleteLogMetricCallable() {
-    return deleteLogMetricCallable;
-  }
-
   @Override
   public final void close() {
     shutdown();
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/LoggingServiceV2Stub.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/LoggingServiceV2Stub.java
index 5aff3df94..e7506a604 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/LoggingServiceV2Stub.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/LoggingServiceV2Stub.java
@@ -48,10 +48,6 @@ public UnaryCallable deleteLogCallable() {
     throw new UnsupportedOperationException("Not implemented: deleteLogCallable()");
   }
 
-  public UnaryCallable writeLogEntriesCallable() {
-    throw new UnsupportedOperationException("Not implemented: writeLogEntriesCallable()");
-  }
-
   public UnaryCallable
       listLogEntriesPagedCallable() {
     throw new UnsupportedOperationException("Not implemented: listLogEntriesPagedCallable()");
@@ -61,6 +57,10 @@ public UnaryCallable listLogEntri
     throw new UnsupportedOperationException("Not implemented: listLogEntriesCallable()");
   }
 
+  public UnaryCallable writeLogEntriesCallable() {
+    throw new UnsupportedOperationException("Not implemented: writeLogEntriesCallable()");
+  }
+
   public UnaryCallable<
           ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsPagedResponse>
       listMonitoredResourceDescriptorsPagedCallable() {
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/LoggingServiceV2StubSettings.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/LoggingServiceV2StubSettings.java
index 4a8777ba5..6da527cd3 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/LoggingServiceV2StubSettings.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/LoggingServiceV2StubSettings.java
@@ -116,11 +116,11 @@ public class LoggingServiceV2StubSettings extends StubSettings deleteLogSettings;
-  private final BatchingCallSettings
-      writeLogEntriesSettings;
   private final PagedCallSettings<
           ListLogEntriesRequest, ListLogEntriesResponse, ListLogEntriesPagedResponse>
       listLogEntriesSettings;
+  private final BatchingCallSettings
+      writeLogEntriesSettings;
   private final PagedCallSettings<
           ListMonitoredResourceDescriptorsRequest,
           ListMonitoredResourceDescriptorsResponse,
@@ -134,12 +134,6 @@ public UnaryCallSettings deleteLogSettings() {
     return deleteLogSettings;
   }
 
-  /** Returns the object with the settings used for calls to writeLogEntries. */
-  public BatchingCallSettings
-      writeLogEntriesSettings() {
-    return writeLogEntriesSettings;
-  }
-
   /** Returns the object with the settings used for calls to listLogEntries. */
   public PagedCallSettings<
           ListLogEntriesRequest, ListLogEntriesResponse, ListLogEntriesPagedResponse>
@@ -147,6 +141,12 @@ public UnaryCallSettings deleteLogSettings() {
     return listLogEntriesSettings;
   }
 
+  /** Returns the object with the settings used for calls to writeLogEntries. */
+  public BatchingCallSettings
+      writeLogEntriesSettings() {
+    return writeLogEntriesSettings;
+  }
+
   /** Returns the object with the settings used for calls to listMonitoredResourceDescriptors. */
   public PagedCallSettings<
           ListMonitoredResourceDescriptorsRequest,
@@ -232,8 +232,8 @@ protected LoggingServiceV2StubSettings(Builder settingsBuilder) throws IOExcepti
     super(settingsBuilder);
 
     deleteLogSettings = settingsBuilder.deleteLogSettings().build();
-    writeLogEntriesSettings = settingsBuilder.writeLogEntriesSettings().build();
     listLogEntriesSettings = settingsBuilder.listLogEntriesSettings().build();
+    writeLogEntriesSettings = settingsBuilder.writeLogEntriesSettings().build();
     listMonitoredResourceDescriptorsSettings =
         settingsBuilder.listMonitoredResourceDescriptorsSettings().build();
     listLogsSettings = settingsBuilder.listLogsSettings().build();
@@ -493,11 +493,11 @@ public static class Builder extends StubSettings.Builder> unaryMethodSettingsBuilders;
 
     private final UnaryCallSettings.Builder deleteLogSettings;
-    private final BatchingCallSettings.Builder
-        writeLogEntriesSettings;
     private final PagedCallSettings.Builder<
             ListLogEntriesRequest, ListLogEntriesResponse, ListLogEntriesPagedResponse>
         listLogEntriesSettings;
+    private final BatchingCallSettings.Builder
+        writeLogEntriesSettings;
     private final PagedCallSettings.Builder<
             ListMonitoredResourceDescriptorsRequest,
             ListMonitoredResourceDescriptorsResponse,
@@ -521,6 +521,11 @@ public static class Builder extends StubSettings.BuildernewArrayList()));
+      definitions.put(
+          "idempotent2",
+          ImmutableSet.copyOf(
+              Lists.newArrayList(
+                  StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
       RETRYABLE_CODE_DEFINITIONS = definitions.build();
     }
 
@@ -540,17 +545,6 @@ public static class Builder extends StubSettings.Builder>of(
               deleteLogSettings,
-              writeLogEntriesSettings,
               listLogEntriesSettings,
+              writeLogEntriesSettings,
               listMonitoredResourceDescriptorsSettings,
               listLogsSettings);
 
@@ -601,6 +595,11 @@ private static Builder initDefaults(Builder builder) {
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
+      builder
+          .listLogEntriesSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+
       builder
           .writeLogEntriesSettings()
           .setBatchingSettings(
@@ -620,19 +619,14 @@ private static Builder initDefaults(Builder builder) {
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
-      builder
-          .listLogEntriesSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
-
       builder
           .listMonitoredResourceDescriptorsSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent2"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
           .listLogsSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent2"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       return builder;
@@ -642,8 +636,8 @@ protected Builder(LoggingServiceV2StubSettings settings) {
       super(settings);
 
       deleteLogSettings = settings.deleteLogSettings.toBuilder();
-      writeLogEntriesSettings = settings.writeLogEntriesSettings.toBuilder();
       listLogEntriesSettings = settings.listLogEntriesSettings.toBuilder();
+      writeLogEntriesSettings = settings.writeLogEntriesSettings.toBuilder();
       listMonitoredResourceDescriptorsSettings =
           settings.listMonitoredResourceDescriptorsSettings.toBuilder();
       listLogsSettings = settings.listLogsSettings.toBuilder();
@@ -651,8 +645,8 @@ protected Builder(LoggingServiceV2StubSettings settings) {
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
               deleteLogSettings,
-              writeLogEntriesSettings,
               listLogEntriesSettings,
+              writeLogEntriesSettings,
               listMonitoredResourceDescriptorsSettings,
               listLogsSettings);
     }
@@ -678,12 +672,6 @@ public UnaryCallSettings.Builder deleteLogSettings() {
       return deleteLogSettings;
     }
 
-    /** Returns the builder for the settings used for calls to writeLogEntries. */
-    public BatchingCallSettings.Builder
-        writeLogEntriesSettings() {
-      return writeLogEntriesSettings;
-    }
-
     /** Returns the builder for the settings used for calls to listLogEntries. */
     public PagedCallSettings.Builder<
             ListLogEntriesRequest, ListLogEntriesResponse, ListLogEntriesPagedResponse>
@@ -691,6 +679,12 @@ public UnaryCallSettings.Builder deleteLogSettings() {
       return listLogEntriesSettings;
     }
 
+    /** Returns the builder for the settings used for calls to writeLogEntries. */
+    public BatchingCallSettings.Builder
+        writeLogEntriesSettings() {
+      return writeLogEntriesSettings;
+    }
+
     /** Returns the builder for the settings used for calls to listMonitoredResourceDescriptors. */
     public PagedCallSettings.Builder<
             ListMonitoredResourceDescriptorsRequest,
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/MetricsServiceV2Stub.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/MetricsServiceV2Stub.java
index a14c69b79..6b1e4760b 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/MetricsServiceV2Stub.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/MetricsServiceV2Stub.java
@@ -40,6 +40,14 @@
 @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
 public abstract class MetricsServiceV2Stub implements BackgroundResource {
 
+  public UnaryCallable updateLogMetricCallable() {
+    throw new UnsupportedOperationException("Not implemented: updateLogMetricCallable()");
+  }
+
+  public UnaryCallable deleteLogMetricCallable() {
+    throw new UnsupportedOperationException("Not implemented: deleteLogMetricCallable()");
+  }
+
   public UnaryCallable
       listLogMetricsPagedCallable() {
     throw new UnsupportedOperationException("Not implemented: listLogMetricsPagedCallable()");
@@ -57,14 +65,6 @@ public UnaryCallable createLogMetricCallable(
     throw new UnsupportedOperationException("Not implemented: createLogMetricCallable()");
   }
 
-  public UnaryCallable updateLogMetricCallable() {
-    throw new UnsupportedOperationException("Not implemented: updateLogMetricCallable()");
-  }
-
-  public UnaryCallable deleteLogMetricCallable() {
-    throw new UnsupportedOperationException("Not implemented: deleteLogMetricCallable()");
-  }
-
   @Override
   public abstract void close();
 }
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/MetricsServiceV2StubSettings.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/MetricsServiceV2StubSettings.java
index 5327a9d9d..fc47b5d29 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/MetricsServiceV2StubSettings.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/MetricsServiceV2StubSettings.java
@@ -71,16 +71,16 @@
  * 

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 getLogMetric to 30 seconds: + *

For example, to set the total timeout of updateLogMetric to 30 seconds: * *

  * 
  * MetricsServiceV2StubSettings.Builder metricsSettingsBuilder =
  *     MetricsServiceV2StubSettings.newBuilder();
  * metricsSettingsBuilder
- *     .getLogMetricSettings()
+ *     .updateLogMetricSettings()
  *     .setRetrySettings(
- *         metricsSettingsBuilder.getLogMetricSettings().getRetrySettings().toBuilder()
+ *         metricsSettingsBuilder.updateLogMetricSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * MetricsServiceV2StubSettings metricsSettings = metricsSettingsBuilder.build();
@@ -100,13 +100,23 @@ public class MetricsServiceV2StubSettings extends StubSettings updateLogMetricSettings;
+  private final UnaryCallSettings deleteLogMetricSettings;
   private final PagedCallSettings<
           ListLogMetricsRequest, ListLogMetricsResponse, ListLogMetricsPagedResponse>
       listLogMetricsSettings;
   private final UnaryCallSettings getLogMetricSettings;
   private final UnaryCallSettings createLogMetricSettings;
-  private final UnaryCallSettings updateLogMetricSettings;
-  private final UnaryCallSettings deleteLogMetricSettings;
+
+  /** Returns the object with the settings used for calls to updateLogMetric. */
+  public UnaryCallSettings updateLogMetricSettings() {
+    return updateLogMetricSettings;
+  }
+
+  /** Returns the object with the settings used for calls to deleteLogMetric. */
+  public UnaryCallSettings deleteLogMetricSettings() {
+    return deleteLogMetricSettings;
+  }
 
   /** Returns the object with the settings used for calls to listLogMetrics. */
   public PagedCallSettings<
@@ -125,16 +135,6 @@ public UnaryCallSettings createLogMetricSetti
     return createLogMetricSettings;
   }
 
-  /** Returns the object with the settings used for calls to updateLogMetric. */
-  public UnaryCallSettings updateLogMetricSettings() {
-    return updateLogMetricSettings;
-  }
-
-  /** Returns the object with the settings used for calls to deleteLogMetric. */
-  public UnaryCallSettings deleteLogMetricSettings() {
-    return deleteLogMetricSettings;
-  }
-
   @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
   public MetricsServiceV2Stub createStub() throws IOException {
     if (getTransportChannelProvider()
@@ -204,11 +204,11 @@ public Builder toBuilder() {
   protected MetricsServiceV2StubSettings(Builder settingsBuilder) throws IOException {
     super(settingsBuilder);
 
+    updateLogMetricSettings = settingsBuilder.updateLogMetricSettings().build();
+    deleteLogMetricSettings = settingsBuilder.deleteLogMetricSettings().build();
     listLogMetricsSettings = settingsBuilder.listLogMetricsSettings().build();
     getLogMetricSettings = settingsBuilder.getLogMetricSettings().build();
     createLogMetricSettings = settingsBuilder.createLogMetricSettings().build();
-    updateLogMetricSettings = settingsBuilder.updateLogMetricSettings().build();
-    deleteLogMetricSettings = settingsBuilder.deleteLogMetricSettings().build();
   }
 
   private static final PagedListDescriptor
@@ -269,15 +269,15 @@ public ApiFuture getFuturePagedResponse(
   public static class Builder extends StubSettings.Builder {
     private final ImmutableList> unaryMethodSettingsBuilders;
 
+    private final UnaryCallSettings.Builder
+        updateLogMetricSettings;
+    private final UnaryCallSettings.Builder deleteLogMetricSettings;
     private final PagedCallSettings.Builder<
             ListLogMetricsRequest, ListLogMetricsResponse, ListLogMetricsPagedResponse>
         listLogMetricsSettings;
     private final UnaryCallSettings.Builder getLogMetricSettings;
     private final UnaryCallSettings.Builder
         createLogMetricSettings;
-    private final UnaryCallSettings.Builder
-        updateLogMetricSettings;
-    private final UnaryCallSettings.Builder deleteLogMetricSettings;
 
     private static final ImmutableMap>
         RETRYABLE_CODE_DEFINITIONS;
@@ -293,6 +293,11 @@ public static class Builder extends StubSettings.BuildernewArrayList()));
+      definitions.put(
+          "idempotent2",
+          ImmutableSet.copyOf(
+              Lists.newArrayList(
+                  StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
       RETRYABLE_CODE_DEFINITIONS = definitions.build();
     }
 
@@ -322,23 +327,23 @@ protected Builder() {
     protected Builder(ClientContext clientContext) {
       super(clientContext);
 
+      updateLogMetricSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+      deleteLogMetricSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
       listLogMetricsSettings = PagedCallSettings.newBuilder(LIST_LOG_METRICS_PAGE_STR_FACT);
 
       getLogMetricSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
       createLogMetricSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
-      updateLogMetricSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
-      deleteLogMetricSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
+              updateLogMetricSettings,
+              deleteLogMetricSettings,
               listLogMetricsSettings,
               getLogMetricSettings,
-              createLogMetricSettings,
-              updateLogMetricSettings,
-              deleteLogMetricSettings);
+              createLogMetricSettings);
 
       initDefaults(this);
     }
@@ -355,28 +360,28 @@ private static Builder createDefault() {
     private static Builder initDefaults(Builder builder) {
 
       builder
-          .listLogMetricsSettings()
+          .updateLogMetricSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .getLogMetricSettings()
+          .deleteLogMetricSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .createLogMetricSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .listLogMetricsSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent2"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .updateLogMetricSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .getLogMetricSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent2"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .deleteLogMetricSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .createLogMetricSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       return builder;
@@ -385,19 +390,19 @@ private static Builder initDefaults(Builder builder) {
     protected Builder(MetricsServiceV2StubSettings settings) {
       super(settings);
 
+      updateLogMetricSettings = settings.updateLogMetricSettings.toBuilder();
+      deleteLogMetricSettings = settings.deleteLogMetricSettings.toBuilder();
       listLogMetricsSettings = settings.listLogMetricsSettings.toBuilder();
       getLogMetricSettings = settings.getLogMetricSettings.toBuilder();
       createLogMetricSettings = settings.createLogMetricSettings.toBuilder();
-      updateLogMetricSettings = settings.updateLogMetricSettings.toBuilder();
-      deleteLogMetricSettings = settings.deleteLogMetricSettings.toBuilder();
 
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
+              updateLogMetricSettings,
+              deleteLogMetricSettings,
               listLogMetricsSettings,
               getLogMetricSettings,
-              createLogMetricSettings,
-              updateLogMetricSettings,
-              deleteLogMetricSettings);
+              createLogMetricSettings);
     }
 
     // NEXT_MAJOR_VER: remove 'throws Exception'
@@ -416,6 +421,16 @@ public Builder applyToAllUnaryMethods(
       return unaryMethodSettingsBuilders;
     }
 
+    /** Returns the builder for the settings used for calls to updateLogMetric. */
+    public UnaryCallSettings.Builder updateLogMetricSettings() {
+      return updateLogMetricSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to deleteLogMetric. */
+    public UnaryCallSettings.Builder deleteLogMetricSettings() {
+      return deleteLogMetricSettings;
+    }
+
     /** Returns the builder for the settings used for calls to listLogMetrics. */
     public PagedCallSettings.Builder<
             ListLogMetricsRequest, ListLogMetricsResponse, ListLogMetricsPagedResponse>
@@ -433,16 +448,6 @@ public UnaryCallSettings.Builder createLogMet
       return createLogMetricSettings;
     }
 
-    /** Returns the builder for the settings used for calls to updateLogMetric. */
-    public UnaryCallSettings.Builder updateLogMetricSettings() {
-      return updateLogMetricSettings;
-    }
-
-    /** Returns the builder for the settings used for calls to deleteLogMetric. */
-    public UnaryCallSettings.Builder deleteLogMetricSettings() {
-      return deleteLogMetricSettings;
-    }
-
     @Override
     public MetricsServiceV2StubSettings build() throws IOException {
       return new MetricsServiceV2StubSettings(this);
diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/BaseSystemTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/BaseSystemTest.java
index 23d71fcc6..1b2c5e4ef 100644
--- a/google-cloud-logging/src/test/java/com/google/cloud/logging/BaseSystemTest.java
+++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/BaseSystemTest.java
@@ -38,7 +38,6 @@
 import com.google.common.collect.Iterators;
 import com.google.common.collect.Sets;
 import com.google.logging.v2.LogName;
-import com.google.logging.v2.ProjectLogName;
 import java.util.Iterator;
 import java.util.Set;
 import java.util.logging.Level;
@@ -210,7 +209,7 @@ public void testListMetrics() throws InterruptedException {
   public void testWriteAndListLogEntries() throws InterruptedException {
     String logId = formatForTest("test-write-log-entries-log");
     LoggingOptions loggingOptions = logging().getOptions();
-    LogName logName = ProjectLogName.of(loggingOptions.getProjectId(), logId);
+    LogName logName = LogName.ofProjectLogName(loggingOptions.getProjectId(), logId);
     StringPayload firstPayload = StringPayload.of("stringPayload");
     LogEntry firstEntry =
         LogEntry.newBuilder(firstPayload)
@@ -297,7 +296,7 @@ public void testDeleteNonExistingLog() {
   public void testLoggingHandler() throws InterruptedException {
     String logId = formatForTest("test-logging-handler");
     LoggingOptions options = logging().getOptions();
-    LogName logName = ProjectLogName.of(options.getProjectId(), logId);
+    LogName logName = LogName.ofProjectLogName(options.getProjectId(), logId);
     LoggingHandler handler = new LoggingHandler(logId, options);
     handler.setLevel(Level.INFO);
     Logger logger = Logger.getLogger(getClass().getName());
@@ -337,7 +336,7 @@ public void testLoggingHandler() throws InterruptedException {
   public void testSyncLoggingHandler() throws InterruptedException {
     String logId = formatForTest("test-sync-logging-handler");
     LoggingOptions options = logging().getOptions();
-    LogName logName = ProjectLogName.of(options.getProjectId(), logId);
+    LogName logName = LogName.ofProjectLogName(options.getProjectId(), logId);
     MonitoredResource resource =
         MonitoredResource.of(
             "gce_instance",
diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/ConfigClientTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/ConfigClientTest.java
index 046c428bf..512e54c6f 100644
--- a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/ConfigClientTest.java
+++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/ConfigClientTest.java
@@ -15,6 +15,7 @@
  */
 package com.google.cloud.logging.v2;
 
+import static com.google.cloud.logging.v2.ConfigClient.ListBucketsPagedResponse;
 import static com.google.cloud.logging.v2.ConfigClient.ListExclusionsPagedResponse;
 import static com.google.cloud.logging.v2.ConfigClient.ListSinksPagedResponse;
 
@@ -27,30 +28,32 @@
 import com.google.api.gax.rpc.InvalidArgumentException;
 import com.google.api.resourcenames.ResourceName;
 import com.google.common.collect.Lists;
-import com.google.logging.v2.BillingName;
+import com.google.logging.v2.BillingAccountName;
 import com.google.logging.v2.CmekSettings;
+import com.google.logging.v2.CmekSettingsName;
 import com.google.logging.v2.CreateExclusionRequest;
 import com.google.logging.v2.CreateSinkRequest;
 import com.google.logging.v2.DeleteExclusionRequest;
 import com.google.logging.v2.DeleteSinkRequest;
-import com.google.logging.v2.ExclusionName;
-import com.google.logging.v2.ExclusionNames;
+import com.google.logging.v2.GetBucketRequest;
 import com.google.logging.v2.GetCmekSettingsRequest;
 import com.google.logging.v2.GetExclusionRequest;
 import com.google.logging.v2.GetSinkRequest;
+import com.google.logging.v2.ListBucketsRequest;
+import com.google.logging.v2.ListBucketsResponse;
 import com.google.logging.v2.ListExclusionsRequest;
 import com.google.logging.v2.ListExclusionsResponse;
 import com.google.logging.v2.ListSinksRequest;
 import com.google.logging.v2.ListSinksResponse;
+import com.google.logging.v2.LogBucket;
+import com.google.logging.v2.LogBucketName;
 import com.google.logging.v2.LogExclusion;
+import com.google.logging.v2.LogExclusionName;
 import com.google.logging.v2.LogSink;
-import com.google.logging.v2.ParentName;
-import com.google.logging.v2.ParentNames;
-import com.google.logging.v2.ProjectExclusionName;
+import com.google.logging.v2.LogSinkName;
+import com.google.logging.v2.OrganizationLocationName;
 import com.google.logging.v2.ProjectName;
-import com.google.logging.v2.ProjectSinkName;
-import com.google.logging.v2.SinkName;
-import com.google.logging.v2.SinkNames;
+import com.google.logging.v2.UpdateBucketRequest;
 import com.google.logging.v2.UpdateCmekSettingsRequest;
 import com.google.logging.v2.UpdateExclusionRequest;
 import com.google.logging.v2.UpdateSinkRequest;
@@ -116,27 +119,19 @@ public void tearDown() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void listSinksTest() {
-    String nextPageToken = "";
-    LogSink sinksElement = LogSink.newBuilder().build();
-    List sinks = Arrays.asList(sinksElement);
-    ListSinksResponse expectedResponse =
-        ListSinksResponse.newBuilder().setNextPageToken(nextPageToken).addAllSinks(sinks).build();
+  public void deleteSinkTest() {
+    Empty expectedResponse = Empty.newBuilder().build();
     mockConfigServiceV2.addResponse(expectedResponse);
 
-    ParentName parent = ProjectName.of("[PROJECT]");
-
-    ListSinksPagedResponse pagedListResponse = client.listSinks(parent);
+    LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
 
-    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
-    Assert.assertEquals(1, resources.size());
-    Assert.assertEquals(expectedResponse.getSinksList().get(0), resources.get(0));
+    client.deleteSink(sinkName);
 
     List actualRequests = mockConfigServiceV2.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    ListSinksRequest actualRequest = (ListSinksRequest) actualRequests.get(0);
+    DeleteSinkRequest actualRequest = (DeleteSinkRequest) actualRequests.get(0);
 
-    Assert.assertEquals(parent, ParentNames.parse(actualRequest.getParent()));
+    Assert.assertEquals(sinkName, LogSinkName.parse(actualRequest.getSinkName()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -145,14 +140,14 @@ public void listSinksTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void listSinksExceptionTest() throws Exception {
+  public void deleteSinkExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockConfigServiceV2.addException(exception);
 
     try {
-      ParentName parent = ProjectName.of("[PROJECT]");
+      LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
 
-      client.listSinks(parent);
+      client.deleteSink(sinkName);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -161,9 +156,9 @@ public void listSinksExceptionTest() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void getSinkTest() {
-    String name = "name3373707";
-    ResourceName destination = BillingName.of("[BILLING_ACCOUNT]");
+  public void updateSinkTest() {
+    LogSinkName name = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
+    ResourceName destination = BillingAccountName.of("[BILLING_ACCOUNT]");
     String filter = "filter-1274492040";
     String description = "description-1724546052";
     boolean disabled = true;
@@ -171,7 +166,7 @@ public void getSinkTest() {
     boolean includeChildren = true;
     LogSink expectedResponse =
         LogSink.newBuilder()
-            .setName(name)
+            .setName(name.toString())
             .setDestination(destination.toString())
             .setFilter(filter)
             .setDescription(description)
@@ -181,16 +176,20 @@ public void getSinkTest() {
             .build();
     mockConfigServiceV2.addResponse(expectedResponse);
 
-    SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
+    LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
+    LogSink sink = LogSink.newBuilder().build();
+    FieldMask updateMask = FieldMask.newBuilder().build();
 
-    LogSink actualResponse = client.getSink(sinkName);
+    LogSink actualResponse = client.updateSink(sinkName, sink, updateMask);
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockConfigServiceV2.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    GetSinkRequest actualRequest = (GetSinkRequest) actualRequests.get(0);
+    UpdateSinkRequest actualRequest = (UpdateSinkRequest) actualRequests.get(0);
 
-    Assert.assertEquals(sinkName, SinkNames.parse(actualRequest.getSinkName()));
+    Assert.assertEquals(sinkName, LogSinkName.parse(actualRequest.getSinkName()));
+    Assert.assertEquals(sink, actualRequest.getSink());
+    Assert.assertEquals(updateMask, actualRequest.getUpdateMask());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -199,14 +198,16 @@ public void getSinkTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void getSinkExceptionTest() throws Exception {
+  public void updateSinkExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockConfigServiceV2.addException(exception);
 
     try {
-      SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
+      LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
+      LogSink sink = LogSink.newBuilder().build();
+      FieldMask updateMask = FieldMask.newBuilder().build();
 
-      client.getSink(sinkName);
+      client.updateSink(sinkName, sink, updateMask);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -215,9 +216,9 @@ public void getSinkExceptionTest() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void createSinkTest() {
-    String name = "name3373707";
-    ResourceName destination = BillingName.of("[BILLING_ACCOUNT]");
+  public void updateSinkTest2() {
+    LogSinkName name = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
+    ResourceName destination = BillingAccountName.of("[BILLING_ACCOUNT]");
     String filter = "filter-1274492040";
     String description = "description-1724546052";
     boolean disabled = true;
@@ -225,7 +226,7 @@ public void createSinkTest() {
     boolean includeChildren = true;
     LogSink expectedResponse =
         LogSink.newBuilder()
-            .setName(name)
+            .setName(name.toString())
             .setDestination(destination.toString())
             .setFilter(filter)
             .setDescription(description)
@@ -235,17 +236,17 @@ public void createSinkTest() {
             .build();
     mockConfigServiceV2.addResponse(expectedResponse);
 
-    ParentName parent = ProjectName.of("[PROJECT]");
+    LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
     LogSink sink = LogSink.newBuilder().build();
 
-    LogSink actualResponse = client.createSink(parent, sink);
+    LogSink actualResponse = client.updateSink(sinkName, sink);
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockConfigServiceV2.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    CreateSinkRequest actualRequest = (CreateSinkRequest) actualRequests.get(0);
+    UpdateSinkRequest actualRequest = (UpdateSinkRequest) actualRequests.get(0);
 
-    Assert.assertEquals(parent, ParentNames.parse(actualRequest.getParent()));
+    Assert.assertEquals(sinkName, LogSinkName.parse(actualRequest.getSinkName()));
     Assert.assertEquals(sink, actualRequest.getSink());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
@@ -255,15 +256,15 @@ public void createSinkTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void createSinkExceptionTest() throws Exception {
+  public void updateSinkExceptionTest2() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockConfigServiceV2.addException(exception);
 
     try {
-      ParentName parent = ProjectName.of("[PROJECT]");
+      LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
       LogSink sink = LogSink.newBuilder().build();
 
-      client.createSink(parent, sink);
+      client.updateSink(sinkName, sink);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -272,39 +273,175 @@ public void createSinkExceptionTest() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void updateSinkTest() {
-    String name = "name3373707";
-    ResourceName destination = BillingName.of("[BILLING_ACCOUNT]");
-    String filter = "filter-1274492040";
+  public void deleteExclusionTest() {
+    Empty expectedResponse = Empty.newBuilder().build();
+    mockConfigServiceV2.addResponse(expectedResponse);
+
+    LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]");
+
+    client.deleteExclusion(name);
+
+    List actualRequests = mockConfigServiceV2.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    DeleteExclusionRequest actualRequest = (DeleteExclusionRequest) actualRequests.get(0);
+
+    Assert.assertEquals(name, LogExclusionName.parse(actualRequest.getName()));
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void deleteExclusionExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+    mockConfigServiceV2.addException(exception);
+
+    try {
+      LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]");
+
+      client.deleteExclusion(name);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception
+    }
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void listBucketsTest() {
+    String nextPageToken = "";
+    LogBucket bucketsElement = LogBucket.newBuilder().build();
+    List buckets = Arrays.asList(bucketsElement);
+    ListBucketsResponse expectedResponse =
+        ListBucketsResponse.newBuilder()
+            .setNextPageToken(nextPageToken)
+            .addAllBuckets(buckets)
+            .build();
+    mockConfigServiceV2.addResponse(expectedResponse);
+
+    OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+
+    ListBucketsPagedResponse pagedListResponse = client.listBuckets(parent);
+
+    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+    Assert.assertEquals(1, resources.size());
+    Assert.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0));
+
+    List actualRequests = mockConfigServiceV2.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    ListBucketsRequest actualRequest = (ListBucketsRequest) actualRequests.get(0);
+
+    Assert.assertEquals(parent, OrganizationLocationName.parse(actualRequest.getParent()));
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void listBucketsExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+    mockConfigServiceV2.addException(exception);
+
+    try {
+      OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+
+      client.listBuckets(parent);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception
+    }
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void getBucketTest() {
+    LogBucketName name2 =
+        LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]");
     String description = "description-1724546052";
-    boolean disabled = true;
-    String writerIdentity = "writerIdentity775638794";
-    boolean includeChildren = true;
-    LogSink expectedResponse =
-        LogSink.newBuilder()
-            .setName(name)
-            .setDestination(destination.toString())
-            .setFilter(filter)
+    int retentionDays = 1544391896;
+    LogBucket expectedResponse =
+        LogBucket.newBuilder()
+            .setName(name2.toString())
             .setDescription(description)
-            .setDisabled(disabled)
-            .setWriterIdentity(writerIdentity)
-            .setIncludeChildren(includeChildren)
+            .setRetentionDays(retentionDays)
             .build();
     mockConfigServiceV2.addResponse(expectedResponse);
 
-    SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
-    LogSink sink = LogSink.newBuilder().build();
+    LogBucketName name =
+        LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]");
+    GetBucketRequest request = GetBucketRequest.newBuilder().setName(name.toString()).build();
+
+    LogBucket actualResponse = client.getBucket(request);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockConfigServiceV2.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    GetBucketRequest actualRequest = (GetBucketRequest) actualRequests.get(0);
+
+    Assert.assertEquals(name, LogBucketName.parse(actualRequest.getName()));
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void getBucketExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+    mockConfigServiceV2.addException(exception);
+
+    try {
+      LogBucketName name =
+          LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]");
+      GetBucketRequest request = GetBucketRequest.newBuilder().setName(name.toString()).build();
+
+      client.getBucket(request);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception
+    }
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void updateBucketTest() {
+    LogBucketName name2 =
+        LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]");
+    String description = "description-1724546052";
+    int retentionDays = 1544391896;
+    LogBucket expectedResponse =
+        LogBucket.newBuilder()
+            .setName(name2.toString())
+            .setDescription(description)
+            .setRetentionDays(retentionDays)
+            .build();
+    mockConfigServiceV2.addResponse(expectedResponse);
+
+    LogBucketName name =
+        LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]");
+    LogBucket bucket = LogBucket.newBuilder().build();
     FieldMask updateMask = FieldMask.newBuilder().build();
+    UpdateBucketRequest request =
+        UpdateBucketRequest.newBuilder()
+            .setName(name.toString())
+            .setBucket(bucket)
+            .setUpdateMask(updateMask)
+            .build();
 
-    LogSink actualResponse = client.updateSink(sinkName, sink, updateMask);
+    LogBucket actualResponse = client.updateBucket(request);
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockConfigServiceV2.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    UpdateSinkRequest actualRequest = (UpdateSinkRequest) actualRequests.get(0);
+    UpdateBucketRequest actualRequest = (UpdateBucketRequest) actualRequests.get(0);
 
-    Assert.assertEquals(sinkName, SinkNames.parse(actualRequest.getSinkName()));
-    Assert.assertEquals(sink, actualRequest.getSink());
+    Assert.assertEquals(name, LogBucketName.parse(actualRequest.getName()));
+    Assert.assertEquals(bucket, actualRequest.getBucket());
     Assert.assertEquals(updateMask, actualRequest.getUpdateMask());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
@@ -314,16 +451,68 @@ public void updateSinkTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void updateSinkExceptionTest() throws Exception {
+  public void updateBucketExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockConfigServiceV2.addException(exception);
 
     try {
-      SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
-      LogSink sink = LogSink.newBuilder().build();
+      LogBucketName name =
+          LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]");
+      LogBucket bucket = LogBucket.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
+      UpdateBucketRequest request =
+          UpdateBucketRequest.newBuilder()
+              .setName(name.toString())
+              .setBucket(bucket)
+              .setUpdateMask(updateMask)
+              .build();
+
+      client.updateBucket(request);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception
+    }
+  }
 
-      client.updateSink(sinkName, sink, updateMask);
+  @Test
+  @SuppressWarnings("all")
+  public void listSinksTest() {
+    String nextPageToken = "";
+    LogSink sinksElement = LogSink.newBuilder().build();
+    List sinks = Arrays.asList(sinksElement);
+    ListSinksResponse expectedResponse =
+        ListSinksResponse.newBuilder().setNextPageToken(nextPageToken).addAllSinks(sinks).build();
+    mockConfigServiceV2.addResponse(expectedResponse);
+
+    ProjectName parent = ProjectName.of("[PROJECT]");
+
+    ListSinksPagedResponse pagedListResponse = client.listSinks(parent);
+
+    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+    Assert.assertEquals(1, resources.size());
+    Assert.assertEquals(expectedResponse.getSinksList().get(0), resources.get(0));
+
+    List actualRequests = mockConfigServiceV2.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    ListSinksRequest actualRequest = (ListSinksRequest) actualRequests.get(0);
+
+    Assert.assertEquals(parent, ProjectName.parse(actualRequest.getParent()));
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void listSinksExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+    mockConfigServiceV2.addException(exception);
+
+    try {
+      ProjectName parent = ProjectName.of("[PROJECT]");
+
+      client.listSinks(parent);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -332,9 +521,9 @@ public void updateSinkExceptionTest() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void updateSinkTest2() {
-    String name = "name3373707";
-    ResourceName destination = BillingName.of("[BILLING_ACCOUNT]");
+  public void getSinkTest() {
+    LogSinkName name = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
+    ResourceName destination = BillingAccountName.of("[BILLING_ACCOUNT]");
     String filter = "filter-1274492040";
     String description = "description-1724546052";
     boolean disabled = true;
@@ -342,7 +531,7 @@ public void updateSinkTest2() {
     boolean includeChildren = true;
     LogSink expectedResponse =
         LogSink.newBuilder()
-            .setName(name)
+            .setName(name.toString())
             .setDestination(destination.toString())
             .setFilter(filter)
             .setDescription(description)
@@ -352,18 +541,16 @@ public void updateSinkTest2() {
             .build();
     mockConfigServiceV2.addResponse(expectedResponse);
 
-    SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
-    LogSink sink = LogSink.newBuilder().build();
+    LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
 
-    LogSink actualResponse = client.updateSink(sinkName, sink);
+    LogSink actualResponse = client.getSink(sinkName);
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockConfigServiceV2.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    UpdateSinkRequest actualRequest = (UpdateSinkRequest) actualRequests.get(0);
+    GetSinkRequest actualRequest = (GetSinkRequest) actualRequests.get(0);
 
-    Assert.assertEquals(sinkName, SinkNames.parse(actualRequest.getSinkName()));
-    Assert.assertEquals(sink, actualRequest.getSink());
+    Assert.assertEquals(sinkName, LogSinkName.parse(actualRequest.getSinkName()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -372,15 +559,14 @@ public void updateSinkTest2() {
 
   @Test
   @SuppressWarnings("all")
-  public void updateSinkExceptionTest2() throws Exception {
+  public void getSinkExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockConfigServiceV2.addException(exception);
 
     try {
-      SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
-      LogSink sink = LogSink.newBuilder().build();
+      LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
 
-      client.updateSink(sinkName, sink);
+      client.getSink(sinkName);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -389,19 +575,38 @@ public void updateSinkExceptionTest2() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void deleteSinkTest() {
-    Empty expectedResponse = Empty.newBuilder().build();
+  public void createSinkTest() {
+    LogSinkName name = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
+    ResourceName destination = BillingAccountName.of("[BILLING_ACCOUNT]");
+    String filter = "filter-1274492040";
+    String description = "description-1724546052";
+    boolean disabled = true;
+    String writerIdentity = "writerIdentity775638794";
+    boolean includeChildren = true;
+    LogSink expectedResponse =
+        LogSink.newBuilder()
+            .setName(name.toString())
+            .setDestination(destination.toString())
+            .setFilter(filter)
+            .setDescription(description)
+            .setDisabled(disabled)
+            .setWriterIdentity(writerIdentity)
+            .setIncludeChildren(includeChildren)
+            .build();
     mockConfigServiceV2.addResponse(expectedResponse);
 
-    SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
+    ProjectName parent = ProjectName.of("[PROJECT]");
+    LogSink sink = LogSink.newBuilder().build();
 
-    client.deleteSink(sinkName);
+    LogSink actualResponse = client.createSink(parent, sink);
+    Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockConfigServiceV2.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    DeleteSinkRequest actualRequest = (DeleteSinkRequest) actualRequests.get(0);
+    CreateSinkRequest actualRequest = (CreateSinkRequest) actualRequests.get(0);
 
-    Assert.assertEquals(sinkName, SinkNames.parse(actualRequest.getSinkName()));
+    Assert.assertEquals(parent, ProjectName.parse(actualRequest.getParent()));
+    Assert.assertEquals(sink, actualRequest.getSink());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -410,14 +615,15 @@ public void deleteSinkTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void deleteSinkExceptionTest() throws Exception {
+  public void createSinkExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockConfigServiceV2.addException(exception);
 
     try {
-      SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
+      ProjectName parent = ProjectName.of("[PROJECT]");
+      LogSink sink = LogSink.newBuilder().build();
 
-      client.deleteSink(sinkName);
+      client.createSink(parent, sink);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -437,7 +643,7 @@ public void listExclusionsTest() {
             .build();
     mockConfigServiceV2.addResponse(expectedResponse);
 
-    ParentName parent = ProjectName.of("[PROJECT]");
+    ProjectName parent = ProjectName.of("[PROJECT]");
 
     ListExclusionsPagedResponse pagedListResponse = client.listExclusions(parent);
 
@@ -449,7 +655,7 @@ public void listExclusionsTest() {
     Assert.assertEquals(1, actualRequests.size());
     ListExclusionsRequest actualRequest = (ListExclusionsRequest) actualRequests.get(0);
 
-    Assert.assertEquals(parent, ParentNames.parse(actualRequest.getParent()));
+    Assert.assertEquals(parent, ProjectName.parse(actualRequest.getParent()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -463,7 +669,7 @@ public void listExclusionsExceptionTest() throws Exception {
     mockConfigServiceV2.addException(exception);
 
     try {
-      ParentName parent = ProjectName.of("[PROJECT]");
+      ProjectName parent = ProjectName.of("[PROJECT]");
 
       client.listExclusions(parent);
       Assert.fail("No exception raised");
@@ -475,20 +681,20 @@ public void listExclusionsExceptionTest() throws Exception {
   @Test
   @SuppressWarnings("all")
   public void getExclusionTest() {
-    String name2 = "name2-1052831874";
+    LogExclusionName name2 = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]");
     String description = "description-1724546052";
     String filter = "filter-1274492040";
     boolean disabled = true;
     LogExclusion expectedResponse =
         LogExclusion.newBuilder()
-            .setName(name2)
+            .setName(name2.toString())
             .setDescription(description)
             .setFilter(filter)
             .setDisabled(disabled)
             .build();
     mockConfigServiceV2.addResponse(expectedResponse);
 
-    ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]");
+    LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]");
 
     LogExclusion actualResponse = client.getExclusion(name);
     Assert.assertEquals(expectedResponse, actualResponse);
@@ -497,7 +703,7 @@ public void getExclusionTest() {
     Assert.assertEquals(1, actualRequests.size());
     GetExclusionRequest actualRequest = (GetExclusionRequest) actualRequests.get(0);
 
-    Assert.assertEquals(name, ExclusionNames.parse(actualRequest.getName()));
+    Assert.assertEquals(name, LogExclusionName.parse(actualRequest.getName()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -511,7 +717,7 @@ public void getExclusionExceptionTest() throws Exception {
     mockConfigServiceV2.addException(exception);
 
     try {
-      ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]");
+      LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]");
 
       client.getExclusion(name);
       Assert.fail("No exception raised");
@@ -523,20 +729,20 @@ public void getExclusionExceptionTest() throws Exception {
   @Test
   @SuppressWarnings("all")
   public void createExclusionTest() {
-    String name = "name3373707";
+    LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]");
     String description = "description-1724546052";
     String filter = "filter-1274492040";
     boolean disabled = true;
     LogExclusion expectedResponse =
         LogExclusion.newBuilder()
-            .setName(name)
+            .setName(name.toString())
             .setDescription(description)
             .setFilter(filter)
             .setDisabled(disabled)
             .build();
     mockConfigServiceV2.addResponse(expectedResponse);
 
-    ParentName parent = ProjectName.of("[PROJECT]");
+    ProjectName parent = ProjectName.of("[PROJECT]");
     LogExclusion exclusion = LogExclusion.newBuilder().build();
 
     LogExclusion actualResponse = client.createExclusion(parent, exclusion);
@@ -546,7 +752,7 @@ public void createExclusionTest() {
     Assert.assertEquals(1, actualRequests.size());
     CreateExclusionRequest actualRequest = (CreateExclusionRequest) actualRequests.get(0);
 
-    Assert.assertEquals(parent, ParentNames.parse(actualRequest.getParent()));
+    Assert.assertEquals(parent, ProjectName.parse(actualRequest.getParent()));
     Assert.assertEquals(exclusion, actualRequest.getExclusion());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
@@ -561,7 +767,7 @@ public void createExclusionExceptionTest() throws Exception {
     mockConfigServiceV2.addException(exception);
 
     try {
-      ParentName parent = ProjectName.of("[PROJECT]");
+      ProjectName parent = ProjectName.of("[PROJECT]");
       LogExclusion exclusion = LogExclusion.newBuilder().build();
 
       client.createExclusion(parent, exclusion);
@@ -574,20 +780,20 @@ public void createExclusionExceptionTest() throws Exception {
   @Test
   @SuppressWarnings("all")
   public void updateExclusionTest() {
-    String name2 = "name2-1052831874";
+    LogExclusionName name2 = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]");
     String description = "description-1724546052";
     String filter = "filter-1274492040";
     boolean disabled = true;
     LogExclusion expectedResponse =
         LogExclusion.newBuilder()
-            .setName(name2)
+            .setName(name2.toString())
             .setDescription(description)
             .setFilter(filter)
             .setDisabled(disabled)
             .build();
     mockConfigServiceV2.addResponse(expectedResponse);
 
-    ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]");
+    LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]");
     LogExclusion exclusion = LogExclusion.newBuilder().build();
     FieldMask updateMask = FieldMask.newBuilder().build();
 
@@ -598,7 +804,7 @@ public void updateExclusionTest() {
     Assert.assertEquals(1, actualRequests.size());
     UpdateExclusionRequest actualRequest = (UpdateExclusionRequest) actualRequests.get(0);
 
-    Assert.assertEquals(name, ExclusionNames.parse(actualRequest.getName()));
+    Assert.assertEquals(name, LogExclusionName.parse(actualRequest.getName()));
     Assert.assertEquals(exclusion, actualRequest.getExclusion());
     Assert.assertEquals(updateMask, actualRequest.getUpdateMask());
     Assert.assertTrue(
@@ -614,7 +820,7 @@ public void updateExclusionExceptionTest() throws Exception {
     mockConfigServiceV2.addException(exception);
 
     try {
-      ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]");
+      LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]");
       LogExclusion exclusion = LogExclusion.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
 
@@ -625,58 +831,23 @@ public void updateExclusionExceptionTest() throws Exception {
     }
   }
 
-  @Test
-  @SuppressWarnings("all")
-  public void deleteExclusionTest() {
-    Empty expectedResponse = Empty.newBuilder().build();
-    mockConfigServiceV2.addResponse(expectedResponse);
-
-    ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]");
-
-    client.deleteExclusion(name);
-
-    List actualRequests = mockConfigServiceV2.getRequests();
-    Assert.assertEquals(1, actualRequests.size());
-    DeleteExclusionRequest actualRequest = (DeleteExclusionRequest) actualRequests.get(0);
-
-    Assert.assertEquals(name, ExclusionNames.parse(actualRequest.getName()));
-    Assert.assertTrue(
-        channelProvider.isHeaderSent(
-            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
-            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
-  }
-
-  @Test
-  @SuppressWarnings("all")
-  public void deleteExclusionExceptionTest() throws Exception {
-    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
-    mockConfigServiceV2.addException(exception);
-
-    try {
-      ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]");
-
-      client.deleteExclusion(name);
-      Assert.fail("No exception raised");
-    } catch (InvalidArgumentException e) {
-      // Expected exception
-    }
-  }
-
   @Test
   @SuppressWarnings("all")
   public void getCmekSettingsTest() {
-    String name = "name3373707";
+    CmekSettingsName name2 = CmekSettingsName.ofProjectCmekSettingsName("[PROJECT]");
     String kmsKeyName = "kmsKeyName2094986649";
     String serviceAccountId = "serviceAccountId-111486921";
     CmekSettings expectedResponse =
         CmekSettings.newBuilder()
-            .setName(name)
+            .setName(name2.toString())
             .setKmsKeyName(kmsKeyName)
             .setServiceAccountId(serviceAccountId)
             .build();
     mockConfigServiceV2.addResponse(expectedResponse);
 
-    GetCmekSettingsRequest request = GetCmekSettingsRequest.newBuilder().build();
+    CmekSettingsName name = CmekSettingsName.ofProjectCmekSettingsName("[PROJECT]");
+    GetCmekSettingsRequest request =
+        GetCmekSettingsRequest.newBuilder().setName(name.toString()).build();
 
     CmekSettings actualResponse = client.getCmekSettings(request);
     Assert.assertEquals(expectedResponse, actualResponse);
@@ -685,6 +856,7 @@ public void getCmekSettingsTest() {
     Assert.assertEquals(1, actualRequests.size());
     GetCmekSettingsRequest actualRequest = (GetCmekSettingsRequest) actualRequests.get(0);
 
+    Assert.assertEquals(name, CmekSettingsName.parse(actualRequest.getName()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -698,7 +870,9 @@ public void getCmekSettingsExceptionTest() throws Exception {
     mockConfigServiceV2.addException(exception);
 
     try {
-      GetCmekSettingsRequest request = GetCmekSettingsRequest.newBuilder().build();
+      CmekSettingsName name = CmekSettingsName.ofProjectCmekSettingsName("[PROJECT]");
+      GetCmekSettingsRequest request =
+          GetCmekSettingsRequest.newBuilder().setName(name.toString()).build();
 
       client.getCmekSettings(request);
       Assert.fail("No exception raised");
@@ -710,18 +884,21 @@ public void getCmekSettingsExceptionTest() throws Exception {
   @Test
   @SuppressWarnings("all")
   public void updateCmekSettingsTest() {
-    String name = "name3373707";
+    CmekSettingsName name2 = CmekSettingsName.ofProjectCmekSettingsName("[PROJECT]");
     String kmsKeyName = "kmsKeyName2094986649";
     String serviceAccountId = "serviceAccountId-111486921";
     CmekSettings expectedResponse =
         CmekSettings.newBuilder()
-            .setName(name)
+            .setName(name2.toString())
             .setKmsKeyName(kmsKeyName)
             .setServiceAccountId(serviceAccountId)
             .build();
     mockConfigServiceV2.addResponse(expectedResponse);
 
-    UpdateCmekSettingsRequest request = UpdateCmekSettingsRequest.newBuilder().build();
+    String name = "name3373707";
+    CmekSettings cmekSettings = CmekSettings.newBuilder().build();
+    UpdateCmekSettingsRequest request =
+        UpdateCmekSettingsRequest.newBuilder().setName(name).setCmekSettings(cmekSettings).build();
 
     CmekSettings actualResponse = client.updateCmekSettings(request);
     Assert.assertEquals(expectedResponse, actualResponse);
@@ -730,6 +907,8 @@ public void updateCmekSettingsTest() {
     Assert.assertEquals(1, actualRequests.size());
     UpdateCmekSettingsRequest actualRequest = (UpdateCmekSettingsRequest) actualRequests.get(0);
 
+    Assert.assertEquals(name, actualRequest.getName());
+    Assert.assertEquals(cmekSettings, actualRequest.getCmekSettings());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -743,7 +922,13 @@ public void updateCmekSettingsExceptionTest() throws Exception {
     mockConfigServiceV2.addException(exception);
 
     try {
-      UpdateCmekSettingsRequest request = UpdateCmekSettingsRequest.newBuilder().build();
+      String name = "name3373707";
+      CmekSettings cmekSettings = CmekSettings.newBuilder().build();
+      UpdateCmekSettingsRequest request =
+          UpdateCmekSettingsRequest.newBuilder()
+              .setName(name)
+              .setCmekSettings(cmekSettings)
+              .build();
 
       client.updateCmekSettings(request);
       Assert.fail("No exception raised");
diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingClientTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingClientTest.java
index d3bb71b2d..4e671164f 100644
--- a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingClientTest.java
+++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingClientTest.java
@@ -38,10 +38,6 @@
 import com.google.logging.v2.ListMonitoredResourceDescriptorsResponse;
 import com.google.logging.v2.LogEntry;
 import com.google.logging.v2.LogName;
-import com.google.logging.v2.LogNames;
-import com.google.logging.v2.ParentName;
-import com.google.logging.v2.ParentNames;
-import com.google.logging.v2.ProjectLogName;
 import com.google.logging.v2.ProjectName;
 import com.google.logging.v2.WriteLogEntriesRequest;
 import com.google.logging.v2.WriteLogEntriesResponse;
@@ -113,7 +109,7 @@ public void deleteLogTest() {
     Empty expectedResponse = Empty.newBuilder().build();
     mockLoggingServiceV2.addResponse(expectedResponse);
 
-    LogName logName = ProjectLogName.of("[PROJECT]", "[LOG]");
+    LogName logName = LogName.ofProjectLogName("[PROJECT]", "[LOG]");
 
     client.deleteLog(logName);
 
@@ -121,7 +117,7 @@ public void deleteLogTest() {
     Assert.assertEquals(1, actualRequests.size());
     DeleteLogRequest actualRequest = (DeleteLogRequest) actualRequests.get(0);
 
-    Assert.assertEquals(logName, LogNames.parse(actualRequest.getLogName()));
+    Assert.assertEquals(logName, LogName.parse(actualRequest.getLogName()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -135,7 +131,7 @@ public void deleteLogExceptionTest() throws Exception {
     mockLoggingServiceV2.addException(exception);
 
     try {
-      LogName logName = ProjectLogName.of("[PROJECT]", "[LOG]");
+      LogName logName = LogName.ofProjectLogName("[PROJECT]", "[LOG]");
 
       client.deleteLog(logName);
       Assert.fail("No exception raised");
@@ -146,27 +142,35 @@ public void deleteLogExceptionTest() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void writeLogEntriesTest() {
-    WriteLogEntriesResponse expectedResponse = WriteLogEntriesResponse.newBuilder().build();
+  public void listLogEntriesTest() {
+    String nextPageToken = "";
+    LogEntry entriesElement = LogEntry.newBuilder().build();
+    List entries = Arrays.asList(entriesElement);
+    ListLogEntriesResponse expectedResponse =
+        ListLogEntriesResponse.newBuilder()
+            .setNextPageToken(nextPageToken)
+            .addAllEntries(entries)
+            .build();
     mockLoggingServiceV2.addResponse(expectedResponse);
 
-    LogName logName = ProjectLogName.of("[PROJECT]", "[LOG]");
-    MonitoredResource resource = MonitoredResource.newBuilder().build();
-    Map labels = new HashMap<>();
-    List entries = new ArrayList<>();
+    List formattedResourceNames = new ArrayList<>();
+    String filter = "filter-1274492040";
+    String orderBy = "orderBy1234304744";
 
-    WriteLogEntriesResponse actualResponse =
-        client.writeLogEntries(logName, resource, labels, entries);
-    Assert.assertEquals(expectedResponse, actualResponse);
+    ListLogEntriesPagedResponse pagedListResponse =
+        client.listLogEntries(formattedResourceNames, filter, orderBy);
+
+    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+    Assert.assertEquals(1, resources.size());
+    Assert.assertEquals(expectedResponse.getEntriesList().get(0), resources.get(0));
 
     List actualRequests = mockLoggingServiceV2.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    WriteLogEntriesRequest actualRequest = (WriteLogEntriesRequest) actualRequests.get(0);
+    ListLogEntriesRequest actualRequest = (ListLogEntriesRequest) actualRequests.get(0);
 
-    Assert.assertEquals(logName, LogNames.parse(actualRequest.getLogName()));
-    Assert.assertEquals(resource, actualRequest.getResource());
-    Assert.assertEquals(labels, actualRequest.getLabelsMap());
-    Assert.assertEquals(entries, actualRequest.getEntriesList());
+    Assert.assertEquals(formattedResourceNames, actualRequest.getResourceNamesList());
+    Assert.assertEquals(filter, actualRequest.getFilter());
+    Assert.assertEquals(orderBy, actualRequest.getOrderBy());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -175,17 +179,16 @@ public void writeLogEntriesTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void writeLogEntriesExceptionTest() throws Exception {
+  public void listLogEntriesExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockLoggingServiceV2.addException(exception);
 
     try {
-      LogName logName = ProjectLogName.of("[PROJECT]", "[LOG]");
-      MonitoredResource resource = MonitoredResource.newBuilder().build();
-      Map labels = new HashMap<>();
-      List entries = new ArrayList<>();
+      List formattedResourceNames = new ArrayList<>();
+      String filter = "filter-1274492040";
+      String orderBy = "orderBy1234304744";
 
-      client.writeLogEntries(logName, resource, labels, entries);
+      client.listLogEntries(formattedResourceNames, filter, orderBy);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -194,35 +197,27 @@ public void writeLogEntriesExceptionTest() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void listLogEntriesTest() {
-    String nextPageToken = "";
-    LogEntry entriesElement = LogEntry.newBuilder().build();
-    List entries = Arrays.asList(entriesElement);
-    ListLogEntriesResponse expectedResponse =
-        ListLogEntriesResponse.newBuilder()
-            .setNextPageToken(nextPageToken)
-            .addAllEntries(entries)
-            .build();
+  public void writeLogEntriesTest() {
+    WriteLogEntriesResponse expectedResponse = WriteLogEntriesResponse.newBuilder().build();
     mockLoggingServiceV2.addResponse(expectedResponse);
 
-    List formattedResourceNames = new ArrayList<>();
-    String filter = "filter-1274492040";
-    String orderBy = "orderBy1234304744";
-
-    ListLogEntriesPagedResponse pagedListResponse =
-        client.listLogEntries(formattedResourceNames, filter, orderBy);
+    LogName logName = LogName.ofProjectLogName("[PROJECT]", "[LOG]");
+    MonitoredResource resource = MonitoredResource.newBuilder().build();
+    Map labels = new HashMap<>();
+    List entries = new ArrayList<>();
 
-    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
-    Assert.assertEquals(1, resources.size());
-    Assert.assertEquals(expectedResponse.getEntriesList().get(0), resources.get(0));
+    WriteLogEntriesResponse actualResponse =
+        client.writeLogEntries(logName, resource, labels, entries);
+    Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockLoggingServiceV2.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    ListLogEntriesRequest actualRequest = (ListLogEntriesRequest) actualRequests.get(0);
+    WriteLogEntriesRequest actualRequest = (WriteLogEntriesRequest) actualRequests.get(0);
 
-    Assert.assertEquals(formattedResourceNames, actualRequest.getResourceNamesList());
-    Assert.assertEquals(filter, actualRequest.getFilter());
-    Assert.assertEquals(orderBy, actualRequest.getOrderBy());
+    Assert.assertEquals(logName, LogName.parse(actualRequest.getLogName()));
+    Assert.assertEquals(resource, actualRequest.getResource());
+    Assert.assertEquals(labels, actualRequest.getLabelsMap());
+    Assert.assertEquals(entries, actualRequest.getEntriesList());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -231,16 +226,17 @@ public void listLogEntriesTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void listLogEntriesExceptionTest() throws Exception {
+  public void writeLogEntriesExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockLoggingServiceV2.addException(exception);
 
     try {
-      List formattedResourceNames = new ArrayList<>();
-      String filter = "filter-1274492040";
-      String orderBy = "orderBy1234304744";
+      LogName logName = LogName.ofProjectLogName("[PROJECT]", "[LOG]");
+      MonitoredResource resource = MonitoredResource.newBuilder().build();
+      Map labels = new HashMap<>();
+      List entries = new ArrayList<>();
 
-      client.listLogEntries(formattedResourceNames, filter, orderBy);
+      client.writeLogEntries(logName, resource, labels, entries);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -314,7 +310,7 @@ public void listLogsTest() {
             .build();
     mockLoggingServiceV2.addResponse(expectedResponse);
 
-    ParentName parent = ProjectName.of("[PROJECT]");
+    ProjectName parent = ProjectName.of("[PROJECT]");
 
     ListLogsPagedResponse pagedListResponse = client.listLogs(parent);
 
@@ -326,7 +322,7 @@ public void listLogsTest() {
     Assert.assertEquals(1, actualRequests.size());
     ListLogsRequest actualRequest = (ListLogsRequest) actualRequests.get(0);
 
-    Assert.assertEquals(parent, ParentNames.parse(actualRequest.getParent()));
+    Assert.assertEquals(parent, ProjectName.parse(actualRequest.getParent()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -340,7 +336,7 @@ public void listLogsExceptionTest() throws Exception {
     mockLoggingServiceV2.addException(exception);
 
     try {
-      ParentName parent = ProjectName.of("[PROJECT]");
+      ProjectName parent = ProjectName.of("[PROJECT]");
 
       client.listLogs(parent);
       Assert.fail("No exception raised");
diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MetricsClientTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MetricsClientTest.java
index 950bb667b..37c6276c8 100644
--- a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MetricsClientTest.java
+++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MetricsClientTest.java
@@ -31,11 +31,7 @@
 import com.google.logging.v2.ListLogMetricsRequest;
 import com.google.logging.v2.ListLogMetricsResponse;
 import com.google.logging.v2.LogMetric;
-import com.google.logging.v2.MetricName;
-import com.google.logging.v2.MetricNames;
-import com.google.logging.v2.ParentName;
-import com.google.logging.v2.ParentNames;
-import com.google.logging.v2.ProjectMetricName;
+import com.google.logging.v2.LogMetricName;
 import com.google.logging.v2.ProjectName;
 import com.google.logging.v2.UpdateLogMetricRequest;
 import com.google.protobuf.AbstractMessage;
@@ -99,30 +95,32 @@ public void tearDown() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void listLogMetricsTest() {
-    String nextPageToken = "";
-    LogMetric metricsElement = LogMetric.newBuilder().build();
-    List metrics = Arrays.asList(metricsElement);
-    ListLogMetricsResponse expectedResponse =
-        ListLogMetricsResponse.newBuilder()
-            .setNextPageToken(nextPageToken)
-            .addAllMetrics(metrics)
+  public void updateLogMetricTest() {
+    LogMetricName name = LogMetricName.of("[PROJECT]", "[METRIC]");
+    String description = "description-1724546052";
+    String filter = "filter-1274492040";
+    String valueExtractor = "valueExtractor2047672534";
+    LogMetric expectedResponse =
+        LogMetric.newBuilder()
+            .setName(name.toString())
+            .setDescription(description)
+            .setFilter(filter)
+            .setValueExtractor(valueExtractor)
             .build();
     mockMetricsServiceV2.addResponse(expectedResponse);
 
-    ParentName parent = ProjectName.of("[PROJECT]");
-
-    ListLogMetricsPagedResponse pagedListResponse = client.listLogMetrics(parent);
+    LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]");
+    LogMetric metric = LogMetric.newBuilder().build();
 
-    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
-    Assert.assertEquals(1, resources.size());
-    Assert.assertEquals(expectedResponse.getMetricsList().get(0), resources.get(0));
+    LogMetric actualResponse = client.updateLogMetric(metricName, metric);
+    Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockMetricsServiceV2.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    ListLogMetricsRequest actualRequest = (ListLogMetricsRequest) actualRequests.get(0);
+    UpdateLogMetricRequest actualRequest = (UpdateLogMetricRequest) actualRequests.get(0);
 
-    Assert.assertEquals(parent, ParentNames.parse(actualRequest.getParent()));
+    Assert.assertEquals(metricName, LogMetricName.parse(actualRequest.getMetricName()));
+    Assert.assertEquals(metric, actualRequest.getMetric());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -131,14 +129,15 @@ public void listLogMetricsTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void listLogMetricsExceptionTest() throws Exception {
+  public void updateLogMetricExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockMetricsServiceV2.addException(exception);
 
     try {
-      ParentName parent = ProjectName.of("[PROJECT]");
+      LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]");
+      LogMetric metric = LogMetric.newBuilder().build();
 
-      client.listLogMetrics(parent);
+      client.updateLogMetric(metricName, metric);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -147,30 +146,19 @@ public void listLogMetricsExceptionTest() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void getLogMetricTest() {
-    MetricName name = ProjectMetricName.of("[PROJECT]", "[METRIC]");
-    String description = "description-1724546052";
-    String filter = "filter-1274492040";
-    String valueExtractor = "valueExtractor2047672534";
-    LogMetric expectedResponse =
-        LogMetric.newBuilder()
-            .setName(name.toString())
-            .setDescription(description)
-            .setFilter(filter)
-            .setValueExtractor(valueExtractor)
-            .build();
+  public void deleteLogMetricTest() {
+    Empty expectedResponse = Empty.newBuilder().build();
     mockMetricsServiceV2.addResponse(expectedResponse);
 
-    MetricName metricName = ProjectMetricName.of("[PROJECT]", "[METRIC]");
+    LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]");
 
-    LogMetric actualResponse = client.getLogMetric(metricName);
-    Assert.assertEquals(expectedResponse, actualResponse);
+    client.deleteLogMetric(metricName);
 
     List actualRequests = mockMetricsServiceV2.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    GetLogMetricRequest actualRequest = (GetLogMetricRequest) actualRequests.get(0);
+    DeleteLogMetricRequest actualRequest = (DeleteLogMetricRequest) actualRequests.get(0);
 
-    Assert.assertEquals(metricName, MetricNames.parse(actualRequest.getMetricName()));
+    Assert.assertEquals(metricName, LogMetricName.parse(actualRequest.getMetricName()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -179,14 +167,14 @@ public void getLogMetricTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void getLogMetricExceptionTest() throws Exception {
+  public void deleteLogMetricExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockMetricsServiceV2.addException(exception);
 
     try {
-      MetricName metricName = ProjectMetricName.of("[PROJECT]", "[METRIC]");
+      LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]");
 
-      client.getLogMetric(metricName);
+      client.deleteLogMetric(metricName);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -195,32 +183,30 @@ public void getLogMetricExceptionTest() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void createLogMetricTest() {
-    MetricName name = ProjectMetricName.of("[PROJECT]", "[METRIC]");
-    String description = "description-1724546052";
-    String filter = "filter-1274492040";
-    String valueExtractor = "valueExtractor2047672534";
-    LogMetric expectedResponse =
-        LogMetric.newBuilder()
-            .setName(name.toString())
-            .setDescription(description)
-            .setFilter(filter)
-            .setValueExtractor(valueExtractor)
+  public void listLogMetricsTest() {
+    String nextPageToken = "";
+    LogMetric metricsElement = LogMetric.newBuilder().build();
+    List metrics = Arrays.asList(metricsElement);
+    ListLogMetricsResponse expectedResponse =
+        ListLogMetricsResponse.newBuilder()
+            .setNextPageToken(nextPageToken)
+            .addAllMetrics(metrics)
             .build();
     mockMetricsServiceV2.addResponse(expectedResponse);
 
-    ParentName parent = ProjectName.of("[PROJECT]");
-    LogMetric metric = LogMetric.newBuilder().build();
+    ProjectName parent = ProjectName.of("[PROJECT]");
 
-    LogMetric actualResponse = client.createLogMetric(parent, metric);
-    Assert.assertEquals(expectedResponse, actualResponse);
+    ListLogMetricsPagedResponse pagedListResponse = client.listLogMetrics(parent);
+
+    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+    Assert.assertEquals(1, resources.size());
+    Assert.assertEquals(expectedResponse.getMetricsList().get(0), resources.get(0));
 
     List actualRequests = mockMetricsServiceV2.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    CreateLogMetricRequest actualRequest = (CreateLogMetricRequest) actualRequests.get(0);
+    ListLogMetricsRequest actualRequest = (ListLogMetricsRequest) actualRequests.get(0);
 
-    Assert.assertEquals(parent, ParentNames.parse(actualRequest.getParent()));
-    Assert.assertEquals(metric, actualRequest.getMetric());
+    Assert.assertEquals(parent, ProjectName.parse(actualRequest.getParent()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -229,15 +215,14 @@ public void createLogMetricTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void createLogMetricExceptionTest() throws Exception {
+  public void listLogMetricsExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockMetricsServiceV2.addException(exception);
 
     try {
-      ParentName parent = ProjectName.of("[PROJECT]");
-      LogMetric metric = LogMetric.newBuilder().build();
+      ProjectName parent = ProjectName.of("[PROJECT]");
 
-      client.createLogMetric(parent, metric);
+      client.listLogMetrics(parent);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -246,8 +231,8 @@ public void createLogMetricExceptionTest() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void updateLogMetricTest() {
-    MetricName name = ProjectMetricName.of("[PROJECT]", "[METRIC]");
+  public void getLogMetricTest() {
+    LogMetricName name = LogMetricName.of("[PROJECT]", "[METRIC]");
     String description = "description-1724546052";
     String filter = "filter-1274492040";
     String valueExtractor = "valueExtractor2047672534";
@@ -260,18 +245,16 @@ public void updateLogMetricTest() {
             .build();
     mockMetricsServiceV2.addResponse(expectedResponse);
 
-    MetricName metricName = ProjectMetricName.of("[PROJECT]", "[METRIC]");
-    LogMetric metric = LogMetric.newBuilder().build();
+    LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]");
 
-    LogMetric actualResponse = client.updateLogMetric(metricName, metric);
+    LogMetric actualResponse = client.getLogMetric(metricName);
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockMetricsServiceV2.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    UpdateLogMetricRequest actualRequest = (UpdateLogMetricRequest) actualRequests.get(0);
+    GetLogMetricRequest actualRequest = (GetLogMetricRequest) actualRequests.get(0);
 
-    Assert.assertEquals(metricName, MetricNames.parse(actualRequest.getMetricName()));
-    Assert.assertEquals(metric, actualRequest.getMetric());
+    Assert.assertEquals(metricName, LogMetricName.parse(actualRequest.getMetricName()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -280,15 +263,14 @@ public void updateLogMetricTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void updateLogMetricExceptionTest() throws Exception {
+  public void getLogMetricExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockMetricsServiceV2.addException(exception);
 
     try {
-      MetricName metricName = ProjectMetricName.of("[PROJECT]", "[METRIC]");
-      LogMetric metric = LogMetric.newBuilder().build();
+      LogMetricName metricName = LogMetricName.of("[PROJECT]", "[METRIC]");
 
-      client.updateLogMetric(metricName, metric);
+      client.getLogMetric(metricName);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -297,19 +279,32 @@ public void updateLogMetricExceptionTest() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void deleteLogMetricTest() {
-    Empty expectedResponse = Empty.newBuilder().build();
+  public void createLogMetricTest() {
+    LogMetricName name = LogMetricName.of("[PROJECT]", "[METRIC]");
+    String description = "description-1724546052";
+    String filter = "filter-1274492040";
+    String valueExtractor = "valueExtractor2047672534";
+    LogMetric expectedResponse =
+        LogMetric.newBuilder()
+            .setName(name.toString())
+            .setDescription(description)
+            .setFilter(filter)
+            .setValueExtractor(valueExtractor)
+            .build();
     mockMetricsServiceV2.addResponse(expectedResponse);
 
-    MetricName metricName = ProjectMetricName.of("[PROJECT]", "[METRIC]");
+    ProjectName parent = ProjectName.of("[PROJECT]");
+    LogMetric metric = LogMetric.newBuilder().build();
 
-    client.deleteLogMetric(metricName);
+    LogMetric actualResponse = client.createLogMetric(parent, metric);
+    Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockMetricsServiceV2.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    DeleteLogMetricRequest actualRequest = (DeleteLogMetricRequest) actualRequests.get(0);
+    CreateLogMetricRequest actualRequest = (CreateLogMetricRequest) actualRequests.get(0);
 
-    Assert.assertEquals(metricName, MetricNames.parse(actualRequest.getMetricName()));
+    Assert.assertEquals(parent, ProjectName.parse(actualRequest.getParent()));
+    Assert.assertEquals(metric, actualRequest.getMetric());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -318,14 +313,15 @@ public void deleteLogMetricTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void deleteLogMetricExceptionTest() throws Exception {
+  public void createLogMetricExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockMetricsServiceV2.addException(exception);
 
     try {
-      MetricName metricName = ProjectMetricName.of("[PROJECT]", "[METRIC]");
+      ProjectName parent = ProjectName.of("[PROJECT]");
+      LogMetric metric = LogMetric.newBuilder().build();
 
-      client.deleteLogMetric(metricName);
+      client.createLogMetric(parent, metric);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockConfigServiceV2Impl.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockConfigServiceV2Impl.java
index 8addc0426..2ca8ed4f2 100644
--- a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockConfigServiceV2Impl.java
+++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MockConfigServiceV2Impl.java
@@ -22,15 +22,20 @@
 import com.google.logging.v2.CreateSinkRequest;
 import com.google.logging.v2.DeleteExclusionRequest;
 import com.google.logging.v2.DeleteSinkRequest;
+import com.google.logging.v2.GetBucketRequest;
 import com.google.logging.v2.GetCmekSettingsRequest;
 import com.google.logging.v2.GetExclusionRequest;
 import com.google.logging.v2.GetSinkRequest;
+import com.google.logging.v2.ListBucketsRequest;
+import com.google.logging.v2.ListBucketsResponse;
 import com.google.logging.v2.ListExclusionsRequest;
 import com.google.logging.v2.ListExclusionsResponse;
 import com.google.logging.v2.ListSinksRequest;
 import com.google.logging.v2.ListSinksResponse;
+import com.google.logging.v2.LogBucket;
 import com.google.logging.v2.LogExclusion;
 import com.google.logging.v2.LogSink;
+import com.google.logging.v2.UpdateBucketRequest;
 import com.google.logging.v2.UpdateCmekSettingsRequest;
 import com.google.logging.v2.UpdateExclusionRequest;
 import com.google.logging.v2.UpdateSinkRequest;
@@ -74,6 +79,50 @@ public void reset() {
     responses = new LinkedList<>();
   }
 
+  @Override
+  public void listBuckets(
+      ListBucketsRequest request, StreamObserver responseObserver) {
+    Object response = responses.remove();
+    if (response instanceof ListBucketsResponse) {
+      requests.add(request);
+      responseObserver.onNext((ListBucketsResponse) response);
+      responseObserver.onCompleted();
+    } else if (response instanceof Exception) {
+      responseObserver.onError((Exception) response);
+    } else {
+      responseObserver.onError(new IllegalArgumentException("Unrecognized response type"));
+    }
+  }
+
+  @Override
+  public void getBucket(GetBucketRequest request, StreamObserver responseObserver) {
+    Object response = responses.remove();
+    if (response instanceof LogBucket) {
+      requests.add(request);
+      responseObserver.onNext((LogBucket) response);
+      responseObserver.onCompleted();
+    } else if (response instanceof Exception) {
+      responseObserver.onError((Exception) response);
+    } else {
+      responseObserver.onError(new IllegalArgumentException("Unrecognized response type"));
+    }
+  }
+
+  @Override
+  public void updateBucket(
+      UpdateBucketRequest request, StreamObserver responseObserver) {
+    Object response = responses.remove();
+    if (response instanceof LogBucket) {
+      requests.add(request);
+      responseObserver.onNext((LogBucket) response);
+      responseObserver.onCompleted();
+    } else if (response instanceof Exception) {
+      responseObserver.onError((Exception) response);
+    } else {
+      responseObserver.onError(new IllegalArgumentException("Unrecognized response type"));
+    }
+  }
+
   @Override
   public void listSinks(
       ListSinksRequest request, StreamObserver responseObserver) {
diff --git a/grpc-google-cloud-logging-v2/clirr-ignored-differences.xml b/grpc-google-cloud-logging-v2/clirr-ignored-differences.xml
new file mode 100644
index 000000000..b81961db7
--- /dev/null
+++ b/grpc-google-cloud-logging-v2/clirr-ignored-differences.xml
@@ -0,0 +1,10 @@
+
+
+
+  
+    
+    6001
+    com/google/logging/v2/*Grpc
+    METHOD_*
+  
+
\ No newline at end of file
diff --git a/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ConfigServiceV2Grpc.java b/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ConfigServiceV2Grpc.java
index 96a57be0c..695acaae9 100644
--- a/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ConfigServiceV2Grpc.java
+++ b/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ConfigServiceV2Grpc.java
@@ -30,7 +30,7 @@
  * 
*/ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.10.0)", + value = "by gRPC proto compiler", comments = "Source: google/logging/v2/logging_config.proto") public final class ConfigServiceV2Grpc { @@ -39,26 +39,141 @@ private ConfigServiceV2Grpc() {} public static final String SERVICE_NAME = "google.logging.v2.ConfigServiceV2"; // Static method descriptors that strictly reflect the proto. - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getListSinksMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.logging.v2.ListSinksRequest, com.google.logging.v2.ListSinksResponse> - METHOD_LIST_SINKS = getListSinksMethodHelper(); + private static volatile io.grpc.MethodDescriptor< + com.google.logging.v2.ListBucketsRequest, com.google.logging.v2.ListBucketsResponse> + getListBucketsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListBuckets", + requestType = com.google.logging.v2.ListBucketsRequest.class, + responseType = com.google.logging.v2.ListBucketsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.logging.v2.ListBucketsRequest, com.google.logging.v2.ListBucketsResponse> + getListBucketsMethod() { + io.grpc.MethodDescriptor< + com.google.logging.v2.ListBucketsRequest, com.google.logging.v2.ListBucketsResponse> + getListBucketsMethod; + if ((getListBucketsMethod = ConfigServiceV2Grpc.getListBucketsMethod) == null) { + synchronized (ConfigServiceV2Grpc.class) { + if ((getListBucketsMethod = ConfigServiceV2Grpc.getListBucketsMethod) == null) { + ConfigServiceV2Grpc.getListBucketsMethod = + getListBucketsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListBuckets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.logging.v2.ListBucketsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.logging.v2.ListBucketsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new ConfigServiceV2MethodDescriptorSupplier("ListBuckets")) + .build(); + } + } + } + return getListBucketsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.logging.v2.GetBucketRequest, com.google.logging.v2.LogBucket> + getGetBucketMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBucket", + requestType = com.google.logging.v2.GetBucketRequest.class, + responseType = com.google.logging.v2.LogBucket.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.logging.v2.GetBucketRequest, com.google.logging.v2.LogBucket> + getGetBucketMethod() { + io.grpc.MethodDescriptor< + com.google.logging.v2.GetBucketRequest, com.google.logging.v2.LogBucket> + getGetBucketMethod; + if ((getGetBucketMethod = ConfigServiceV2Grpc.getGetBucketMethod) == null) { + synchronized (ConfigServiceV2Grpc.class) { + if ((getGetBucketMethod = ConfigServiceV2Grpc.getGetBucketMethod) == null) { + ConfigServiceV2Grpc.getGetBucketMethod = + getGetBucketMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBucket")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.logging.v2.GetBucketRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.logging.v2.LogBucket.getDefaultInstance())) + .setSchemaDescriptor(new ConfigServiceV2MethodDescriptorSupplier("GetBucket")) + .build(); + } + } + } + return getGetBucketMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.logging.v2.UpdateBucketRequest, com.google.logging.v2.LogBucket> + getUpdateBucketMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateBucket", + requestType = com.google.logging.v2.UpdateBucketRequest.class, + responseType = com.google.logging.v2.LogBucket.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.logging.v2.UpdateBucketRequest, com.google.logging.v2.LogBucket> + getUpdateBucketMethod() { + io.grpc.MethodDescriptor< + com.google.logging.v2.UpdateBucketRequest, com.google.logging.v2.LogBucket> + getUpdateBucketMethod; + if ((getUpdateBucketMethod = ConfigServiceV2Grpc.getUpdateBucketMethod) == null) { + synchronized (ConfigServiceV2Grpc.class) { + if ((getUpdateBucketMethod = ConfigServiceV2Grpc.getUpdateBucketMethod) == null) { + ConfigServiceV2Grpc.getUpdateBucketMethod = + getUpdateBucketMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateBucket")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.logging.v2.UpdateBucketRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.logging.v2.LogBucket.getDefaultInstance())) + .setSchemaDescriptor( + new ConfigServiceV2MethodDescriptorSupplier("UpdateBucket")) + .build(); + } + } + } + return getUpdateBucketMethod; + } private static volatile io.grpc.MethodDescriptor< com.google.logging.v2.ListSinksRequest, com.google.logging.v2.ListSinksResponse> getListSinksMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSinks", + requestType = com.google.logging.v2.ListSinksRequest.class, + responseType = com.google.logging.v2.ListSinksResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.logging.v2.ListSinksRequest, com.google.logging.v2.ListSinksResponse> getListSinksMethod() { - return getListSinksMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.logging.v2.ListSinksRequest, com.google.logging.v2.ListSinksResponse> - getListSinksMethodHelper() { io.grpc.MethodDescriptor< com.google.logging.v2.ListSinksRequest, com.google.logging.v2.ListSinksResponse> getListSinksMethod; @@ -72,8 +187,7 @@ private ConfigServiceV2Grpc() {} com.google.logging.v2.ListSinksResponse> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName("google.logging.v2.ConfigServiceV2", "ListSinks")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSinks")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -89,26 +203,18 @@ private ConfigServiceV2Grpc() {} return getListSinksMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getGetSinkMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.logging.v2.GetSinkRequest, com.google.logging.v2.LogSink> - METHOD_GET_SINK = getGetSinkMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.logging.v2.GetSinkRequest, com.google.logging.v2.LogSink> getGetSinkMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSink", + requestType = com.google.logging.v2.GetSinkRequest.class, + responseType = com.google.logging.v2.LogSink.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.logging.v2.GetSinkRequest, com.google.logging.v2.LogSink> getGetSinkMethod() { - return getGetSinkMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.logging.v2.GetSinkRequest, com.google.logging.v2.LogSink> - getGetSinkMethodHelper() { io.grpc.MethodDescriptor getGetSinkMethod; if ((getGetSinkMethod = ConfigServiceV2Grpc.getGetSinkMethod) == null) { @@ -120,8 +226,7 @@ private ConfigServiceV2Grpc() {} . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName("google.logging.v2.ConfigServiceV2", "GetSink")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSink")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -137,26 +242,18 @@ private ConfigServiceV2Grpc() {} return getGetSinkMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getCreateSinkMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.logging.v2.CreateSinkRequest, com.google.logging.v2.LogSink> - METHOD_CREATE_SINK = getCreateSinkMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.logging.v2.CreateSinkRequest, com.google.logging.v2.LogSink> getCreateSinkMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateSink", + requestType = com.google.logging.v2.CreateSinkRequest.class, + responseType = com.google.logging.v2.LogSink.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.logging.v2.CreateSinkRequest, com.google.logging.v2.LogSink> getCreateSinkMethod() { - return getCreateSinkMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.logging.v2.CreateSinkRequest, com.google.logging.v2.LogSink> - getCreateSinkMethodHelper() { io.grpc.MethodDescriptor getCreateSinkMethod; if ((getCreateSinkMethod = ConfigServiceV2Grpc.getCreateSinkMethod) == null) { @@ -168,8 +265,7 @@ private ConfigServiceV2Grpc() {} . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName("google.logging.v2.ConfigServiceV2", "CreateSink")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateSink")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -186,26 +282,18 @@ private ConfigServiceV2Grpc() {} return getCreateSinkMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getUpdateSinkMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.logging.v2.UpdateSinkRequest, com.google.logging.v2.LogSink> - METHOD_UPDATE_SINK = getUpdateSinkMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.logging.v2.UpdateSinkRequest, com.google.logging.v2.LogSink> getUpdateSinkMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateSink", + requestType = com.google.logging.v2.UpdateSinkRequest.class, + responseType = com.google.logging.v2.LogSink.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.logging.v2.UpdateSinkRequest, com.google.logging.v2.LogSink> getUpdateSinkMethod() { - return getUpdateSinkMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.logging.v2.UpdateSinkRequest, com.google.logging.v2.LogSink> - getUpdateSinkMethodHelper() { io.grpc.MethodDescriptor getUpdateSinkMethod; if ((getUpdateSinkMethod = ConfigServiceV2Grpc.getUpdateSinkMethod) == null) { @@ -217,8 +305,7 @@ private ConfigServiceV2Grpc() {} . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName("google.logging.v2.ConfigServiceV2", "UpdateSink")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateSink")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -235,26 +322,18 @@ private ConfigServiceV2Grpc() {} return getUpdateSinkMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getDeleteSinkMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.logging.v2.DeleteSinkRequest, com.google.protobuf.Empty> - METHOD_DELETE_SINK = getDeleteSinkMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.logging.v2.DeleteSinkRequest, com.google.protobuf.Empty> getDeleteSinkMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteSink", + requestType = com.google.logging.v2.DeleteSinkRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.logging.v2.DeleteSinkRequest, com.google.protobuf.Empty> getDeleteSinkMethod() { - return getDeleteSinkMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.logging.v2.DeleteSinkRequest, com.google.protobuf.Empty> - getDeleteSinkMethodHelper() { io.grpc.MethodDescriptor getDeleteSinkMethod; if ((getDeleteSinkMethod = ConfigServiceV2Grpc.getDeleteSinkMethod) == null) { @@ -266,8 +345,7 @@ private ConfigServiceV2Grpc() {} . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName("google.logging.v2.ConfigServiceV2", "DeleteSink")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSink")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -284,26 +362,18 @@ private ConfigServiceV2Grpc() {} return getDeleteSinkMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getListExclusionsMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.logging.v2.ListExclusionsRequest, com.google.logging.v2.ListExclusionsResponse> - METHOD_LIST_EXCLUSIONS = getListExclusionsMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.logging.v2.ListExclusionsRequest, com.google.logging.v2.ListExclusionsResponse> getListExclusionsMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListExclusions", + requestType = com.google.logging.v2.ListExclusionsRequest.class, + responseType = com.google.logging.v2.ListExclusionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.logging.v2.ListExclusionsRequest, com.google.logging.v2.ListExclusionsResponse> getListExclusionsMethod() { - return getListExclusionsMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.logging.v2.ListExclusionsRequest, com.google.logging.v2.ListExclusionsResponse> - getListExclusionsMethodHelper() { io.grpc.MethodDescriptor< com.google.logging.v2.ListExclusionsRequest, com.google.logging.v2.ListExclusionsResponse> @@ -318,9 +388,7 @@ private ConfigServiceV2Grpc() {} com.google.logging.v2.ListExclusionsResponse> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.logging.v2.ConfigServiceV2", "ListExclusions")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListExclusions")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -337,26 +405,18 @@ private ConfigServiceV2Grpc() {} return getListExclusionsMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getGetExclusionMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.logging.v2.GetExclusionRequest, com.google.logging.v2.LogExclusion> - METHOD_GET_EXCLUSION = getGetExclusionMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.logging.v2.GetExclusionRequest, com.google.logging.v2.LogExclusion> getGetExclusionMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetExclusion", + requestType = com.google.logging.v2.GetExclusionRequest.class, + responseType = com.google.logging.v2.LogExclusion.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.logging.v2.GetExclusionRequest, com.google.logging.v2.LogExclusion> getGetExclusionMethod() { - return getGetExclusionMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.logging.v2.GetExclusionRequest, com.google.logging.v2.LogExclusion> - getGetExclusionMethodHelper() { io.grpc.MethodDescriptor< com.google.logging.v2.GetExclusionRequest, com.google.logging.v2.LogExclusion> getGetExclusionMethod; @@ -370,9 +430,7 @@ private ConfigServiceV2Grpc() {} com.google.logging.v2.LogExclusion> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.logging.v2.ConfigServiceV2", "GetExclusion")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetExclusion")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -389,26 +447,18 @@ private ConfigServiceV2Grpc() {} return getGetExclusionMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getCreateExclusionMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.logging.v2.CreateExclusionRequest, com.google.logging.v2.LogExclusion> - METHOD_CREATE_EXCLUSION = getCreateExclusionMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.logging.v2.CreateExclusionRequest, com.google.logging.v2.LogExclusion> getCreateExclusionMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateExclusion", + requestType = com.google.logging.v2.CreateExclusionRequest.class, + responseType = com.google.logging.v2.LogExclusion.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.logging.v2.CreateExclusionRequest, com.google.logging.v2.LogExclusion> getCreateExclusionMethod() { - return getCreateExclusionMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.logging.v2.CreateExclusionRequest, com.google.logging.v2.LogExclusion> - getCreateExclusionMethodHelper() { io.grpc.MethodDescriptor< com.google.logging.v2.CreateExclusionRequest, com.google.logging.v2.LogExclusion> getCreateExclusionMethod; @@ -422,9 +472,7 @@ private ConfigServiceV2Grpc() {} com.google.logging.v2.LogExclusion> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.logging.v2.ConfigServiceV2", "CreateExclusion")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateExclusion")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -441,26 +489,18 @@ private ConfigServiceV2Grpc() {} return getCreateExclusionMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getUpdateExclusionMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.logging.v2.UpdateExclusionRequest, com.google.logging.v2.LogExclusion> - METHOD_UPDATE_EXCLUSION = getUpdateExclusionMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.logging.v2.UpdateExclusionRequest, com.google.logging.v2.LogExclusion> getUpdateExclusionMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateExclusion", + requestType = com.google.logging.v2.UpdateExclusionRequest.class, + responseType = com.google.logging.v2.LogExclusion.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.logging.v2.UpdateExclusionRequest, com.google.logging.v2.LogExclusion> getUpdateExclusionMethod() { - return getUpdateExclusionMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.logging.v2.UpdateExclusionRequest, com.google.logging.v2.LogExclusion> - getUpdateExclusionMethodHelper() { io.grpc.MethodDescriptor< com.google.logging.v2.UpdateExclusionRequest, com.google.logging.v2.LogExclusion> getUpdateExclusionMethod; @@ -474,9 +514,7 @@ private ConfigServiceV2Grpc() {} com.google.logging.v2.LogExclusion> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.logging.v2.ConfigServiceV2", "UpdateExclusion")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateExclusion")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -493,26 +531,18 @@ private ConfigServiceV2Grpc() {} return getUpdateExclusionMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getDeleteExclusionMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.logging.v2.DeleteExclusionRequest, com.google.protobuf.Empty> - METHOD_DELETE_EXCLUSION = getDeleteExclusionMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.logging.v2.DeleteExclusionRequest, com.google.protobuf.Empty> getDeleteExclusionMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteExclusion", + requestType = com.google.logging.v2.DeleteExclusionRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.logging.v2.DeleteExclusionRequest, com.google.protobuf.Empty> getDeleteExclusionMethod() { - return getDeleteExclusionMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.logging.v2.DeleteExclusionRequest, com.google.protobuf.Empty> - getDeleteExclusionMethodHelper() { io.grpc.MethodDescriptor< com.google.logging.v2.DeleteExclusionRequest, com.google.protobuf.Empty> getDeleteExclusionMethod; @@ -525,9 +555,7 @@ private ConfigServiceV2Grpc() {} . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.logging.v2.ConfigServiceV2", "DeleteExclusion")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteExclusion")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -544,26 +572,18 @@ private ConfigServiceV2Grpc() {} return getDeleteExclusionMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getGetCmekSettingsMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.logging.v2.GetCmekSettingsRequest, com.google.logging.v2.CmekSettings> - METHOD_GET_CMEK_SETTINGS = getGetCmekSettingsMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.logging.v2.GetCmekSettingsRequest, com.google.logging.v2.CmekSettings> getGetCmekSettingsMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetCmekSettings", + requestType = com.google.logging.v2.GetCmekSettingsRequest.class, + responseType = com.google.logging.v2.CmekSettings.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.logging.v2.GetCmekSettingsRequest, com.google.logging.v2.CmekSettings> getGetCmekSettingsMethod() { - return getGetCmekSettingsMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.logging.v2.GetCmekSettingsRequest, com.google.logging.v2.CmekSettings> - getGetCmekSettingsMethodHelper() { io.grpc.MethodDescriptor< com.google.logging.v2.GetCmekSettingsRequest, com.google.logging.v2.CmekSettings> getGetCmekSettingsMethod; @@ -577,9 +597,7 @@ private ConfigServiceV2Grpc() {} com.google.logging.v2.CmekSettings> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.logging.v2.ConfigServiceV2", "GetCmekSettings")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCmekSettings")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -596,26 +614,18 @@ private ConfigServiceV2Grpc() {} return getGetCmekSettingsMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getUpdateCmekSettingsMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.logging.v2.UpdateCmekSettingsRequest, com.google.logging.v2.CmekSettings> - METHOD_UPDATE_CMEK_SETTINGS = getUpdateCmekSettingsMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.logging.v2.UpdateCmekSettingsRequest, com.google.logging.v2.CmekSettings> getUpdateCmekSettingsMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateCmekSettings", + requestType = com.google.logging.v2.UpdateCmekSettingsRequest.class, + responseType = com.google.logging.v2.CmekSettings.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.logging.v2.UpdateCmekSettingsRequest, com.google.logging.v2.CmekSettings> getUpdateCmekSettingsMethod() { - return getUpdateCmekSettingsMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.logging.v2.UpdateCmekSettingsRequest, com.google.logging.v2.CmekSettings> - getUpdateCmekSettingsMethodHelper() { io.grpc.MethodDescriptor< com.google.logging.v2.UpdateCmekSettingsRequest, com.google.logging.v2.CmekSettings> getUpdateCmekSettingsMethod; @@ -630,9 +640,7 @@ private ConfigServiceV2Grpc() {} com.google.logging.v2.CmekSettings> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.logging.v2.ConfigServiceV2", "UpdateCmekSettings")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateCmekSettings")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -651,19 +659,43 @@ private ConfigServiceV2Grpc() {} /** Creates a new async stub that supports all call types for the service */ public static ConfigServiceV2Stub newStub(io.grpc.Channel channel) { - return new ConfigServiceV2Stub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ConfigServiceV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ConfigServiceV2Stub(channel, callOptions); + } + }; + return ConfigServiceV2Stub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static ConfigServiceV2BlockingStub newBlockingStub(io.grpc.Channel channel) { - return new ConfigServiceV2BlockingStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ConfigServiceV2BlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ConfigServiceV2BlockingStub(channel, callOptions); + } + }; + return ConfigServiceV2BlockingStub.newStub(factory, channel); } /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static ConfigServiceV2FutureStub newFutureStub(io.grpc.Channel channel) { - return new ConfigServiceV2FutureStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ConfigServiceV2FutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ConfigServiceV2FutureStub(channel, callOptions); + } + }; + return ConfigServiceV2FutureStub.newStub(factory, channel); } /** @@ -675,6 +707,52 @@ public static ConfigServiceV2FutureStub newFutureStub(io.grpc.Channel channel) { */ public abstract static class ConfigServiceV2ImplBase implements io.grpc.BindableService { + /** + * + * + *
+     * Lists buckets (Beta).
+     * 
+ */ + public void listBuckets( + com.google.logging.v2.ListBucketsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getListBucketsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a bucket (Beta).
+     * 
+ */ + public void getBucket( + com.google.logging.v2.GetBucketRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetBucketMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a bucket. This method replaces the following fields in the
+     * existing bucket with values from the new bucket: `retention_period`
+     * If the retention period is decreased and the bucket is locked,
+     * FAILED_PRECONDITION will be returned.
+     * If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION
+     * will be returned.
+     * A buckets region may not be modified after it is created.
+     * This method is in Beta.
+     * 
+ */ + public void updateBucket( + com.google.logging.v2.UpdateBucketRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateBucketMethod(), responseObserver); + } + /** * * @@ -685,7 +763,7 @@ public abstract static class ConfigServiceV2ImplBase implements io.grpc.Bindable public void listSinks( com.google.logging.v2.ListSinksRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getListSinksMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getListSinksMethod(), responseObserver); } /** @@ -698,7 +776,7 @@ public void listSinks( public void getSink( com.google.logging.v2.GetSinkRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getGetSinkMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getGetSinkMethod(), responseObserver); } /** @@ -714,7 +792,7 @@ public void getSink( public void createSink( com.google.logging.v2.CreateSinkRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getCreateSinkMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getCreateSinkMethod(), responseObserver); } /** @@ -730,7 +808,7 @@ public void createSink( public void updateSink( com.google.logging.v2.UpdateSinkRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getUpdateSinkMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getUpdateSinkMethod(), responseObserver); } /** @@ -744,7 +822,7 @@ public void updateSink( public void deleteSink( com.google.logging.v2.DeleteSinkRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getDeleteSinkMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getDeleteSinkMethod(), responseObserver); } /** @@ -758,7 +836,7 @@ public void listExclusions( com.google.logging.v2.ListExclusionsRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getListExclusionsMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getListExclusionsMethod(), responseObserver); } /** @@ -771,7 +849,7 @@ public void listExclusions( public void getExclusion( com.google.logging.v2.GetExclusionRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getGetExclusionMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getGetExclusionMethod(), responseObserver); } /** @@ -786,7 +864,7 @@ public void getExclusion( public void createExclusion( com.google.logging.v2.CreateExclusionRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getCreateExclusionMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getCreateExclusionMethod(), responseObserver); } /** @@ -799,7 +877,7 @@ public void createExclusion( public void updateExclusion( com.google.logging.v2.UpdateExclusionRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getUpdateExclusionMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getUpdateExclusionMethod(), responseObserver); } /** @@ -812,7 +890,7 @@ public void updateExclusion( public void deleteExclusion( com.google.logging.v2.DeleteExclusionRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getDeleteExclusionMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getDeleteExclusionMethod(), responseObserver); } /** @@ -824,13 +902,13 @@ public void deleteExclusion( * organizations. Once configured, it applies to all projects and folders in * the GCP organization. * See [Enabling CMEK for Logs - * Router](/logging/docs/routing/managed-encryption) for more information. + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. *
*/ public void getCmekSettings( com.google.logging.v2.GetCmekSettingsRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getGetCmekSettingsMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getGetCmekSettingsMethod(), responseObserver); } /** @@ -847,87 +925,105 @@ public void getCmekSettings( * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or * 3) access to the key is disabled. * See [Enabling CMEK for Logs - * Router](/logging/docs/routing/managed-encryption) for more information. + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. *
*/ public void updateCmekSettings( com.google.logging.v2.UpdateCmekSettingsRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getUpdateCmekSettingsMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getUpdateCmekSettingsMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getListSinksMethodHelper(), + getListBucketsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.logging.v2.ListBucketsRequest, + com.google.logging.v2.ListBucketsResponse>(this, METHODID_LIST_BUCKETS))) + .addMethod( + getGetBucketMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.logging.v2.GetBucketRequest, com.google.logging.v2.LogBucket>( + this, METHODID_GET_BUCKET))) + .addMethod( + getUpdateBucketMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.logging.v2.UpdateBucketRequest, com.google.logging.v2.LogBucket>( + this, METHODID_UPDATE_BUCKET))) + .addMethod( + getListSinksMethod(), asyncUnaryCall( new MethodHandlers< com.google.logging.v2.ListSinksRequest, com.google.logging.v2.ListSinksResponse>(this, METHODID_LIST_SINKS))) .addMethod( - getGetSinkMethodHelper(), + getGetSinkMethod(), asyncUnaryCall( new MethodHandlers< com.google.logging.v2.GetSinkRequest, com.google.logging.v2.LogSink>( this, METHODID_GET_SINK))) .addMethod( - getCreateSinkMethodHelper(), + getCreateSinkMethod(), asyncUnaryCall( new MethodHandlers< com.google.logging.v2.CreateSinkRequest, com.google.logging.v2.LogSink>( this, METHODID_CREATE_SINK))) .addMethod( - getUpdateSinkMethodHelper(), + getUpdateSinkMethod(), asyncUnaryCall( new MethodHandlers< com.google.logging.v2.UpdateSinkRequest, com.google.logging.v2.LogSink>( this, METHODID_UPDATE_SINK))) .addMethod( - getDeleteSinkMethodHelper(), + getDeleteSinkMethod(), asyncUnaryCall( new MethodHandlers< com.google.logging.v2.DeleteSinkRequest, com.google.protobuf.Empty>( this, METHODID_DELETE_SINK))) .addMethod( - getListExclusionsMethodHelper(), + getListExclusionsMethod(), asyncUnaryCall( new MethodHandlers< com.google.logging.v2.ListExclusionsRequest, com.google.logging.v2.ListExclusionsResponse>( this, METHODID_LIST_EXCLUSIONS))) .addMethod( - getGetExclusionMethodHelper(), + getGetExclusionMethod(), asyncUnaryCall( new MethodHandlers< com.google.logging.v2.GetExclusionRequest, com.google.logging.v2.LogExclusion>(this, METHODID_GET_EXCLUSION))) .addMethod( - getCreateExclusionMethodHelper(), + getCreateExclusionMethod(), asyncUnaryCall( new MethodHandlers< com.google.logging.v2.CreateExclusionRequest, com.google.logging.v2.LogExclusion>(this, METHODID_CREATE_EXCLUSION))) .addMethod( - getUpdateExclusionMethodHelper(), + getUpdateExclusionMethod(), asyncUnaryCall( new MethodHandlers< com.google.logging.v2.UpdateExclusionRequest, com.google.logging.v2.LogExclusion>(this, METHODID_UPDATE_EXCLUSION))) .addMethod( - getDeleteExclusionMethodHelper(), + getDeleteExclusionMethod(), asyncUnaryCall( new MethodHandlers< com.google.logging.v2.DeleteExclusionRequest, com.google.protobuf.Empty>( this, METHODID_DELETE_EXCLUSION))) .addMethod( - getGetCmekSettingsMethodHelper(), + getGetCmekSettingsMethod(), asyncUnaryCall( new MethodHandlers< com.google.logging.v2.GetCmekSettingsRequest, com.google.logging.v2.CmekSettings>(this, METHODID_GET_CMEK_SETTINGS))) .addMethod( - getUpdateCmekSettingsMethodHelper(), + getUpdateCmekSettingsMethod(), asyncUnaryCall( new MethodHandlers< com.google.logging.v2.UpdateCmekSettingsRequest, @@ -944,11 +1040,7 @@ public final io.grpc.ServerServiceDefinition bindService() { *
*/ public static final class ConfigServiceV2Stub - extends io.grpc.stub.AbstractStub { - private ConfigServiceV2Stub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractAsyncStub { private ConfigServiceV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -958,6 +1050,59 @@ protected ConfigServiceV2Stub build(io.grpc.Channel channel, io.grpc.CallOptions return new ConfigServiceV2Stub(channel, callOptions); } + /** + * + * + *
+     * Lists buckets (Beta).
+     * 
+ */ + public void listBuckets( + com.google.logging.v2.ListBucketsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListBucketsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a bucket (Beta).
+     * 
+ */ + public void getBucket( + com.google.logging.v2.GetBucketRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetBucketMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Updates a bucket. This method replaces the following fields in the
+     * existing bucket with values from the new bucket: `retention_period`
+     * If the retention period is decreased and the bucket is locked,
+     * FAILED_PRECONDITION will be returned.
+     * If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION
+     * will be returned.
+     * A buckets region may not be modified after it is created.
+     * This method is in Beta.
+     * 
+ */ + public void updateBucket( + com.google.logging.v2.UpdateBucketRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateBucketMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -969,9 +1114,7 @@ public void listSinks( com.google.logging.v2.ListSinksRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getListSinksMethodHelper(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getListSinksMethod(), getCallOptions()), request, responseObserver); } /** @@ -985,9 +1128,7 @@ public void getSink( com.google.logging.v2.GetSinkRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getGetSinkMethodHelper(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getGetSinkMethod(), getCallOptions()), request, responseObserver); } /** @@ -1004,9 +1145,7 @@ public void createSink( com.google.logging.v2.CreateSinkRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getCreateSinkMethodHelper(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getCreateSinkMethod(), getCallOptions()), request, responseObserver); } /** @@ -1023,9 +1162,7 @@ public void updateSink( com.google.logging.v2.UpdateSinkRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getUpdateSinkMethodHelper(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getUpdateSinkMethod(), getCallOptions()), request, responseObserver); } /** @@ -1040,9 +1177,7 @@ public void deleteSink( com.google.logging.v2.DeleteSinkRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getDeleteSinkMethodHelper(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getDeleteSinkMethod(), getCallOptions()), request, responseObserver); } /** @@ -1057,7 +1192,7 @@ public void listExclusions( io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getListExclusionsMethodHelper(), getCallOptions()), + getChannel().newCall(getListExclusionsMethod(), getCallOptions()), request, responseObserver); } @@ -1073,7 +1208,7 @@ public void getExclusion( com.google.logging.v2.GetExclusionRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getGetExclusionMethodHelper(), getCallOptions()), + getChannel().newCall(getGetExclusionMethod(), getCallOptions()), request, responseObserver); } @@ -1091,7 +1226,7 @@ public void createExclusion( com.google.logging.v2.CreateExclusionRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getCreateExclusionMethodHelper(), getCallOptions()), + getChannel().newCall(getCreateExclusionMethod(), getCallOptions()), request, responseObserver); } @@ -1107,7 +1242,7 @@ public void updateExclusion( com.google.logging.v2.UpdateExclusionRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getUpdateExclusionMethodHelper(), getCallOptions()), + getChannel().newCall(getUpdateExclusionMethod(), getCallOptions()), request, responseObserver); } @@ -1123,7 +1258,7 @@ public void deleteExclusion( com.google.logging.v2.DeleteExclusionRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getDeleteExclusionMethodHelper(), getCallOptions()), + getChannel().newCall(getDeleteExclusionMethod(), getCallOptions()), request, responseObserver); } @@ -1137,14 +1272,14 @@ public void deleteExclusion( * organizations. Once configured, it applies to all projects and folders in * the GCP organization. * See [Enabling CMEK for Logs - * Router](/logging/docs/routing/managed-encryption) for more information. + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. *
*/ public void getCmekSettings( com.google.logging.v2.GetCmekSettingsRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getGetCmekSettingsMethodHelper(), getCallOptions()), + getChannel().newCall(getGetCmekSettingsMethod(), getCallOptions()), request, responseObserver); } @@ -1163,14 +1298,14 @@ public void getCmekSettings( * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or * 3) access to the key is disabled. * See [Enabling CMEK for Logs - * Router](/logging/docs/routing/managed-encryption) for more information. + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. *
*/ public void updateCmekSettings( com.google.logging.v2.UpdateCmekSettingsRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getUpdateCmekSettingsMethodHelper(), getCallOptions()), + getChannel().newCall(getUpdateCmekSettingsMethod(), getCallOptions()), request, responseObserver); } @@ -1184,11 +1319,7 @@ public void updateCmekSettings( *
*/ public static final class ConfigServiceV2BlockingStub - extends io.grpc.stub.AbstractStub { - private ConfigServiceV2BlockingStub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractBlockingStub { private ConfigServiceV2BlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -1199,6 +1330,49 @@ protected ConfigServiceV2BlockingStub build( return new ConfigServiceV2BlockingStub(channel, callOptions); } + /** + * + * + *
+     * Lists buckets (Beta).
+     * 
+ */ + public com.google.logging.v2.ListBucketsResponse listBuckets( + com.google.logging.v2.ListBucketsRequest request) { + return blockingUnaryCall(getChannel(), getListBucketsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a bucket (Beta).
+     * 
+ */ + public com.google.logging.v2.LogBucket getBucket( + com.google.logging.v2.GetBucketRequest request) { + return blockingUnaryCall(getChannel(), getGetBucketMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a bucket. This method replaces the following fields in the
+     * existing bucket with values from the new bucket: `retention_period`
+     * If the retention period is decreased and the bucket is locked,
+     * FAILED_PRECONDITION will be returned.
+     * If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION
+     * will be returned.
+     * A buckets region may not be modified after it is created.
+     * This method is in Beta.
+     * 
+ */ + public com.google.logging.v2.LogBucket updateBucket( + com.google.logging.v2.UpdateBucketRequest request) { + return blockingUnaryCall(getChannel(), getUpdateBucketMethod(), getCallOptions(), request); + } + /** * * @@ -1208,7 +1382,7 @@ protected ConfigServiceV2BlockingStub build( */ public com.google.logging.v2.ListSinksResponse listSinks( com.google.logging.v2.ListSinksRequest request) { - return blockingUnaryCall(getChannel(), getListSinksMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getListSinksMethod(), getCallOptions(), request); } /** @@ -1219,7 +1393,7 @@ public com.google.logging.v2.ListSinksResponse listSinks( *
*/ public com.google.logging.v2.LogSink getSink(com.google.logging.v2.GetSinkRequest request) { - return blockingUnaryCall(getChannel(), getGetSinkMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getGetSinkMethod(), getCallOptions(), request); } /** @@ -1234,8 +1408,7 @@ public com.google.logging.v2.LogSink getSink(com.google.logging.v2.GetSinkReques */ public com.google.logging.v2.LogSink createSink( com.google.logging.v2.CreateSinkRequest request) { - return blockingUnaryCall( - getChannel(), getCreateSinkMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getCreateSinkMethod(), getCallOptions(), request); } /** @@ -1250,8 +1423,7 @@ public com.google.logging.v2.LogSink createSink( */ public com.google.logging.v2.LogSink updateSink( com.google.logging.v2.UpdateSinkRequest request) { - return blockingUnaryCall( - getChannel(), getUpdateSinkMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getUpdateSinkMethod(), getCallOptions(), request); } /** @@ -1263,8 +1435,7 @@ public com.google.logging.v2.LogSink updateSink( *
*/ public com.google.protobuf.Empty deleteSink(com.google.logging.v2.DeleteSinkRequest request) { - return blockingUnaryCall( - getChannel(), getDeleteSinkMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getDeleteSinkMethod(), getCallOptions(), request); } /** @@ -1276,8 +1447,7 @@ public com.google.protobuf.Empty deleteSink(com.google.logging.v2.DeleteSinkRequ */ public com.google.logging.v2.ListExclusionsResponse listExclusions( com.google.logging.v2.ListExclusionsRequest request) { - return blockingUnaryCall( - getChannel(), getListExclusionsMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getListExclusionsMethod(), getCallOptions(), request); } /** @@ -1289,8 +1459,7 @@ public com.google.logging.v2.ListExclusionsResponse listExclusions( */ public com.google.logging.v2.LogExclusion getExclusion( com.google.logging.v2.GetExclusionRequest request) { - return blockingUnaryCall( - getChannel(), getGetExclusionMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getGetExclusionMethod(), getCallOptions(), request); } /** @@ -1304,8 +1473,7 @@ public com.google.logging.v2.LogExclusion getExclusion( */ public com.google.logging.v2.LogExclusion createExclusion( com.google.logging.v2.CreateExclusionRequest request) { - return blockingUnaryCall( - getChannel(), getCreateExclusionMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getCreateExclusionMethod(), getCallOptions(), request); } /** @@ -1317,8 +1485,7 @@ public com.google.logging.v2.LogExclusion createExclusion( */ public com.google.logging.v2.LogExclusion updateExclusion( com.google.logging.v2.UpdateExclusionRequest request) { - return blockingUnaryCall( - getChannel(), getUpdateExclusionMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getUpdateExclusionMethod(), getCallOptions(), request); } /** @@ -1330,8 +1497,7 @@ public com.google.logging.v2.LogExclusion updateExclusion( */ public com.google.protobuf.Empty deleteExclusion( com.google.logging.v2.DeleteExclusionRequest request) { - return blockingUnaryCall( - getChannel(), getDeleteExclusionMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getDeleteExclusionMethod(), getCallOptions(), request); } /** @@ -1343,13 +1509,12 @@ public com.google.protobuf.Empty deleteExclusion( * organizations. Once configured, it applies to all projects and folders in * the GCP organization. * See [Enabling CMEK for Logs - * Router](/logging/docs/routing/managed-encryption) for more information. + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. *
*/ public com.google.logging.v2.CmekSettings getCmekSettings( com.google.logging.v2.GetCmekSettingsRequest request) { - return blockingUnaryCall( - getChannel(), getGetCmekSettingsMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getGetCmekSettingsMethod(), getCallOptions(), request); } /** @@ -1366,13 +1531,13 @@ public com.google.logging.v2.CmekSettings getCmekSettings( * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or * 3) access to the key is disabled. * See [Enabling CMEK for Logs - * Router](/logging/docs/routing/managed-encryption) for more information. + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. *
*/ public com.google.logging.v2.CmekSettings updateCmekSettings( com.google.logging.v2.UpdateCmekSettingsRequest request) { return blockingUnaryCall( - getChannel(), getUpdateCmekSettingsMethodHelper(), getCallOptions(), request); + getChannel(), getUpdateCmekSettingsMethod(), getCallOptions(), request); } } @@ -1384,11 +1549,7 @@ public com.google.logging.v2.CmekSettings updateCmekSettings( *
*/ public static final class ConfigServiceV2FutureStub - extends io.grpc.stub.AbstractStub { - private ConfigServiceV2FutureStub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractFutureStub { private ConfigServiceV2FutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -1399,6 +1560,52 @@ protected ConfigServiceV2FutureStub build( return new ConfigServiceV2FutureStub(channel, callOptions); } + /** + * + * + *
+     * Lists buckets (Beta).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.logging.v2.ListBucketsResponse> + listBuckets(com.google.logging.v2.ListBucketsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListBucketsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a bucket (Beta).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getBucket(com.google.logging.v2.GetBucketRequest request) { + return futureUnaryCall(getChannel().newCall(getGetBucketMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a bucket. This method replaces the following fields in the
+     * existing bucket with values from the new bucket: `retention_period`
+     * If the retention period is decreased and the bucket is locked,
+     * FAILED_PRECONDITION will be returned.
+     * If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION
+     * will be returned.
+     * A buckets region may not be modified after it is created.
+     * This method is in Beta.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateBucket(com.google.logging.v2.UpdateBucketRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateBucketMethod(), getCallOptions()), request); + } + /** * * @@ -1409,8 +1616,7 @@ protected ConfigServiceV2FutureStub build( public com.google.common.util.concurrent.ListenableFuture< com.google.logging.v2.ListSinksResponse> listSinks(com.google.logging.v2.ListSinksRequest request) { - return futureUnaryCall( - getChannel().newCall(getListSinksMethodHelper(), getCallOptions()), request); + return futureUnaryCall(getChannel().newCall(getListSinksMethod(), getCallOptions()), request); } /** @@ -1422,8 +1628,7 @@ protected ConfigServiceV2FutureStub build( */ public com.google.common.util.concurrent.ListenableFuture getSink(com.google.logging.v2.GetSinkRequest request) { - return futureUnaryCall( - getChannel().newCall(getGetSinkMethodHelper(), getCallOptions()), request); + return futureUnaryCall(getChannel().newCall(getGetSinkMethod(), getCallOptions()), request); } /** @@ -1439,7 +1644,7 @@ protected ConfigServiceV2FutureStub build( public com.google.common.util.concurrent.ListenableFuture createSink(com.google.logging.v2.CreateSinkRequest request) { return futureUnaryCall( - getChannel().newCall(getCreateSinkMethodHelper(), getCallOptions()), request); + getChannel().newCall(getCreateSinkMethod(), getCallOptions()), request); } /** @@ -1455,7 +1660,7 @@ protected ConfigServiceV2FutureStub build( public com.google.common.util.concurrent.ListenableFuture updateSink(com.google.logging.v2.UpdateSinkRequest request) { return futureUnaryCall( - getChannel().newCall(getUpdateSinkMethodHelper(), getCallOptions()), request); + getChannel().newCall(getUpdateSinkMethod(), getCallOptions()), request); } /** @@ -1469,7 +1674,7 @@ protected ConfigServiceV2FutureStub build( public com.google.common.util.concurrent.ListenableFuture deleteSink( com.google.logging.v2.DeleteSinkRequest request) { return futureUnaryCall( - getChannel().newCall(getDeleteSinkMethodHelper(), getCallOptions()), request); + getChannel().newCall(getDeleteSinkMethod(), getCallOptions()), request); } /** @@ -1483,7 +1688,7 @@ public com.google.common.util.concurrent.ListenableFuture listExclusions(com.google.logging.v2.ListExclusionsRequest request) { return futureUnaryCall( - getChannel().newCall(getListExclusionsMethodHelper(), getCallOptions()), request); + getChannel().newCall(getListExclusionsMethod(), getCallOptions()), request); } /** @@ -1496,7 +1701,7 @@ public com.google.common.util.concurrent.ListenableFuture getExclusion(com.google.logging.v2.GetExclusionRequest request) { return futureUnaryCall( - getChannel().newCall(getGetExclusionMethodHelper(), getCallOptions()), request); + getChannel().newCall(getGetExclusionMethod(), getCallOptions()), request); } /** @@ -1511,7 +1716,7 @@ public com.google.common.util.concurrent.ListenableFuture createExclusion(com.google.logging.v2.CreateExclusionRequest request) { return futureUnaryCall( - getChannel().newCall(getCreateExclusionMethodHelper(), getCallOptions()), request); + getChannel().newCall(getCreateExclusionMethod(), getCallOptions()), request); } /** @@ -1524,7 +1729,7 @@ public com.google.common.util.concurrent.ListenableFuture updateExclusion(com.google.logging.v2.UpdateExclusionRequest request) { return futureUnaryCall( - getChannel().newCall(getUpdateExclusionMethodHelper(), getCallOptions()), request); + getChannel().newCall(getUpdateExclusionMethod(), getCallOptions()), request); } /** @@ -1537,7 +1742,7 @@ public com.google.common.util.concurrent.ListenableFuture deleteExclusion(com.google.logging.v2.DeleteExclusionRequest request) { return futureUnaryCall( - getChannel().newCall(getDeleteExclusionMethodHelper(), getCallOptions()), request); + getChannel().newCall(getDeleteExclusionMethod(), getCallOptions()), request); } /** @@ -1549,13 +1754,13 @@ public com.google.common.util.concurrent.ListenableFuture */ public com.google.common.util.concurrent.ListenableFuture getCmekSettings(com.google.logging.v2.GetCmekSettingsRequest request) { return futureUnaryCall( - getChannel().newCall(getGetCmekSettingsMethodHelper(), getCallOptions()), request); + getChannel().newCall(getGetCmekSettingsMethod(), getCallOptions()), request); } /** @@ -1572,28 +1777,31 @@ public com.google.common.util.concurrent.ListenableFuture */ public com.google.common.util.concurrent.ListenableFuture updateCmekSettings(com.google.logging.v2.UpdateCmekSettingsRequest request) { return futureUnaryCall( - getChannel().newCall(getUpdateCmekSettingsMethodHelper(), getCallOptions()), request); + getChannel().newCall(getUpdateCmekSettingsMethod(), getCallOptions()), request); } } - private static final int METHODID_LIST_SINKS = 0; - private static final int METHODID_GET_SINK = 1; - private static final int METHODID_CREATE_SINK = 2; - private static final int METHODID_UPDATE_SINK = 3; - private static final int METHODID_DELETE_SINK = 4; - private static final int METHODID_LIST_EXCLUSIONS = 5; - private static final int METHODID_GET_EXCLUSION = 6; - private static final int METHODID_CREATE_EXCLUSION = 7; - private static final int METHODID_UPDATE_EXCLUSION = 8; - private static final int METHODID_DELETE_EXCLUSION = 9; - private static final int METHODID_GET_CMEK_SETTINGS = 10; - private static final int METHODID_UPDATE_CMEK_SETTINGS = 11; + private static final int METHODID_LIST_BUCKETS = 0; + private static final int METHODID_GET_BUCKET = 1; + private static final int METHODID_UPDATE_BUCKET = 2; + private static final int METHODID_LIST_SINKS = 3; + private static final int METHODID_GET_SINK = 4; + private static final int METHODID_CREATE_SINK = 5; + private static final int METHODID_UPDATE_SINK = 6; + private static final int METHODID_DELETE_SINK = 7; + private static final int METHODID_LIST_EXCLUSIONS = 8; + private static final int METHODID_GET_EXCLUSION = 9; + private static final int METHODID_CREATE_EXCLUSION = 10; + private static final int METHODID_UPDATE_EXCLUSION = 11; + private static final int METHODID_DELETE_EXCLUSION = 12; + private static final int METHODID_GET_CMEK_SETTINGS = 13; + private static final int METHODID_UPDATE_CMEK_SETTINGS = 14; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1612,6 +1820,22 @@ private static final class MethodHandlers @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { + case METHODID_LIST_BUCKETS: + serviceImpl.listBuckets( + (com.google.logging.v2.ListBucketsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_BUCKET: + serviceImpl.getBucket( + (com.google.logging.v2.GetBucketRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_BUCKET: + serviceImpl.updateBucket( + (com.google.logging.v2.UpdateBucketRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_LIST_SINKS: serviceImpl.listSinks( (com.google.logging.v2.ListSinksRequest) request, @@ -1738,18 +1962,21 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new ConfigServiceV2FileDescriptorSupplier()) - .addMethod(getListSinksMethodHelper()) - .addMethod(getGetSinkMethodHelper()) - .addMethod(getCreateSinkMethodHelper()) - .addMethod(getUpdateSinkMethodHelper()) - .addMethod(getDeleteSinkMethodHelper()) - .addMethod(getListExclusionsMethodHelper()) - .addMethod(getGetExclusionMethodHelper()) - .addMethod(getCreateExclusionMethodHelper()) - .addMethod(getUpdateExclusionMethodHelper()) - .addMethod(getDeleteExclusionMethodHelper()) - .addMethod(getGetCmekSettingsMethodHelper()) - .addMethod(getUpdateCmekSettingsMethodHelper()) + .addMethod(getListBucketsMethod()) + .addMethod(getGetBucketMethod()) + .addMethod(getUpdateBucketMethod()) + .addMethod(getListSinksMethod()) + .addMethod(getGetSinkMethod()) + .addMethod(getCreateSinkMethod()) + .addMethod(getUpdateSinkMethod()) + .addMethod(getDeleteSinkMethod()) + .addMethod(getListExclusionsMethod()) + .addMethod(getGetExclusionMethod()) + .addMethod(getCreateExclusionMethod()) + .addMethod(getUpdateExclusionMethod()) + .addMethod(getDeleteExclusionMethod()) + .addMethod(getGetCmekSettingsMethod()) + .addMethod(getUpdateCmekSettingsMethod()) .build(); } } diff --git a/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingServiceV2Grpc.java b/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingServiceV2Grpc.java index 9c2588d1a..2874a3885 100644 --- a/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingServiceV2Grpc.java +++ b/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingServiceV2Grpc.java @@ -30,7 +30,7 @@ *
*/ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.10.0)", + value = "by gRPC proto compiler", comments = "Source: google/logging/v2/logging.proto") public final class LoggingServiceV2Grpc { @@ -39,26 +39,18 @@ private LoggingServiceV2Grpc() {} public static final String SERVICE_NAME = "google.logging.v2.LoggingServiceV2"; // Static method descriptors that strictly reflect the proto. - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getDeleteLogMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.logging.v2.DeleteLogRequest, com.google.protobuf.Empty> - METHOD_DELETE_LOG = getDeleteLogMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.logging.v2.DeleteLogRequest, com.google.protobuf.Empty> getDeleteLogMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteLog", + requestType = com.google.logging.v2.DeleteLogRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.logging.v2.DeleteLogRequest, com.google.protobuf.Empty> getDeleteLogMethod() { - return getDeleteLogMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.logging.v2.DeleteLogRequest, com.google.protobuf.Empty> - getDeleteLogMethodHelper() { io.grpc.MethodDescriptor getDeleteLogMethod; if ((getDeleteLogMethod = LoggingServiceV2Grpc.getDeleteLogMethod) == null) { @@ -70,8 +62,7 @@ private LoggingServiceV2Grpc() {} . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName("google.logging.v2.LoggingServiceV2", "DeleteLog")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteLog")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -88,30 +79,20 @@ private LoggingServiceV2Grpc() {} return getDeleteLogMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getWriteLogEntriesMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.logging.v2.WriteLogEntriesRequest, - com.google.logging.v2.WriteLogEntriesResponse> - METHOD_WRITE_LOG_ENTRIES = getWriteLogEntriesMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.logging.v2.WriteLogEntriesRequest, com.google.logging.v2.WriteLogEntriesResponse> getWriteLogEntriesMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "WriteLogEntries", + requestType = com.google.logging.v2.WriteLogEntriesRequest.class, + responseType = com.google.logging.v2.WriteLogEntriesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.logging.v2.WriteLogEntriesRequest, com.google.logging.v2.WriteLogEntriesResponse> getWriteLogEntriesMethod() { - return getWriteLogEntriesMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.logging.v2.WriteLogEntriesRequest, - com.google.logging.v2.WriteLogEntriesResponse> - getWriteLogEntriesMethodHelper() { io.grpc.MethodDescriptor< com.google.logging.v2.WriteLogEntriesRequest, com.google.logging.v2.WriteLogEntriesResponse> @@ -126,9 +107,7 @@ private LoggingServiceV2Grpc() {} com.google.logging.v2.WriteLogEntriesResponse> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.logging.v2.LoggingServiceV2", "WriteLogEntries")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "WriteLogEntries")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -145,26 +124,18 @@ private LoggingServiceV2Grpc() {} return getWriteLogEntriesMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getListLogEntriesMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.logging.v2.ListLogEntriesRequest, com.google.logging.v2.ListLogEntriesResponse> - METHOD_LIST_LOG_ENTRIES = getListLogEntriesMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.logging.v2.ListLogEntriesRequest, com.google.logging.v2.ListLogEntriesResponse> getListLogEntriesMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListLogEntries", + requestType = com.google.logging.v2.ListLogEntriesRequest.class, + responseType = com.google.logging.v2.ListLogEntriesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.logging.v2.ListLogEntriesRequest, com.google.logging.v2.ListLogEntriesResponse> getListLogEntriesMethod() { - return getListLogEntriesMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.logging.v2.ListLogEntriesRequest, com.google.logging.v2.ListLogEntriesResponse> - getListLogEntriesMethodHelper() { io.grpc.MethodDescriptor< com.google.logging.v2.ListLogEntriesRequest, com.google.logging.v2.ListLogEntriesResponse> @@ -179,9 +150,7 @@ private LoggingServiceV2Grpc() {} com.google.logging.v2.ListLogEntriesResponse> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.logging.v2.LoggingServiceV2", "ListLogEntries")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListLogEntries")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -198,31 +167,20 @@ private LoggingServiceV2Grpc() {} return getListLogEntriesMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getListMonitoredResourceDescriptorsMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.logging.v2.ListMonitoredResourceDescriptorsRequest, - com.google.logging.v2.ListMonitoredResourceDescriptorsResponse> - METHOD_LIST_MONITORED_RESOURCE_DESCRIPTORS = - getListMonitoredResourceDescriptorsMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.logging.v2.ListMonitoredResourceDescriptorsRequest, com.google.logging.v2.ListMonitoredResourceDescriptorsResponse> getListMonitoredResourceDescriptorsMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListMonitoredResourceDescriptors", + requestType = com.google.logging.v2.ListMonitoredResourceDescriptorsRequest.class, + responseType = com.google.logging.v2.ListMonitoredResourceDescriptorsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.logging.v2.ListMonitoredResourceDescriptorsRequest, com.google.logging.v2.ListMonitoredResourceDescriptorsResponse> getListMonitoredResourceDescriptorsMethod() { - return getListMonitoredResourceDescriptorsMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.logging.v2.ListMonitoredResourceDescriptorsRequest, - com.google.logging.v2.ListMonitoredResourceDescriptorsResponse> - getListMonitoredResourceDescriptorsMethodHelper() { io.grpc.MethodDescriptor< com.google.logging.v2.ListMonitoredResourceDescriptorsRequest, com.google.logging.v2.ListMonitoredResourceDescriptorsResponse> @@ -242,9 +200,7 @@ private LoggingServiceV2Grpc() {} newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName( - generateFullMethodName( - "google.logging.v2.LoggingServiceV2", - "ListMonitoredResourceDescriptors")) + generateFullMethodName(SERVICE_NAME, "ListMonitoredResourceDescriptors")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -264,26 +220,18 @@ private LoggingServiceV2Grpc() {} return getListMonitoredResourceDescriptorsMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getListLogsMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.logging.v2.ListLogsRequest, com.google.logging.v2.ListLogsResponse> - METHOD_LIST_LOGS = getListLogsMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.logging.v2.ListLogsRequest, com.google.logging.v2.ListLogsResponse> getListLogsMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListLogs", + requestType = com.google.logging.v2.ListLogsRequest.class, + responseType = com.google.logging.v2.ListLogsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.logging.v2.ListLogsRequest, com.google.logging.v2.ListLogsResponse> getListLogsMethod() { - return getListLogsMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.logging.v2.ListLogsRequest, com.google.logging.v2.ListLogsResponse> - getListLogsMethodHelper() { io.grpc.MethodDescriptor< com.google.logging.v2.ListLogsRequest, com.google.logging.v2.ListLogsResponse> getListLogsMethod; @@ -297,8 +245,7 @@ private LoggingServiceV2Grpc() {} com.google.logging.v2.ListLogsResponse> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName("google.logging.v2.LoggingServiceV2", "ListLogs")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListLogs")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -316,19 +263,43 @@ private LoggingServiceV2Grpc() {} /** Creates a new async stub that supports all call types for the service */ public static LoggingServiceV2Stub newStub(io.grpc.Channel channel) { - return new LoggingServiceV2Stub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LoggingServiceV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LoggingServiceV2Stub(channel, callOptions); + } + }; + return LoggingServiceV2Stub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static LoggingServiceV2BlockingStub newBlockingStub(io.grpc.Channel channel) { - return new LoggingServiceV2BlockingStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LoggingServiceV2BlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LoggingServiceV2BlockingStub(channel, callOptions); + } + }; + return LoggingServiceV2BlockingStub.newStub(factory, channel); } /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static LoggingServiceV2FutureStub newFutureStub(io.grpc.Channel channel) { - return new LoggingServiceV2FutureStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LoggingServiceV2FutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LoggingServiceV2FutureStub(channel, callOptions); + } + }; + return LoggingServiceV2FutureStub.newStub(factory, channel); } /** @@ -353,7 +324,7 @@ public abstract static class LoggingServiceV2ImplBase implements io.grpc.Bindabl public void deleteLog( com.google.logging.v2.DeleteLogRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getDeleteLogMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getDeleteLogMethod(), responseObserver); } /** @@ -373,7 +344,7 @@ public void writeLogEntries( com.google.logging.v2.WriteLogEntriesRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getWriteLogEntriesMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getWriteLogEntriesMethod(), responseObserver); } /** @@ -382,14 +353,14 @@ public void writeLogEntries( *
      * Lists log entries.  Use this method to retrieve log entries that originated
      * from a project/folder/organization/billing account.  For ways to export log
-     * entries, see [Exporting Logs](/logging/docs/export).
+     * entries, see [Exporting Logs](https://cloud.google.com/logging/docs/export).
      * 
*/ public void listLogEntries( com.google.logging.v2.ListLogEntriesRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getListLogEntriesMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getListLogEntriesMethod(), responseObserver); } /** @@ -403,8 +374,7 @@ public void listMonitoredResourceDescriptors( com.google.logging.v2.ListMonitoredResourceDescriptorsRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall( - getListMonitoredResourceDescriptorsMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getListMonitoredResourceDescriptorsMethod(), responseObserver); } /** @@ -418,41 +388,41 @@ public void listMonitoredResourceDescriptors( public void listLogs( com.google.logging.v2.ListLogsRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getListLogsMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getListLogsMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getDeleteLogMethodHelper(), + getDeleteLogMethod(), asyncUnaryCall( new MethodHandlers< com.google.logging.v2.DeleteLogRequest, com.google.protobuf.Empty>( this, METHODID_DELETE_LOG))) .addMethod( - getWriteLogEntriesMethodHelper(), + getWriteLogEntriesMethod(), asyncUnaryCall( new MethodHandlers< com.google.logging.v2.WriteLogEntriesRequest, com.google.logging.v2.WriteLogEntriesResponse>( this, METHODID_WRITE_LOG_ENTRIES))) .addMethod( - getListLogEntriesMethodHelper(), + getListLogEntriesMethod(), asyncUnaryCall( new MethodHandlers< com.google.logging.v2.ListLogEntriesRequest, com.google.logging.v2.ListLogEntriesResponse>( this, METHODID_LIST_LOG_ENTRIES))) .addMethod( - getListMonitoredResourceDescriptorsMethodHelper(), + getListMonitoredResourceDescriptorsMethod(), asyncUnaryCall( new MethodHandlers< com.google.logging.v2.ListMonitoredResourceDescriptorsRequest, com.google.logging.v2.ListMonitoredResourceDescriptorsResponse>( this, METHODID_LIST_MONITORED_RESOURCE_DESCRIPTORS))) .addMethod( - getListLogsMethodHelper(), + getListLogsMethod(), asyncUnaryCall( new MethodHandlers< com.google.logging.v2.ListLogsRequest, @@ -469,11 +439,7 @@ public final io.grpc.ServerServiceDefinition bindService() { *
*/ public static final class LoggingServiceV2Stub - extends io.grpc.stub.AbstractStub { - private LoggingServiceV2Stub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractAsyncStub { private LoggingServiceV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -497,9 +463,7 @@ public void deleteLog( com.google.logging.v2.DeleteLogRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getDeleteLogMethodHelper(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getDeleteLogMethod(), getCallOptions()), request, responseObserver); } /** @@ -520,7 +484,7 @@ public void writeLogEntries( io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getWriteLogEntriesMethodHelper(), getCallOptions()), + getChannel().newCall(getWriteLogEntriesMethod(), getCallOptions()), request, responseObserver); } @@ -531,7 +495,7 @@ public void writeLogEntries( *
      * Lists log entries.  Use this method to retrieve log entries that originated
      * from a project/folder/organization/billing account.  For ways to export log
-     * entries, see [Exporting Logs](/logging/docs/export).
+     * entries, see [Exporting Logs](https://cloud.google.com/logging/docs/export).
      * 
*/ public void listLogEntries( @@ -539,7 +503,7 @@ public void listLogEntries( io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getListLogEntriesMethodHelper(), getCallOptions()), + getChannel().newCall(getListLogEntriesMethod(), getCallOptions()), request, responseObserver); } @@ -556,7 +520,7 @@ public void listMonitoredResourceDescriptors( io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getListMonitoredResourceDescriptorsMethodHelper(), getCallOptions()), + getChannel().newCall(getListMonitoredResourceDescriptorsMethod(), getCallOptions()), request, responseObserver); } @@ -573,9 +537,7 @@ public void listLogs( com.google.logging.v2.ListLogsRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getListLogsMethodHelper(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getListLogsMethod(), getCallOptions()), request, responseObserver); } } @@ -587,11 +549,7 @@ public void listLogs( *
*/ public static final class LoggingServiceV2BlockingStub - extends io.grpc.stub.AbstractStub { - private LoggingServiceV2BlockingStub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractBlockingStub { private LoggingServiceV2BlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -613,7 +571,7 @@ protected LoggingServiceV2BlockingStub build( *
*/ public com.google.protobuf.Empty deleteLog(com.google.logging.v2.DeleteLogRequest request) { - return blockingUnaryCall(getChannel(), getDeleteLogMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getDeleteLogMethod(), getCallOptions(), request); } /** @@ -631,8 +589,7 @@ public com.google.protobuf.Empty deleteLog(com.google.logging.v2.DeleteLogReques */ public com.google.logging.v2.WriteLogEntriesResponse writeLogEntries( com.google.logging.v2.WriteLogEntriesRequest request) { - return blockingUnaryCall( - getChannel(), getWriteLogEntriesMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getWriteLogEntriesMethod(), getCallOptions(), request); } /** @@ -641,13 +598,12 @@ public com.google.logging.v2.WriteLogEntriesResponse writeLogEntries( *
      * Lists log entries.  Use this method to retrieve log entries that originated
      * from a project/folder/organization/billing account.  For ways to export log
-     * entries, see [Exporting Logs](/logging/docs/export).
+     * entries, see [Exporting Logs](https://cloud.google.com/logging/docs/export).
      * 
*/ public com.google.logging.v2.ListLogEntriesResponse listLogEntries( com.google.logging.v2.ListLogEntriesRequest request) { - return blockingUnaryCall( - getChannel(), getListLogEntriesMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getListLogEntriesMethod(), getCallOptions(), request); } /** @@ -661,10 +617,7 @@ public com.google.logging.v2.ListLogEntriesResponse listLogEntries( listMonitoredResourceDescriptors( com.google.logging.v2.ListMonitoredResourceDescriptorsRequest request) { return blockingUnaryCall( - getChannel(), - getListMonitoredResourceDescriptorsMethodHelper(), - getCallOptions(), - request); + getChannel(), getListMonitoredResourceDescriptorsMethod(), getCallOptions(), request); } /** @@ -677,7 +630,7 @@ public com.google.logging.v2.ListLogEntriesResponse listLogEntries( */ public com.google.logging.v2.ListLogsResponse listLogs( com.google.logging.v2.ListLogsRequest request) { - return blockingUnaryCall(getChannel(), getListLogsMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getListLogsMethod(), getCallOptions(), request); } } @@ -689,11 +642,7 @@ public com.google.logging.v2.ListLogsResponse listLogs( *
*/ public static final class LoggingServiceV2FutureStub - extends io.grpc.stub.AbstractStub { - private LoggingServiceV2FutureStub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractFutureStub { private LoggingServiceV2FutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -716,8 +665,7 @@ protected LoggingServiceV2FutureStub build( */ public com.google.common.util.concurrent.ListenableFuture deleteLog( com.google.logging.v2.DeleteLogRequest request) { - return futureUnaryCall( - getChannel().newCall(getDeleteLogMethodHelper(), getCallOptions()), request); + return futureUnaryCall(getChannel().newCall(getDeleteLogMethod(), getCallOptions()), request); } /** @@ -737,7 +685,7 @@ public com.google.common.util.concurrent.ListenableFuture writeLogEntries(com.google.logging.v2.WriteLogEntriesRequest request) { return futureUnaryCall( - getChannel().newCall(getWriteLogEntriesMethodHelper(), getCallOptions()), request); + getChannel().newCall(getWriteLogEntriesMethod(), getCallOptions()), request); } /** @@ -746,14 +694,14 @@ public com.google.common.util.concurrent.ListenableFuture * Lists log entries. Use this method to retrieve log entries that originated * from a project/folder/organization/billing account. For ways to export log - * entries, see [Exporting Logs](/logging/docs/export). + * entries, see [Exporting Logs](https://cloud.google.com/logging/docs/export). *
*/ public com.google.common.util.concurrent.ListenableFuture< com.google.logging.v2.ListLogEntriesResponse> listLogEntries(com.google.logging.v2.ListLogEntriesRequest request) { return futureUnaryCall( - getChannel().newCall(getListLogEntriesMethodHelper(), getCallOptions()), request); + getChannel().newCall(getListLogEntriesMethod(), getCallOptions()), request); } /** @@ -768,7 +716,7 @@ public com.google.common.util.concurrent.ListenableFuture listLogs(com.google.logging.v2.ListLogsRequest request) { - return futureUnaryCall( - getChannel().newCall(getListLogsMethodHelper(), getCallOptions()), request); + return futureUnaryCall(getChannel().newCall(getListLogsMethod(), getCallOptions()), request); } } @@ -905,11 +852,11 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new LoggingServiceV2FileDescriptorSupplier()) - .addMethod(getDeleteLogMethodHelper()) - .addMethod(getWriteLogEntriesMethodHelper()) - .addMethod(getListLogEntriesMethodHelper()) - .addMethod(getListMonitoredResourceDescriptorsMethodHelper()) - .addMethod(getListLogsMethodHelper()) + .addMethod(getDeleteLogMethod()) + .addMethod(getWriteLogEntriesMethod()) + .addMethod(getListLogEntriesMethod()) + .addMethod(getListMonitoredResourceDescriptorsMethod()) + .addMethod(getListLogsMethod()) .build(); } } diff --git a/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/MetricsServiceV2Grpc.java b/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/MetricsServiceV2Grpc.java index 1ed1bf71a..bd8043e60 100644 --- a/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/MetricsServiceV2Grpc.java +++ b/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/MetricsServiceV2Grpc.java @@ -30,7 +30,7 @@ *
*/ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.10.0)", + value = "by gRPC proto compiler", comments = "Source: google/logging/v2/logging_metrics.proto") public final class MetricsServiceV2Grpc { @@ -39,26 +39,18 @@ private MetricsServiceV2Grpc() {} public static final String SERVICE_NAME = "google.logging.v2.MetricsServiceV2"; // Static method descriptors that strictly reflect the proto. - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getListLogMetricsMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.logging.v2.ListLogMetricsRequest, com.google.logging.v2.ListLogMetricsResponse> - METHOD_LIST_LOG_METRICS = getListLogMetricsMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.logging.v2.ListLogMetricsRequest, com.google.logging.v2.ListLogMetricsResponse> getListLogMetricsMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListLogMetrics", + requestType = com.google.logging.v2.ListLogMetricsRequest.class, + responseType = com.google.logging.v2.ListLogMetricsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.logging.v2.ListLogMetricsRequest, com.google.logging.v2.ListLogMetricsResponse> getListLogMetricsMethod() { - return getListLogMetricsMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.logging.v2.ListLogMetricsRequest, com.google.logging.v2.ListLogMetricsResponse> - getListLogMetricsMethodHelper() { io.grpc.MethodDescriptor< com.google.logging.v2.ListLogMetricsRequest, com.google.logging.v2.ListLogMetricsResponse> @@ -73,9 +65,7 @@ private MetricsServiceV2Grpc() {} com.google.logging.v2.ListLogMetricsResponse> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.logging.v2.MetricsServiceV2", "ListLogMetrics")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListLogMetrics")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -92,26 +82,18 @@ private MetricsServiceV2Grpc() {} return getListLogMetricsMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getGetLogMetricMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.logging.v2.GetLogMetricRequest, com.google.logging.v2.LogMetric> - METHOD_GET_LOG_METRIC = getGetLogMetricMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.logging.v2.GetLogMetricRequest, com.google.logging.v2.LogMetric> getGetLogMetricMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetLogMetric", + requestType = com.google.logging.v2.GetLogMetricRequest.class, + responseType = com.google.logging.v2.LogMetric.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.logging.v2.GetLogMetricRequest, com.google.logging.v2.LogMetric> getGetLogMetricMethod() { - return getGetLogMetricMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.logging.v2.GetLogMetricRequest, com.google.logging.v2.LogMetric> - getGetLogMetricMethodHelper() { io.grpc.MethodDescriptor< com.google.logging.v2.GetLogMetricRequest, com.google.logging.v2.LogMetric> getGetLogMetricMethod; @@ -124,9 +106,7 @@ private MetricsServiceV2Grpc() {} . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.logging.v2.MetricsServiceV2", "GetLogMetric")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLogMetric")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -143,26 +123,18 @@ private MetricsServiceV2Grpc() {} return getGetLogMetricMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getCreateLogMetricMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.logging.v2.CreateLogMetricRequest, com.google.logging.v2.LogMetric> - METHOD_CREATE_LOG_METRIC = getCreateLogMetricMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.logging.v2.CreateLogMetricRequest, com.google.logging.v2.LogMetric> getCreateLogMetricMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateLogMetric", + requestType = com.google.logging.v2.CreateLogMetricRequest.class, + responseType = com.google.logging.v2.LogMetric.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.logging.v2.CreateLogMetricRequest, com.google.logging.v2.LogMetric> getCreateLogMetricMethod() { - return getCreateLogMetricMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.logging.v2.CreateLogMetricRequest, com.google.logging.v2.LogMetric> - getCreateLogMetricMethodHelper() { io.grpc.MethodDescriptor< com.google.logging.v2.CreateLogMetricRequest, com.google.logging.v2.LogMetric> getCreateLogMetricMethod; @@ -176,9 +148,7 @@ private MetricsServiceV2Grpc() {} com.google.logging.v2.LogMetric> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.logging.v2.MetricsServiceV2", "CreateLogMetric")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateLogMetric")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -195,26 +165,18 @@ private MetricsServiceV2Grpc() {} return getCreateLogMetricMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getUpdateLogMetricMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.logging.v2.UpdateLogMetricRequest, com.google.logging.v2.LogMetric> - METHOD_UPDATE_LOG_METRIC = getUpdateLogMetricMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.logging.v2.UpdateLogMetricRequest, com.google.logging.v2.LogMetric> getUpdateLogMetricMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateLogMetric", + requestType = com.google.logging.v2.UpdateLogMetricRequest.class, + responseType = com.google.logging.v2.LogMetric.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.logging.v2.UpdateLogMetricRequest, com.google.logging.v2.LogMetric> getUpdateLogMetricMethod() { - return getUpdateLogMetricMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.logging.v2.UpdateLogMetricRequest, com.google.logging.v2.LogMetric> - getUpdateLogMetricMethodHelper() { io.grpc.MethodDescriptor< com.google.logging.v2.UpdateLogMetricRequest, com.google.logging.v2.LogMetric> getUpdateLogMetricMethod; @@ -228,9 +190,7 @@ private MetricsServiceV2Grpc() {} com.google.logging.v2.LogMetric> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.logging.v2.MetricsServiceV2", "UpdateLogMetric")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateLogMetric")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -247,26 +207,18 @@ private MetricsServiceV2Grpc() {} return getUpdateLogMetricMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getDeleteLogMetricMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.logging.v2.DeleteLogMetricRequest, com.google.protobuf.Empty> - METHOD_DELETE_LOG_METRIC = getDeleteLogMetricMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.logging.v2.DeleteLogMetricRequest, com.google.protobuf.Empty> getDeleteLogMetricMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteLogMetric", + requestType = com.google.logging.v2.DeleteLogMetricRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.logging.v2.DeleteLogMetricRequest, com.google.protobuf.Empty> getDeleteLogMetricMethod() { - return getDeleteLogMetricMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.logging.v2.DeleteLogMetricRequest, com.google.protobuf.Empty> - getDeleteLogMetricMethodHelper() { io.grpc.MethodDescriptor< com.google.logging.v2.DeleteLogMetricRequest, com.google.protobuf.Empty> getDeleteLogMetricMethod; @@ -279,9 +231,7 @@ private MetricsServiceV2Grpc() {} . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.logging.v2.MetricsServiceV2", "DeleteLogMetric")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteLogMetric")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -300,19 +250,43 @@ private MetricsServiceV2Grpc() {} /** Creates a new async stub that supports all call types for the service */ public static MetricsServiceV2Stub newStub(io.grpc.Channel channel) { - return new MetricsServiceV2Stub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public MetricsServiceV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MetricsServiceV2Stub(channel, callOptions); + } + }; + return MetricsServiceV2Stub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static MetricsServiceV2BlockingStub newBlockingStub(io.grpc.Channel channel) { - return new MetricsServiceV2BlockingStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public MetricsServiceV2BlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MetricsServiceV2BlockingStub(channel, callOptions); + } + }; + return MetricsServiceV2BlockingStub.newStub(factory, channel); } /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static MetricsServiceV2FutureStub newFutureStub(io.grpc.Channel channel) { - return new MetricsServiceV2FutureStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public MetricsServiceV2FutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MetricsServiceV2FutureStub(channel, callOptions); + } + }; + return MetricsServiceV2FutureStub.newStub(factory, channel); } /** @@ -335,7 +309,7 @@ public void listLogMetrics( com.google.logging.v2.ListLogMetricsRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getListLogMetricsMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getListLogMetricsMethod(), responseObserver); } /** @@ -348,7 +322,7 @@ public void listLogMetrics( public void getLogMetric( com.google.logging.v2.GetLogMetricRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getGetLogMetricMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getGetLogMetricMethod(), responseObserver); } /** @@ -361,7 +335,7 @@ public void getLogMetric( public void createLogMetric( com.google.logging.v2.CreateLogMetricRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getCreateLogMetricMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getCreateLogMetricMethod(), responseObserver); } /** @@ -374,7 +348,7 @@ public void createLogMetric( public void updateLogMetric( com.google.logging.v2.UpdateLogMetricRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getUpdateLogMetricMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getUpdateLogMetricMethod(), responseObserver); } /** @@ -387,39 +361,39 @@ public void updateLogMetric( public void deleteLogMetric( com.google.logging.v2.DeleteLogMetricRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getDeleteLogMetricMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getDeleteLogMetricMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getListLogMetricsMethodHelper(), + getListLogMetricsMethod(), asyncUnaryCall( new MethodHandlers< com.google.logging.v2.ListLogMetricsRequest, com.google.logging.v2.ListLogMetricsResponse>( this, METHODID_LIST_LOG_METRICS))) .addMethod( - getGetLogMetricMethodHelper(), + getGetLogMetricMethod(), asyncUnaryCall( new MethodHandlers< com.google.logging.v2.GetLogMetricRequest, com.google.logging.v2.LogMetric>( this, METHODID_GET_LOG_METRIC))) .addMethod( - getCreateLogMetricMethodHelper(), + getCreateLogMetricMethod(), asyncUnaryCall( new MethodHandlers< com.google.logging.v2.CreateLogMetricRequest, com.google.logging.v2.LogMetric>(this, METHODID_CREATE_LOG_METRIC))) .addMethod( - getUpdateLogMetricMethodHelper(), + getUpdateLogMetricMethod(), asyncUnaryCall( new MethodHandlers< com.google.logging.v2.UpdateLogMetricRequest, com.google.logging.v2.LogMetric>(this, METHODID_UPDATE_LOG_METRIC))) .addMethod( - getDeleteLogMetricMethodHelper(), + getDeleteLogMetricMethod(), asyncUnaryCall( new MethodHandlers< com.google.logging.v2.DeleteLogMetricRequest, com.google.protobuf.Empty>( @@ -436,11 +410,7 @@ public final io.grpc.ServerServiceDefinition bindService() { *
*/ public static final class MetricsServiceV2Stub - extends io.grpc.stub.AbstractStub { - private MetricsServiceV2Stub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractAsyncStub { private MetricsServiceV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -462,7 +432,7 @@ public void listLogMetrics( io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getListLogMetricsMethodHelper(), getCallOptions()), + getChannel().newCall(getListLogMetricsMethod(), getCallOptions()), request, responseObserver); } @@ -478,7 +448,7 @@ public void getLogMetric( com.google.logging.v2.GetLogMetricRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getGetLogMetricMethodHelper(), getCallOptions()), + getChannel().newCall(getGetLogMetricMethod(), getCallOptions()), request, responseObserver); } @@ -494,7 +464,7 @@ public void createLogMetric( com.google.logging.v2.CreateLogMetricRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getCreateLogMetricMethodHelper(), getCallOptions()), + getChannel().newCall(getCreateLogMetricMethod(), getCallOptions()), request, responseObserver); } @@ -510,7 +480,7 @@ public void updateLogMetric( com.google.logging.v2.UpdateLogMetricRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getUpdateLogMetricMethodHelper(), getCallOptions()), + getChannel().newCall(getUpdateLogMetricMethod(), getCallOptions()), request, responseObserver); } @@ -526,7 +496,7 @@ public void deleteLogMetric( com.google.logging.v2.DeleteLogMetricRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getDeleteLogMetricMethodHelper(), getCallOptions()), + getChannel().newCall(getDeleteLogMetricMethod(), getCallOptions()), request, responseObserver); } @@ -540,11 +510,7 @@ public void deleteLogMetric( *
*/ public static final class MetricsServiceV2BlockingStub - extends io.grpc.stub.AbstractStub { - private MetricsServiceV2BlockingStub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractBlockingStub { private MetricsServiceV2BlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -564,8 +530,7 @@ protected MetricsServiceV2BlockingStub build( */ public com.google.logging.v2.ListLogMetricsResponse listLogMetrics( com.google.logging.v2.ListLogMetricsRequest request) { - return blockingUnaryCall( - getChannel(), getListLogMetricsMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getListLogMetricsMethod(), getCallOptions(), request); } /** @@ -577,8 +542,7 @@ public com.google.logging.v2.ListLogMetricsResponse listLogMetrics( */ public com.google.logging.v2.LogMetric getLogMetric( com.google.logging.v2.GetLogMetricRequest request) { - return blockingUnaryCall( - getChannel(), getGetLogMetricMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getGetLogMetricMethod(), getCallOptions(), request); } /** @@ -590,8 +554,7 @@ public com.google.logging.v2.LogMetric getLogMetric( */ public com.google.logging.v2.LogMetric createLogMetric( com.google.logging.v2.CreateLogMetricRequest request) { - return blockingUnaryCall( - getChannel(), getCreateLogMetricMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getCreateLogMetricMethod(), getCallOptions(), request); } /** @@ -603,8 +566,7 @@ public com.google.logging.v2.LogMetric createLogMetric( */ public com.google.logging.v2.LogMetric updateLogMetric( com.google.logging.v2.UpdateLogMetricRequest request) { - return blockingUnaryCall( - getChannel(), getUpdateLogMetricMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getUpdateLogMetricMethod(), getCallOptions(), request); } /** @@ -616,8 +578,7 @@ public com.google.logging.v2.LogMetric updateLogMetric( */ public com.google.protobuf.Empty deleteLogMetric( com.google.logging.v2.DeleteLogMetricRequest request) { - return blockingUnaryCall( - getChannel(), getDeleteLogMetricMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getDeleteLogMetricMethod(), getCallOptions(), request); } } @@ -629,11 +590,7 @@ public com.google.protobuf.Empty deleteLogMetric( *
*/ public static final class MetricsServiceV2FutureStub - extends io.grpc.stub.AbstractStub { - private MetricsServiceV2FutureStub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractFutureStub { private MetricsServiceV2FutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -655,7 +612,7 @@ protected MetricsServiceV2FutureStub build( com.google.logging.v2.ListLogMetricsResponse> listLogMetrics(com.google.logging.v2.ListLogMetricsRequest request) { return futureUnaryCall( - getChannel().newCall(getListLogMetricsMethodHelper(), getCallOptions()), request); + getChannel().newCall(getListLogMetricsMethod(), getCallOptions()), request); } /** @@ -668,7 +625,7 @@ protected MetricsServiceV2FutureStub build( public com.google.common.util.concurrent.ListenableFuture getLogMetric(com.google.logging.v2.GetLogMetricRequest request) { return futureUnaryCall( - getChannel().newCall(getGetLogMetricMethodHelper(), getCallOptions()), request); + getChannel().newCall(getGetLogMetricMethod(), getCallOptions()), request); } /** @@ -681,7 +638,7 @@ protected MetricsServiceV2FutureStub build( public com.google.common.util.concurrent.ListenableFuture createLogMetric(com.google.logging.v2.CreateLogMetricRequest request) { return futureUnaryCall( - getChannel().newCall(getCreateLogMetricMethodHelper(), getCallOptions()), request); + getChannel().newCall(getCreateLogMetricMethod(), getCallOptions()), request); } /** @@ -694,7 +651,7 @@ protected MetricsServiceV2FutureStub build( public com.google.common.util.concurrent.ListenableFuture updateLogMetric(com.google.logging.v2.UpdateLogMetricRequest request) { return futureUnaryCall( - getChannel().newCall(getUpdateLogMetricMethodHelper(), getCallOptions()), request); + getChannel().newCall(getUpdateLogMetricMethod(), getCallOptions()), request); } /** @@ -707,7 +664,7 @@ protected MetricsServiceV2FutureStub build( public com.google.common.util.concurrent.ListenableFuture deleteLogMetric(com.google.logging.v2.DeleteLogMetricRequest request) { return futureUnaryCall( - getChannel().newCall(getDeleteLogMetricMethodHelper(), getCallOptions()), request); + getChannel().newCall(getDeleteLogMetricMethod(), getCallOptions()), request); } } @@ -824,11 +781,11 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new MetricsServiceV2FileDescriptorSupplier()) - .addMethod(getListLogMetricsMethodHelper()) - .addMethod(getGetLogMetricMethodHelper()) - .addMethod(getCreateLogMetricMethodHelper()) - .addMethod(getUpdateLogMetricMethodHelper()) - .addMethod(getDeleteLogMetricMethodHelper()) + .addMethod(getListLogMetricsMethod()) + .addMethod(getGetLogMetricMethod()) + .addMethod(getCreateLogMetricMethod()) + .addMethod(getUpdateLogMetricMethod()) + .addMethod(getDeleteLogMetricMethod()) .build(); } } diff --git a/pom.xml b/pom.xml index b71969de4..1ee16dddf 100644 --- a/pom.xml +++ b/pom.xml @@ -308,13 +308,4 @@ - - - - enable-samples - - samples - - - diff --git a/proto-google-cloud-logging-v2/clirr-ignored-differences.xml b/proto-google-cloud-logging-v2/clirr-ignored-differences.xml index 623f17c55..fdce22875 100644 --- a/proto-google-cloud-logging-v2/clirr-ignored-differences.xml +++ b/proto-google-cloud-logging-v2/clirr-ignored-differences.xml @@ -17,13 +17,68 @@ boolean has*(*) - + 8001 - com/google/logging/type/HttpRequest* + com/google/logging/v2/*Name* 8001 - com/google/logging/type/LogSeverity* + com/google/logging/type/* + + + 7002 + com/google/logging/v2/LogSink*Builder + *StartTime* + + + 7002 + com/google/logging/v2/LogSink*Builder + *EndTime* + + + 7002 + com/google/logging/v2/LogSink + *StartTime* + + + 7002 + com/google/logging/v2/LogSink + *EndTime* + + + 5001 + com/google/logging/v2/*Name + com/google/logging/v2/ParentName + + + 6011 + com/google/logging/v2/LogSink + START_TIME_FIELD_NUMBER + + + 6011 + com/google/logging/v2/LogSink + END_TIME_FIELD_NUMBER + + + 7002 + com/google/logging/v2/LogEntry* + *Metadata* + + + 6011 + com/google/logging/v2/LogEntry + METADATA_FIELD_NUMBER + + + 6011 + com/google/logging/v2/ListLogEntriesRequest + PROJECT_IDS_FIELD_NUMBER + + + 7002 + com/google/logging/v2/ListLogEntriesRequest* + *ProjectIds* diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/BillingExclusionName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/BillingExclusionName.java deleted file mode 100644 index 0392055ac..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/BillingExclusionName.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class BillingExclusionName extends ExclusionName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "billingAccounts/{billing_account}/exclusions/{exclusion}"); - - private volatile Map fieldValuesMap; - - private final String billingAccount; - private final String exclusion; - - public String getBillingAccount() { - return billingAccount; - } - - public String getExclusion() { - return exclusion; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private BillingExclusionName(Builder builder) { - billingAccount = Preconditions.checkNotNull(builder.getBillingAccount()); - exclusion = Preconditions.checkNotNull(builder.getExclusion()); - } - - public static BillingExclusionName of(String billingAccount, String exclusion) { - return newBuilder().setBillingAccount(billingAccount).setExclusion(exclusion).build(); - } - - public static String format(String billingAccount, String exclusion) { - return newBuilder() - .setBillingAccount(billingAccount) - .setExclusion(exclusion) - .build() - .toString(); - } - - public static BillingExclusionName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "BillingExclusionName.parse: formattedString not in valid format"); - return of(matchMap.get("billing_account"), matchMap.get("exclusion")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (BillingExclusionName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("billingAccount", billingAccount); - fieldMapBuilder.put("exclusion", exclusion); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("billing_account", billingAccount, "exclusion", exclusion); - } - - /** Builder for BillingExclusionName. */ - public static class Builder { - - private String billingAccount; - private String exclusion; - - public String getBillingAccount() { - return billingAccount; - } - - public String getExclusion() { - return exclusion; - } - - public Builder setBillingAccount(String billingAccount) { - this.billingAccount = billingAccount; - return this; - } - - public Builder setExclusion(String exclusion) { - this.exclusion = exclusion; - return this; - } - - private Builder() {} - - private Builder(BillingExclusionName billingExclusionName) { - billingAccount = billingExclusionName.billingAccount; - exclusion = billingExclusionName.exclusion; - } - - public BillingExclusionName build() { - return new BillingExclusionName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof BillingExclusionName) { - BillingExclusionName that = (BillingExclusionName) o; - return (this.billingAccount.equals(that.billingAccount)) - && (this.exclusion.equals(that.exclusion)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= billingAccount.hashCode(); - h *= 1000003; - h ^= exclusion.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/BillingLogName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/BillingLogName.java deleted file mode 100644 index 45aa92981..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/BillingLogName.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class BillingLogName extends LogName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("billingAccounts/{billing_account}/logs/{log}"); - - private volatile Map fieldValuesMap; - - private final String billingAccount; - private final String log; - - public String getBillingAccount() { - return billingAccount; - } - - public String getLog() { - return log; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private BillingLogName(Builder builder) { - billingAccount = Preconditions.checkNotNull(builder.getBillingAccount()); - log = Preconditions.checkNotNull(builder.getLog()); - } - - public static BillingLogName of(String billingAccount, String log) { - return newBuilder().setBillingAccount(billingAccount).setLog(log).build(); - } - - public static String format(String billingAccount, String log) { - return newBuilder().setBillingAccount(billingAccount).setLog(log).build().toString(); - } - - public static BillingLogName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "BillingLogName.parse: formattedString not in valid format"); - return of(matchMap.get("billing_account"), matchMap.get("log")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (BillingLogName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("billingAccount", billingAccount); - fieldMapBuilder.put("log", log); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("billing_account", billingAccount, "log", log); - } - - /** Builder for BillingLogName. */ - public static class Builder { - - private String billingAccount; - private String log; - - public String getBillingAccount() { - return billingAccount; - } - - public String getLog() { - return log; - } - - public Builder setBillingAccount(String billingAccount) { - this.billingAccount = billingAccount; - return this; - } - - public Builder setLog(String log) { - this.log = log; - return this; - } - - private Builder() {} - - private Builder(BillingLogName billingLogName) { - billingAccount = billingLogName.billingAccount; - log = billingLogName.log; - } - - public BillingLogName build() { - return new BillingLogName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof BillingLogName) { - BillingLogName that = (BillingLogName) o; - return (this.billingAccount.equals(that.billingAccount)) && (this.log.equals(that.log)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= billingAccount.hashCode(); - h *= 1000003; - h ^= log.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/BillingName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/BillingName.java deleted file mode 100644 index 661dac27f..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/BillingName.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class BillingName extends ParentName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("billingAccounts/{billing_account}"); - - private volatile Map fieldValuesMap; - - private final String billingAccount; - - public String getBillingAccount() { - return billingAccount; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private BillingName(Builder builder) { - billingAccount = Preconditions.checkNotNull(builder.getBillingAccount()); - } - - public static BillingName of(String billingAccount) { - return newBuilder().setBillingAccount(billingAccount).build(); - } - - public static String format(String billingAccount) { - return newBuilder().setBillingAccount(billingAccount).build().toString(); - } - - public static BillingName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "BillingName.parse: formattedString not in valid format"); - return of(matchMap.get("billing_account")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (BillingName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("billingAccount", billingAccount); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("billing_account", billingAccount); - } - - /** Builder for BillingName. */ - public static class Builder { - - private String billingAccount; - - public String getBillingAccount() { - return billingAccount; - } - - public Builder setBillingAccount(String billingAccount) { - this.billingAccount = billingAccount; - return this; - } - - private Builder() {} - - private Builder(BillingName billingName) { - billingAccount = billingName.billingAccount; - } - - public BillingName build() { - return new BillingName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof BillingName) { - BillingName that = (BillingName) o; - return (this.billingAccount.equals(that.billingAccount)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= billingAccount.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/BillingSinkName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/BillingSinkName.java deleted file mode 100644 index 2338e9f47..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/BillingSinkName.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class BillingSinkName extends SinkName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("billingAccounts/{billing_account}/sinks/{sink}"); - - private volatile Map fieldValuesMap; - - private final String billingAccount; - private final String sink; - - public String getBillingAccount() { - return billingAccount; - } - - public String getSink() { - return sink; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private BillingSinkName(Builder builder) { - billingAccount = Preconditions.checkNotNull(builder.getBillingAccount()); - sink = Preconditions.checkNotNull(builder.getSink()); - } - - public static BillingSinkName of(String billingAccount, String sink) { - return newBuilder().setBillingAccount(billingAccount).setSink(sink).build(); - } - - public static String format(String billingAccount, String sink) { - return newBuilder().setBillingAccount(billingAccount).setSink(sink).build().toString(); - } - - public static BillingSinkName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "BillingSinkName.parse: formattedString not in valid format"); - return of(matchMap.get("billing_account"), matchMap.get("sink")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (BillingSinkName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("billingAccount", billingAccount); - fieldMapBuilder.put("sink", sink); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("billing_account", billingAccount, "sink", sink); - } - - /** Builder for BillingSinkName. */ - public static class Builder { - - private String billingAccount; - private String sink; - - public String getBillingAccount() { - return billingAccount; - } - - public String getSink() { - return sink; - } - - public Builder setBillingAccount(String billingAccount) { - this.billingAccount = billingAccount; - return this; - } - - public Builder setSink(String sink) { - this.sink = sink; - return this; - } - - private Builder() {} - - private Builder(BillingSinkName billingSinkName) { - billingAccount = billingSinkName.billingAccount; - sink = billingSinkName.sink; - } - - public BillingSinkName build() { - return new BillingSinkName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof BillingSinkName) { - BillingSinkName that = (BillingSinkName) o; - return (this.billingAccount.equals(that.billingAccount)) && (this.sink.equals(that.sink)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= billingAccount.hashCode(); - h *= 1000003; - h ^= sink.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ExclusionName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ExclusionName.java deleted file mode 100644 index 98c41eb0e..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ExclusionName.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.resourcenames.ResourceName; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public abstract class ExclusionName implements ResourceName { - protected ExclusionName() {} -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ExclusionNames.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ExclusionNames.java deleted file mode 100644 index dccab9d15..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ExclusionNames.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class ExclusionNames { - private ExclusionNames() {} - - public static ExclusionName parse(String resourceNameString) { - if (ProjectExclusionName.isParsableFrom(resourceNameString)) { - return ProjectExclusionName.parse(resourceNameString); - } - if (OrganizationExclusionName.isParsableFrom(resourceNameString)) { - return OrganizationExclusionName.parse(resourceNameString); - } - if (FolderExclusionName.isParsableFrom(resourceNameString)) { - return FolderExclusionName.parse(resourceNameString); - } - if (BillingExclusionName.isParsableFrom(resourceNameString)) { - return BillingExclusionName.parse(resourceNameString); - } - return UntypedExclusionName.parse(resourceNameString); - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/FolderExclusionName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/FolderExclusionName.java deleted file mode 100644 index 2f9341cae..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/FolderExclusionName.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class FolderExclusionName extends ExclusionName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("folders/{folder}/exclusions/{exclusion}"); - - private volatile Map fieldValuesMap; - - private final String folder; - private final String exclusion; - - public String getFolder() { - return folder; - } - - public String getExclusion() { - return exclusion; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private FolderExclusionName(Builder builder) { - folder = Preconditions.checkNotNull(builder.getFolder()); - exclusion = Preconditions.checkNotNull(builder.getExclusion()); - } - - public static FolderExclusionName of(String folder, String exclusion) { - return newBuilder().setFolder(folder).setExclusion(exclusion).build(); - } - - public static String format(String folder, String exclusion) { - return newBuilder().setFolder(folder).setExclusion(exclusion).build().toString(); - } - - public static FolderExclusionName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "FolderExclusionName.parse: formattedString not in valid format"); - return of(matchMap.get("folder"), matchMap.get("exclusion")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (FolderExclusionName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("folder", folder); - fieldMapBuilder.put("exclusion", exclusion); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("folder", folder, "exclusion", exclusion); - } - - /** Builder for FolderExclusionName. */ - public static class Builder { - - private String folder; - private String exclusion; - - public String getFolder() { - return folder; - } - - public String getExclusion() { - return exclusion; - } - - public Builder setFolder(String folder) { - this.folder = folder; - return this; - } - - public Builder setExclusion(String exclusion) { - this.exclusion = exclusion; - return this; - } - - private Builder() {} - - private Builder(FolderExclusionName folderExclusionName) { - folder = folderExclusionName.folder; - exclusion = folderExclusionName.exclusion; - } - - public FolderExclusionName build() { - return new FolderExclusionName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof FolderExclusionName) { - FolderExclusionName that = (FolderExclusionName) o; - return (this.folder.equals(that.folder)) && (this.exclusion.equals(that.exclusion)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= folder.hashCode(); - h *= 1000003; - h ^= exclusion.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/FolderLogName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/FolderLogName.java deleted file mode 100644 index ad05f98ba..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/FolderLogName.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class FolderLogName extends LogName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("folders/{folder}/logs/{log}"); - - private volatile Map fieldValuesMap; - - private final String folder; - private final String log; - - public String getFolder() { - return folder; - } - - public String getLog() { - return log; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private FolderLogName(Builder builder) { - folder = Preconditions.checkNotNull(builder.getFolder()); - log = Preconditions.checkNotNull(builder.getLog()); - } - - public static FolderLogName of(String folder, String log) { - return newBuilder().setFolder(folder).setLog(log).build(); - } - - public static String format(String folder, String log) { - return newBuilder().setFolder(folder).setLog(log).build().toString(); - } - - public static FolderLogName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "FolderLogName.parse: formattedString not in valid format"); - return of(matchMap.get("folder"), matchMap.get("log")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (FolderLogName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("folder", folder); - fieldMapBuilder.put("log", log); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("folder", folder, "log", log); - } - - /** Builder for FolderLogName. */ - public static class Builder { - - private String folder; - private String log; - - public String getFolder() { - return folder; - } - - public String getLog() { - return log; - } - - public Builder setFolder(String folder) { - this.folder = folder; - return this; - } - - public Builder setLog(String log) { - this.log = log; - return this; - } - - private Builder() {} - - private Builder(FolderLogName folderLogName) { - folder = folderLogName.folder; - log = folderLogName.log; - } - - public FolderLogName build() { - return new FolderLogName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof FolderLogName) { - FolderLogName that = (FolderLogName) o; - return (this.folder.equals(that.folder)) && (this.log.equals(that.log)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= folder.hashCode(); - h *= 1000003; - h ^= log.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/FolderName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/FolderName.java deleted file mode 100644 index 5477ffdde..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/FolderName.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class FolderName extends ParentName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("folders/{folder}"); - - private volatile Map fieldValuesMap; - - private final String folder; - - public String getFolder() { - return folder; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private FolderName(Builder builder) { - folder = Preconditions.checkNotNull(builder.getFolder()); - } - - public static FolderName of(String folder) { - return newBuilder().setFolder(folder).build(); - } - - public static String format(String folder) { - return newBuilder().setFolder(folder).build().toString(); - } - - public static FolderName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "FolderName.parse: formattedString not in valid format"); - return of(matchMap.get("folder")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (FolderName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("folder", folder); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("folder", folder); - } - - /** Builder for FolderName. */ - public static class Builder { - - private String folder; - - public String getFolder() { - return folder; - } - - public Builder setFolder(String folder) { - this.folder = folder; - return this; - } - - private Builder() {} - - private Builder(FolderName folderName) { - folder = folderName.folder; - } - - public FolderName build() { - return new FolderName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof FolderName) { - FolderName that = (FolderName) o; - return (this.folder.equals(that.folder)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= folder.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/FolderSinkName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/FolderSinkName.java deleted file mode 100644 index e4bdc5225..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/FolderSinkName.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class FolderSinkName extends SinkName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("folders/{folder}/sinks/{sink}"); - - private volatile Map fieldValuesMap; - - private final String folder; - private final String sink; - - public String getFolder() { - return folder; - } - - public String getSink() { - return sink; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private FolderSinkName(Builder builder) { - folder = Preconditions.checkNotNull(builder.getFolder()); - sink = Preconditions.checkNotNull(builder.getSink()); - } - - public static FolderSinkName of(String folder, String sink) { - return newBuilder().setFolder(folder).setSink(sink).build(); - } - - public static String format(String folder, String sink) { - return newBuilder().setFolder(folder).setSink(sink).build().toString(); - } - - public static FolderSinkName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "FolderSinkName.parse: formattedString not in valid format"); - return of(matchMap.get("folder"), matchMap.get("sink")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (FolderSinkName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("folder", folder); - fieldMapBuilder.put("sink", sink); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("folder", folder, "sink", sink); - } - - /** Builder for FolderSinkName. */ - public static class Builder { - - private String folder; - private String sink; - - public String getFolder() { - return folder; - } - - public String getSink() { - return sink; - } - - public Builder setFolder(String folder) { - this.folder = folder; - return this; - } - - public Builder setSink(String sink) { - this.sink = sink; - return this; - } - - private Builder() {} - - private Builder(FolderSinkName folderSinkName) { - folder = folderSinkName.folder; - sink = folderSinkName.sink; - } - - public FolderSinkName build() { - return new FolderSinkName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof FolderSinkName) { - FolderSinkName that = (FolderSinkName) o; - return (this.folder.equals(that.folder)) && (this.sink.equals(that.sink)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= folder.hashCode(); - h *= 1000003; - h ^= sink.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/LogName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/LogName.java deleted file mode 100644 index 89dc2ce9c..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/LogName.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.resourcenames.ResourceName; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public abstract class LogName implements ResourceName { - protected LogName() {} -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/LogNames.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/LogNames.java deleted file mode 100644 index 62454988e..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/LogNames.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class LogNames { - private LogNames() {} - - public static LogName parse(String resourceNameString) { - if (ProjectLogName.isParsableFrom(resourceNameString)) { - return ProjectLogName.parse(resourceNameString); - } - if (OrganizationLogName.isParsableFrom(resourceNameString)) { - return OrganizationLogName.parse(resourceNameString); - } - if (FolderLogName.isParsableFrom(resourceNameString)) { - return FolderLogName.parse(resourceNameString); - } - if (BillingLogName.isParsableFrom(resourceNameString)) { - return BillingLogName.parse(resourceNameString); - } - return UntypedLogName.parse(resourceNameString); - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/MetricName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/MetricName.java deleted file mode 100644 index 1652bd58e..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/MetricName.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.resourcenames.ResourceName; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public abstract class MetricName implements ResourceName { - protected MetricName() {} -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/MetricNames.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/MetricNames.java deleted file mode 100644 index 57f49a947..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/MetricNames.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class MetricNames { - private MetricNames() {} - - public static MetricName parse(String resourceNameString) { - if (ProjectMetricName.isParsableFrom(resourceNameString)) { - return ProjectMetricName.parse(resourceNameString); - } - return UntypedMetricName.parse(resourceNameString); - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/OrganizationExclusionName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/OrganizationExclusionName.java deleted file mode 100644 index 5e41a2a59..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/OrganizationExclusionName.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class OrganizationExclusionName extends ExclusionName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("organizations/{organization}/exclusions/{exclusion}"); - - private volatile Map fieldValuesMap; - - private final String organization; - private final String exclusion; - - public String getOrganization() { - return organization; - } - - public String getExclusion() { - return exclusion; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private OrganizationExclusionName(Builder builder) { - organization = Preconditions.checkNotNull(builder.getOrganization()); - exclusion = Preconditions.checkNotNull(builder.getExclusion()); - } - - public static OrganizationExclusionName of(String organization, String exclusion) { - return newBuilder().setOrganization(organization).setExclusion(exclusion).build(); - } - - public static String format(String organization, String exclusion) { - return newBuilder().setOrganization(organization).setExclusion(exclusion).build().toString(); - } - - public static OrganizationExclusionName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, - "OrganizationExclusionName.parse: formattedString not in valid format"); - return of(matchMap.get("organization"), matchMap.get("exclusion")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (OrganizationExclusionName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("organization", organization); - fieldMapBuilder.put("exclusion", exclusion); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("organization", organization, "exclusion", exclusion); - } - - /** Builder for OrganizationExclusionName. */ - public static class Builder { - - private String organization; - private String exclusion; - - public String getOrganization() { - return organization; - } - - public String getExclusion() { - return exclusion; - } - - public Builder setOrganization(String organization) { - this.organization = organization; - return this; - } - - public Builder setExclusion(String exclusion) { - this.exclusion = exclusion; - return this; - } - - private Builder() {} - - private Builder(OrganizationExclusionName organizationExclusionName) { - organization = organizationExclusionName.organization; - exclusion = organizationExclusionName.exclusion; - } - - public OrganizationExclusionName build() { - return new OrganizationExclusionName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof OrganizationExclusionName) { - OrganizationExclusionName that = (OrganizationExclusionName) o; - return (this.organization.equals(that.organization)) - && (this.exclusion.equals(that.exclusion)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= organization.hashCode(); - h *= 1000003; - h ^= exclusion.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/OrganizationLogName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/OrganizationLogName.java deleted file mode 100644 index cd238dbc5..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/OrganizationLogName.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class OrganizationLogName extends LogName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("organizations/{organization}/logs/{log}"); - - private volatile Map fieldValuesMap; - - private final String organization; - private final String log; - - public String getOrganization() { - return organization; - } - - public String getLog() { - return log; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private OrganizationLogName(Builder builder) { - organization = Preconditions.checkNotNull(builder.getOrganization()); - log = Preconditions.checkNotNull(builder.getLog()); - } - - public static OrganizationLogName of(String organization, String log) { - return newBuilder().setOrganization(organization).setLog(log).build(); - } - - public static String format(String organization, String log) { - return newBuilder().setOrganization(organization).setLog(log).build().toString(); - } - - public static OrganizationLogName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "OrganizationLogName.parse: formattedString not in valid format"); - return of(matchMap.get("organization"), matchMap.get("log")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (OrganizationLogName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("organization", organization); - fieldMapBuilder.put("log", log); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("organization", organization, "log", log); - } - - /** Builder for OrganizationLogName. */ - public static class Builder { - - private String organization; - private String log; - - public String getOrganization() { - return organization; - } - - public String getLog() { - return log; - } - - public Builder setOrganization(String organization) { - this.organization = organization; - return this; - } - - public Builder setLog(String log) { - this.log = log; - return this; - } - - private Builder() {} - - private Builder(OrganizationLogName organizationLogName) { - organization = organizationLogName.organization; - log = organizationLogName.log; - } - - public OrganizationLogName build() { - return new OrganizationLogName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof OrganizationLogName) { - OrganizationLogName that = (OrganizationLogName) o; - return (this.organization.equals(that.organization)) && (this.log.equals(that.log)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= organization.hashCode(); - h *= 1000003; - h ^= log.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/OrganizationName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/OrganizationName.java deleted file mode 100644 index f723eac60..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/OrganizationName.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class OrganizationName extends ParentName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("organizations/{organization}"); - - private volatile Map fieldValuesMap; - - private final String organization; - - public String getOrganization() { - return organization; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private OrganizationName(Builder builder) { - organization = Preconditions.checkNotNull(builder.getOrganization()); - } - - public static OrganizationName of(String organization) { - return newBuilder().setOrganization(organization).build(); - } - - public static String format(String organization) { - return newBuilder().setOrganization(organization).build().toString(); - } - - public static OrganizationName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "OrganizationName.parse: formattedString not in valid format"); - return of(matchMap.get("organization")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (OrganizationName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("organization", organization); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("organization", organization); - } - - /** Builder for OrganizationName. */ - public static class Builder { - - private String organization; - - public String getOrganization() { - return organization; - } - - public Builder setOrganization(String organization) { - this.organization = organization; - return this; - } - - private Builder() {} - - private Builder(OrganizationName organizationName) { - organization = organizationName.organization; - } - - public OrganizationName build() { - return new OrganizationName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof OrganizationName) { - OrganizationName that = (OrganizationName) o; - return (this.organization.equals(that.organization)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= organization.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/OrganizationSinkName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/OrganizationSinkName.java deleted file mode 100644 index 2a08e1fe1..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/OrganizationSinkName.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class OrganizationSinkName extends SinkName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("organizations/{organization}/sinks/{sink}"); - - private volatile Map fieldValuesMap; - - private final String organization; - private final String sink; - - public String getOrganization() { - return organization; - } - - public String getSink() { - return sink; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private OrganizationSinkName(Builder builder) { - organization = Preconditions.checkNotNull(builder.getOrganization()); - sink = Preconditions.checkNotNull(builder.getSink()); - } - - public static OrganizationSinkName of(String organization, String sink) { - return newBuilder().setOrganization(organization).setSink(sink).build(); - } - - public static String format(String organization, String sink) { - return newBuilder().setOrganization(organization).setSink(sink).build().toString(); - } - - public static OrganizationSinkName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "OrganizationSinkName.parse: formattedString not in valid format"); - return of(matchMap.get("organization"), matchMap.get("sink")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (OrganizationSinkName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("organization", organization); - fieldMapBuilder.put("sink", sink); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("organization", organization, "sink", sink); - } - - /** Builder for OrganizationSinkName. */ - public static class Builder { - - private String organization; - private String sink; - - public String getOrganization() { - return organization; - } - - public String getSink() { - return sink; - } - - public Builder setOrganization(String organization) { - this.organization = organization; - return this; - } - - public Builder setSink(String sink) { - this.sink = sink; - return this; - } - - private Builder() {} - - private Builder(OrganizationSinkName organizationSinkName) { - organization = organizationSinkName.organization; - sink = organizationSinkName.sink; - } - - public OrganizationSinkName build() { - return new OrganizationSinkName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof OrganizationSinkName) { - OrganizationSinkName that = (OrganizationSinkName) o; - return (this.organization.equals(that.organization)) && (this.sink.equals(that.sink)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= organization.hashCode(); - h *= 1000003; - h ^= sink.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ParentName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ParentName.java deleted file mode 100644 index 6242a9b94..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ParentName.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.resourcenames.ResourceName; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public abstract class ParentName implements ResourceName { - protected ParentName() {} -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ParentNames.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ParentNames.java deleted file mode 100644 index b2da78c8e..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ParentNames.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class ParentNames { - private ParentNames() {} - - public static ParentName parse(String resourceNameString) { - if (ProjectName.isParsableFrom(resourceNameString)) { - return ProjectName.parse(resourceNameString); - } - if (OrganizationName.isParsableFrom(resourceNameString)) { - return OrganizationName.parse(resourceNameString); - } - if (FolderName.isParsableFrom(resourceNameString)) { - return FolderName.parse(resourceNameString); - } - if (BillingName.isParsableFrom(resourceNameString)) { - return BillingName.parse(resourceNameString); - } - return UntypedParentName.parse(resourceNameString); - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ProjectExclusionName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ProjectExclusionName.java deleted file mode 100644 index 0726550a8..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ProjectExclusionName.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class ProjectExclusionName extends ExclusionName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/exclusions/{exclusion}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String exclusion; - - public String getProject() { - return project; - } - - public String getExclusion() { - return exclusion; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private ProjectExclusionName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - exclusion = Preconditions.checkNotNull(builder.getExclusion()); - } - - public static ProjectExclusionName of(String project, String exclusion) { - return newBuilder().setProject(project).setExclusion(exclusion).build(); - } - - public static String format(String project, String exclusion) { - return newBuilder().setProject(project).setExclusion(exclusion).build().toString(); - } - - public static ProjectExclusionName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "ProjectExclusionName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("exclusion")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (ProjectExclusionName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("exclusion", exclusion); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "exclusion", exclusion); - } - - /** Builder for ProjectExclusionName. */ - public static class Builder { - - private String project; - private String exclusion; - - public String getProject() { - return project; - } - - public String getExclusion() { - return exclusion; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setExclusion(String exclusion) { - this.exclusion = exclusion; - return this; - } - - private Builder() {} - - private Builder(ProjectExclusionName projectExclusionName) { - project = projectExclusionName.project; - exclusion = projectExclusionName.exclusion; - } - - public ProjectExclusionName build() { - return new ProjectExclusionName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof ProjectExclusionName) { - ProjectExclusionName that = (ProjectExclusionName) o; - return (this.project.equals(that.project)) && (this.exclusion.equals(that.exclusion)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= exclusion.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ProjectLogName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ProjectLogName.java deleted file mode 100644 index e79374544..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ProjectLogName.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class ProjectLogName extends LogName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/logs/{log}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String log; - - public String getProject() { - return project; - } - - public String getLog() { - return log; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private ProjectLogName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - log = Preconditions.checkNotNull(builder.getLog()); - } - - public static ProjectLogName of(String project, String log) { - return newBuilder().setProject(project).setLog(log).build(); - } - - public static String format(String project, String log) { - return newBuilder().setProject(project).setLog(log).build().toString(); - } - - public static ProjectLogName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "ProjectLogName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("log")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (ProjectLogName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("log", log); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "log", log); - } - - /** Builder for ProjectLogName. */ - public static class Builder { - - private String project; - private String log; - - public String getProject() { - return project; - } - - public String getLog() { - return log; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLog(String log) { - this.log = log; - return this; - } - - private Builder() {} - - private Builder(ProjectLogName projectLogName) { - project = projectLogName.project; - log = projectLogName.log; - } - - public ProjectLogName build() { - return new ProjectLogName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof ProjectLogName) { - ProjectLogName that = (ProjectLogName) o; - return (this.project.equals(that.project)) && (this.log.equals(that.log)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= log.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ProjectMetricName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ProjectMetricName.java deleted file mode 100644 index 523c9b2b6..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ProjectMetricName.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class ProjectMetricName extends MetricName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/metrics/{metric}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String metric; - - public String getProject() { - return project; - } - - public String getMetric() { - return metric; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private ProjectMetricName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - metric = Preconditions.checkNotNull(builder.getMetric()); - } - - public static ProjectMetricName of(String project, String metric) { - return newBuilder().setProject(project).setMetric(metric).build(); - } - - public static String format(String project, String metric) { - return newBuilder().setProject(project).setMetric(metric).build().toString(); - } - - public static ProjectMetricName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "ProjectMetricName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("metric")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (ProjectMetricName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("metric", metric); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "metric", metric); - } - - /** Builder for ProjectMetricName. */ - public static class Builder { - - private String project; - private String metric; - - public String getProject() { - return project; - } - - public String getMetric() { - return metric; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setMetric(String metric) { - this.metric = metric; - return this; - } - - private Builder() {} - - private Builder(ProjectMetricName projectMetricName) { - project = projectMetricName.project; - metric = projectMetricName.metric; - } - - public ProjectMetricName build() { - return new ProjectMetricName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof ProjectMetricName) { - ProjectMetricName that = (ProjectMetricName) o; - return (this.project.equals(that.project)) && (this.metric.equals(that.metric)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= metric.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ProjectName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ProjectName.java deleted file mode 100644 index c673be5c7..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ProjectName.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class ProjectName extends ParentName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("projects/{project}"); - - private volatile Map fieldValuesMap; - - private final String project; - - public String getProject() { - return project; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private ProjectName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - } - - public static ProjectName of(String project) { - return newBuilder().setProject(project).build(); - } - - public static String format(String project) { - return newBuilder().setProject(project).build().toString(); - } - - public static ProjectName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "ProjectName.parse: formattedString not in valid format"); - return of(matchMap.get("project")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (ProjectName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project); - } - - /** Builder for ProjectName. */ - public static class Builder { - - private String project; - - public String getProject() { - return project; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - private Builder() {} - - private Builder(ProjectName projectName) { - project = projectName.project; - } - - public ProjectName build() { - return new ProjectName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof ProjectName) { - ProjectName that = (ProjectName) o; - return (this.project.equals(that.project)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ProjectSinkName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ProjectSinkName.java deleted file mode 100644 index 814cab165..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/ProjectSinkName.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class ProjectSinkName extends SinkName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/sinks/{sink}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String sink; - - public String getProject() { - return project; - } - - public String getSink() { - return sink; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private ProjectSinkName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - sink = Preconditions.checkNotNull(builder.getSink()); - } - - public static ProjectSinkName of(String project, String sink) { - return newBuilder().setProject(project).setSink(sink).build(); - } - - public static String format(String project, String sink) { - return newBuilder().setProject(project).setSink(sink).build().toString(); - } - - public static ProjectSinkName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "ProjectSinkName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("sink")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (ProjectSinkName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("sink", sink); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "sink", sink); - } - - /** Builder for ProjectSinkName. */ - public static class Builder { - - private String project; - private String sink; - - public String getProject() { - return project; - } - - public String getSink() { - return sink; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setSink(String sink) { - this.sink = sink; - return this; - } - - private Builder() {} - - private Builder(ProjectSinkName projectSinkName) { - project = projectSinkName.project; - sink = projectSinkName.sink; - } - - public ProjectSinkName build() { - return new ProjectSinkName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof ProjectSinkName) { - ProjectSinkName that = (ProjectSinkName) o; - return (this.project.equals(that.project)) && (this.sink.equals(that.sink)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= sink.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/SinkName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/SinkName.java deleted file mode 100644 index 16955d3b4..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/SinkName.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.resourcenames.ResourceName; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public abstract class SinkName implements ResourceName { - protected SinkName() {} -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/SinkNames.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/SinkNames.java deleted file mode 100644 index e1503079c..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/SinkNames.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class SinkNames { - private SinkNames() {} - - public static SinkName parse(String resourceNameString) { - if (ProjectSinkName.isParsableFrom(resourceNameString)) { - return ProjectSinkName.parse(resourceNameString); - } - if (OrganizationSinkName.isParsableFrom(resourceNameString)) { - return OrganizationSinkName.parse(resourceNameString); - } - if (FolderSinkName.isParsableFrom(resourceNameString)) { - return FolderSinkName.parse(resourceNameString); - } - if (BillingSinkName.isParsableFrom(resourceNameString)) { - return BillingSinkName.parse(resourceNameString); - } - return UntypedSinkName.parse(resourceNameString); - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/UntypedExclusionName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/UntypedExclusionName.java deleted file mode 100644 index 13a80c2da..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/UntypedExclusionName.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class UntypedExclusionName extends ExclusionName { - - private final String rawValue; - private Map valueMap; - - private UntypedExclusionName(String rawValue) { - this.rawValue = Preconditions.checkNotNull(rawValue); - this.valueMap = ImmutableMap.of("", rawValue); - } - - public static UntypedExclusionName from(ResourceName resourceName) { - return new UntypedExclusionName(resourceName.toString()); - } - - public static UntypedExclusionName parse(String formattedString) { - return new UntypedExclusionName(formattedString); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (UntypedExclusionName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return true; - } - - /** Return a map with a single value rawValue keyed on an empty String "". */ - public Map getFieldValuesMap() { - return valueMap; - } - - /** Return the initial rawValue if @param fieldName is an empty String, else return null. */ - public String getFieldValue(String fieldName) { - return valueMap.get(fieldName); - } - - @Override - public String toString() { - return rawValue; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof UntypedExclusionName) { - UntypedExclusionName that = (UntypedExclusionName) o; - return this.rawValue.equals(that.rawValue); - } - return false; - } - - @Override - public int hashCode() { - return rawValue.hashCode(); - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/UntypedLogName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/UntypedLogName.java deleted file mode 100644 index 7b2e3cd13..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/UntypedLogName.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class UntypedLogName extends LogName { - - private final String rawValue; - private Map valueMap; - - private UntypedLogName(String rawValue) { - this.rawValue = Preconditions.checkNotNull(rawValue); - this.valueMap = ImmutableMap.of("", rawValue); - } - - public static UntypedLogName from(ResourceName resourceName) { - return new UntypedLogName(resourceName.toString()); - } - - public static UntypedLogName parse(String formattedString) { - return new UntypedLogName(formattedString); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (UntypedLogName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return true; - } - - /** Return a map with a single value rawValue keyed on an empty String "". */ - public Map getFieldValuesMap() { - return valueMap; - } - - /** Return the initial rawValue if @param fieldName is an empty String, else return null. */ - public String getFieldValue(String fieldName) { - return valueMap.get(fieldName); - } - - @Override - public String toString() { - return rawValue; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof UntypedLogName) { - UntypedLogName that = (UntypedLogName) o; - return this.rawValue.equals(that.rawValue); - } - return false; - } - - @Override - public int hashCode() { - return rawValue.hashCode(); - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/UntypedMetricName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/UntypedMetricName.java deleted file mode 100644 index 824f7bb71..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/UntypedMetricName.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class UntypedMetricName extends MetricName { - - private final String rawValue; - private Map valueMap; - - private UntypedMetricName(String rawValue) { - this.rawValue = Preconditions.checkNotNull(rawValue); - this.valueMap = ImmutableMap.of("", rawValue); - } - - public static UntypedMetricName from(ResourceName resourceName) { - return new UntypedMetricName(resourceName.toString()); - } - - public static UntypedMetricName parse(String formattedString) { - return new UntypedMetricName(formattedString); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (UntypedMetricName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return true; - } - - /** Return a map with a single value rawValue keyed on an empty String "". */ - public Map getFieldValuesMap() { - return valueMap; - } - - /** Return the initial rawValue if @param fieldName is an empty String, else return null. */ - public String getFieldValue(String fieldName) { - return valueMap.get(fieldName); - } - - @Override - public String toString() { - return rawValue; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof UntypedMetricName) { - UntypedMetricName that = (UntypedMetricName) o; - return this.rawValue.equals(that.rawValue); - } - return false; - } - - @Override - public int hashCode() { - return rawValue.hashCode(); - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/UntypedParentName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/UntypedParentName.java deleted file mode 100644 index 84fb61ee0..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/UntypedParentName.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class UntypedParentName extends ParentName { - - private final String rawValue; - private Map valueMap; - - private UntypedParentName(String rawValue) { - this.rawValue = Preconditions.checkNotNull(rawValue); - this.valueMap = ImmutableMap.of("", rawValue); - } - - public static UntypedParentName from(ResourceName resourceName) { - return new UntypedParentName(resourceName.toString()); - } - - public static UntypedParentName parse(String formattedString) { - return new UntypedParentName(formattedString); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (UntypedParentName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return true; - } - - /** Return a map with a single value rawValue keyed on an empty String "". */ - public Map getFieldValuesMap() { - return valueMap; - } - - /** Return the initial rawValue if @param fieldName is an empty String, else return null. */ - public String getFieldValue(String fieldName) { - return valueMap.get(fieldName); - } - - @Override - public String toString() { - return rawValue; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof UntypedParentName) { - UntypedParentName that = (UntypedParentName) o; - return this.rawValue.equals(that.rawValue); - } - return false; - } - - @Override - public int hashCode() { - return rawValue.hashCode(); - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/UntypedSinkName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/UntypedSinkName.java deleted file mode 100644 index cf282da7a..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/type/UntypedSinkName.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.type; - -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class UntypedSinkName extends SinkName { - - private final String rawValue; - private Map valueMap; - - private UntypedSinkName(String rawValue) { - this.rawValue = Preconditions.checkNotNull(rawValue); - this.valueMap = ImmutableMap.of("", rawValue); - } - - public static UntypedSinkName from(ResourceName resourceName) { - return new UntypedSinkName(resourceName.toString()); - } - - public static UntypedSinkName parse(String formattedString) { - return new UntypedSinkName(formattedString); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (UntypedSinkName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return true; - } - - /** Return a map with a single value rawValue keyed on an empty String "". */ - public Map getFieldValuesMap() { - return valueMap; - } - - /** Return the initial rawValue if @param fieldName is an empty String, else return null. */ - public String getFieldValue(String fieldName) { - return valueMap.get(fieldName); - } - - @Override - public String toString() { - return rawValue; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof UntypedSinkName) { - UntypedSinkName that = (UntypedSinkName) o; - return this.rawValue.equals(that.rawValue); - } - return false; - } - - @Override - public int hashCode() { - return rawValue.hashCode(); - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BigQueryOptions.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BigQueryOptions.java index 15eefcc8c..03876200c 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BigQueryOptions.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BigQueryOptions.java @@ -119,18 +119,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Optional. Whether to use [BigQuery's partition
-   * tables](/bigquery/docs/partitioned-tables). By default, Logging
+   * tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By default, Logging
    * creates dated tables based on the log entries' timestamps, e.g.
    * syslog_20170523. With partitioned tables the date suffix is no longer
    * present and [special query
-   * syntax](/bigquery/docs/querying-partitioned-tables) has to be used instead.
+   * syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) has to be used instead.
    * In both cases, tables are sharded based on UTC timezone.
    * 
* - * bool use_partitioned_tables = 1; + * bool use_partitioned_tables = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The usePartitionedTables. */ + @java.lang.Override public boolean getUsePartitionedTables() { return usePartitionedTables_; } @@ -154,6 +155,7 @@ public boolean getUsePartitionedTables() { * * @return The usesTimestampColumnPartitioning. */ + @java.lang.Override public boolean getUsesTimestampColumnPartitioning() { return usesTimestampColumnPartitioning_; } @@ -497,18 +499,19 @@ public Builder mergeFrom( * *
      * Optional. Whether to use [BigQuery's partition
-     * tables](/bigquery/docs/partitioned-tables). By default, Logging
+     * tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By default, Logging
      * creates dated tables based on the log entries' timestamps, e.g.
      * syslog_20170523. With partitioned tables the date suffix is no longer
      * present and [special query
-     * syntax](/bigquery/docs/querying-partitioned-tables) has to be used instead.
+     * syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) has to be used instead.
      * In both cases, tables are sharded based on UTC timezone.
      * 
* - * bool use_partitioned_tables = 1; + * bool use_partitioned_tables = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The usePartitionedTables. */ + @java.lang.Override public boolean getUsePartitionedTables() { return usePartitionedTables_; } @@ -517,15 +520,15 @@ public boolean getUsePartitionedTables() { * *
      * Optional. Whether to use [BigQuery's partition
-     * tables](/bigquery/docs/partitioned-tables). By default, Logging
+     * tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By default, Logging
      * creates dated tables based on the log entries' timestamps, e.g.
      * syslog_20170523. With partitioned tables the date suffix is no longer
      * present and [special query
-     * syntax](/bigquery/docs/querying-partitioned-tables) has to be used instead.
+     * syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) has to be used instead.
      * In both cases, tables are sharded based on UTC timezone.
      * 
* - * bool use_partitioned_tables = 1; + * bool use_partitioned_tables = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The usePartitionedTables to set. * @return This builder for chaining. @@ -541,15 +544,15 @@ public Builder setUsePartitionedTables(boolean value) { * *
      * Optional. Whether to use [BigQuery's partition
-     * tables](/bigquery/docs/partitioned-tables). By default, Logging
+     * tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By default, Logging
      * creates dated tables based on the log entries' timestamps, e.g.
      * syslog_20170523. With partitioned tables the date suffix is no longer
      * present and [special query
-     * syntax](/bigquery/docs/querying-partitioned-tables) has to be used instead.
+     * syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) has to be used instead.
      * In both cases, tables are sharded based on UTC timezone.
      * 
* - * bool use_partitioned_tables = 1; + * bool use_partitioned_tables = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -579,6 +582,7 @@ public Builder clearUsePartitionedTables() { * * @return The usesTimestampColumnPartitioning. */ + @java.lang.Override public boolean getUsesTimestampColumnPartitioning() { return usesTimestampColumnPartitioning_; } diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BigQueryOptionsOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BigQueryOptionsOrBuilder.java index 6dc10ffb4..c0dd4e936 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BigQueryOptionsOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BigQueryOptionsOrBuilder.java @@ -28,15 +28,15 @@ public interface BigQueryOptionsOrBuilder * *
    * Optional. Whether to use [BigQuery's partition
-   * tables](/bigquery/docs/partitioned-tables). By default, Logging
+   * tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By default, Logging
    * creates dated tables based on the log entries' timestamps, e.g.
    * syslog_20170523. With partitioned tables the date suffix is no longer
    * present and [special query
-   * syntax](/bigquery/docs/querying-partitioned-tables) has to be used instead.
+   * syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) has to be used instead.
    * In both cases, tables are sharded based on UTC timezone.
    * 
* - * bool use_partitioned_tables = 1; + * bool use_partitioned_tables = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The usePartitionedTables. */ diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingExclusionName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingAccountLocationName.java similarity index 61% rename from proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingExclusionName.java rename to proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingAccountLocationName.java index 1cd03dfff..3782c1e80 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingExclusionName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingAccountLocationName.java @@ -17,6 +17,7 @@ package com.google.logging.v2; import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; import java.util.ArrayList; @@ -25,23 +26,23 @@ /** AUTO-GENERATED DOCUMENTATION AND CLASS */ @javax.annotation.Generated("by GAPIC protoc plugin") -public class BillingExclusionName extends ExclusionName { +public class BillingAccountLocationName implements ResourceName { private static final PathTemplate PATH_TEMPLATE = PathTemplate.createWithoutUrlEncoding( - "billingAccounts/{billing_account}/exclusions/{exclusion}"); + "billingAccounts/{billing_account}/locations/{location}"); private volatile Map fieldValuesMap; private final String billingAccount; - private final String exclusion; + private final String location; public String getBillingAccount() { return billingAccount; } - public String getExclusion() { - return exclusion; + public String getLocation() { + return location; } public static Builder newBuilder() { @@ -52,44 +53,41 @@ public Builder toBuilder() { return new Builder(this); } - private BillingExclusionName(Builder builder) { + private BillingAccountLocationName(Builder builder) { billingAccount = Preconditions.checkNotNull(builder.getBillingAccount()); - exclusion = Preconditions.checkNotNull(builder.getExclusion()); + location = Preconditions.checkNotNull(builder.getLocation()); } - public static BillingExclusionName of(String billingAccount, String exclusion) { - return newBuilder().setBillingAccount(billingAccount).setExclusion(exclusion).build(); + public static BillingAccountLocationName of(String billingAccount, String location) { + return newBuilder().setBillingAccount(billingAccount).setLocation(location).build(); } - public static String format(String billingAccount, String exclusion) { - return newBuilder() - .setBillingAccount(billingAccount) - .setExclusion(exclusion) - .build() - .toString(); + public static String format(String billingAccount, String location) { + return newBuilder().setBillingAccount(billingAccount).setLocation(location).build().toString(); } - public static BillingExclusionName parse(String formattedString) { + public static BillingAccountLocationName parse(String formattedString) { if (formattedString.isEmpty()) { return null; } Map matchMap = PATH_TEMPLATE.validatedMatch( - formattedString, "BillingExclusionName.parse: formattedString not in valid format"); - return of(matchMap.get("billing_account"), matchMap.get("exclusion")); + formattedString, + "BillingAccountLocationName.parse: formattedString not in valid format"); + return of(matchMap.get("billing_account"), matchMap.get("location")); } - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); for (String formattedString : formattedStrings) { list.add(parse(formattedString)); } return list; } - public static List toStringList(List values) { + public static List toStringList(List values) { List list = new ArrayList(values.size()); - for (BillingExclusionName value : values) { + for (BillingAccountLocationName value : values) { if (value == null) { list.add(""); } else { @@ -109,7 +107,7 @@ public Map getFieldValuesMap() { if (fieldValuesMap == null) { ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); fieldMapBuilder.put("billingAccount", billingAccount); - fieldMapBuilder.put("exclusion", exclusion); + fieldMapBuilder.put("location", location); fieldValuesMap = fieldMapBuilder.build(); } } @@ -123,21 +121,21 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate("billing_account", billingAccount, "exclusion", exclusion); + return PATH_TEMPLATE.instantiate("billing_account", billingAccount, "location", location); } - /** Builder for BillingExclusionName. */ + /** Builder for BillingAccountLocationName. */ public static class Builder { private String billingAccount; - private String exclusion; + private String location; public String getBillingAccount() { return billingAccount; } - public String getExclusion() { - return exclusion; + public String getLocation() { + return location; } public Builder setBillingAccount(String billingAccount) { @@ -145,20 +143,20 @@ public Builder setBillingAccount(String billingAccount) { return this; } - public Builder setExclusion(String exclusion) { - this.exclusion = exclusion; + public Builder setLocation(String location) { + this.location = location; return this; } private Builder() {} - private Builder(BillingExclusionName billingExclusionName) { - billingAccount = billingExclusionName.billingAccount; - exclusion = billingExclusionName.exclusion; + private Builder(BillingAccountLocationName billingAccountLocationName) { + billingAccount = billingAccountLocationName.billingAccount; + location = billingAccountLocationName.location; } - public BillingExclusionName build() { - return new BillingExclusionName(this); + public BillingAccountLocationName build() { + return new BillingAccountLocationName(this); } } @@ -167,10 +165,10 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o instanceof BillingExclusionName) { - BillingExclusionName that = (BillingExclusionName) o; + if (o instanceof BillingAccountLocationName) { + BillingAccountLocationName that = (BillingAccountLocationName) o; return (this.billingAccount.equals(that.billingAccount)) - && (this.exclusion.equals(that.exclusion)); + && (this.location.equals(that.location)); } return false; } @@ -181,7 +179,7 @@ public int hashCode() { h *= 1000003; h ^= billingAccount.hashCode(); h *= 1000003; - h ^= exclusion.hashCode(); + h ^= location.hashCode(); return h; } } diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingAccountName.java similarity index 77% rename from proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingName.java rename to proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingAccountName.java index 350cd885b..f2432babc 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingAccountName.java @@ -17,6 +17,7 @@ package com.google.logging.v2; import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; import java.util.ArrayList; @@ -25,7 +26,7 @@ /** AUTO-GENERATED DOCUMENTATION AND CLASS */ @javax.annotation.Generated("by GAPIC protoc plugin") -public class BillingName extends ParentName { +public class BillingAccountName implements ResourceName { private static final PathTemplate PATH_TEMPLATE = PathTemplate.createWithoutUrlEncoding("billingAccounts/{billing_account}"); @@ -46,11 +47,11 @@ public Builder toBuilder() { return new Builder(this); } - private BillingName(Builder builder) { + private BillingAccountName(Builder builder) { billingAccount = Preconditions.checkNotNull(builder.getBillingAccount()); } - public static BillingName of(String billingAccount) { + public static BillingAccountName of(String billingAccount) { return newBuilder().setBillingAccount(billingAccount).build(); } @@ -58,27 +59,27 @@ public static String format(String billingAccount) { return newBuilder().setBillingAccount(billingAccount).build().toString(); } - public static BillingName parse(String formattedString) { + public static BillingAccountName parse(String formattedString) { if (formattedString.isEmpty()) { return null; } Map matchMap = PATH_TEMPLATE.validatedMatch( - formattedString, "BillingName.parse: formattedString not in valid format"); + formattedString, "BillingAccountName.parse: formattedString not in valid format"); return of(matchMap.get("billing_account")); } - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); for (String formattedString : formattedStrings) { list.add(parse(formattedString)); } return list; } - public static List toStringList(List values) { + public static List toStringList(List values) { List list = new ArrayList(values.size()); - for (BillingName value : values) { + for (BillingAccountName value : values) { if (value == null) { list.add(""); } else { @@ -114,7 +115,7 @@ public String toString() { return PATH_TEMPLATE.instantiate("billing_account", billingAccount); } - /** Builder for BillingName. */ + /** Builder for BillingAccountName. */ public static class Builder { private String billingAccount; @@ -130,12 +131,12 @@ public Builder setBillingAccount(String billingAccount) { private Builder() {} - private Builder(BillingName billingName) { - billingAccount = billingName.billingAccount; + private Builder(BillingAccountName billingAccountName) { + billingAccount = billingAccountName.billingAccount; } - public BillingName build() { - return new BillingName(this); + public BillingAccountName build() { + return new BillingAccountName(this); } } @@ -144,8 +145,8 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o instanceof BillingName) { - BillingName that = (BillingName) o; + if (o instanceof BillingAccountName) { + BillingAccountName that = (BillingAccountName) o; return (this.billingAccount.equals(that.billingAccount)); } return false; diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingLogName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingLogName.java deleted file mode 100644 index 5aadfd503..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingLogName.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.v2; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class BillingLogName extends LogName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("billingAccounts/{billing_account}/logs/{log}"); - - private volatile Map fieldValuesMap; - - private final String billingAccount; - private final String log; - - public String getBillingAccount() { - return billingAccount; - } - - public String getLog() { - return log; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private BillingLogName(Builder builder) { - billingAccount = Preconditions.checkNotNull(builder.getBillingAccount()); - log = Preconditions.checkNotNull(builder.getLog()); - } - - public static BillingLogName of(String billingAccount, String log) { - return newBuilder().setBillingAccount(billingAccount).setLog(log).build(); - } - - public static String format(String billingAccount, String log) { - return newBuilder().setBillingAccount(billingAccount).setLog(log).build().toString(); - } - - public static BillingLogName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "BillingLogName.parse: formattedString not in valid format"); - return of(matchMap.get("billing_account"), matchMap.get("log")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (BillingLogName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("billingAccount", billingAccount); - fieldMapBuilder.put("log", log); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("billing_account", billingAccount, "log", log); - } - - /** Builder for BillingLogName. */ - public static class Builder { - - private String billingAccount; - private String log; - - public String getBillingAccount() { - return billingAccount; - } - - public String getLog() { - return log; - } - - public Builder setBillingAccount(String billingAccount) { - this.billingAccount = billingAccount; - return this; - } - - public Builder setLog(String log) { - this.log = log; - return this; - } - - private Builder() {} - - private Builder(BillingLogName billingLogName) { - billingAccount = billingLogName.billingAccount; - log = billingLogName.log; - } - - public BillingLogName build() { - return new BillingLogName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof BillingLogName) { - BillingLogName that = (BillingLogName) o; - return (this.billingAccount.equals(that.billingAccount)) && (this.log.equals(that.log)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= billingAccount.hashCode(); - h *= 1000003; - h ^= log.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingSinkName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingSinkName.java deleted file mode 100644 index 6f6b4fbea..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/BillingSinkName.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.v2; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class BillingSinkName extends SinkName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("billingAccounts/{billing_account}/sinks/{sink}"); - - private volatile Map fieldValuesMap; - - private final String billingAccount; - private final String sink; - - public String getBillingAccount() { - return billingAccount; - } - - public String getSink() { - return sink; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private BillingSinkName(Builder builder) { - billingAccount = Preconditions.checkNotNull(builder.getBillingAccount()); - sink = Preconditions.checkNotNull(builder.getSink()); - } - - public static BillingSinkName of(String billingAccount, String sink) { - return newBuilder().setBillingAccount(billingAccount).setSink(sink).build(); - } - - public static String format(String billingAccount, String sink) { - return newBuilder().setBillingAccount(billingAccount).setSink(sink).build().toString(); - } - - public static BillingSinkName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "BillingSinkName.parse: formattedString not in valid format"); - return of(matchMap.get("billing_account"), matchMap.get("sink")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (BillingSinkName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("billingAccount", billingAccount); - fieldMapBuilder.put("sink", sink); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("billing_account", billingAccount, "sink", sink); - } - - /** Builder for BillingSinkName. */ - public static class Builder { - - private String billingAccount; - private String sink; - - public String getBillingAccount() { - return billingAccount; - } - - public String getSink() { - return sink; - } - - public Builder setBillingAccount(String billingAccount) { - this.billingAccount = billingAccount; - return this; - } - - public Builder setSink(String sink) { - this.sink = sink; - return this; - } - - private Builder() {} - - private Builder(BillingSinkName billingSinkName) { - billingAccount = billingSinkName.billingAccount; - sink = billingSinkName.sink; - } - - public BillingSinkName build() { - return new BillingSinkName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof BillingSinkName) { - BillingSinkName that = (BillingSinkName) o; - return (this.billingAccount.equals(that.billingAccount)) && (this.sink.equals(that.sink)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= billingAccount.hashCode(); - h *= 1000003; - h ^= sink.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettings.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettings.java index 846faf270..0de1cc363 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettings.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettings.java @@ -27,7 +27,7 @@ * Note: CMEK for the Logs Router can currently only be configured for GCP * organizations. Once configured, it applies to all projects and folders in the * GCP organization. - * See [Enabling CMEK for Logs Router](/logging/docs/routing/managed-encryption) + * See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption) * for more information. *
* @@ -139,13 +139,14 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Output Only. The resource name of the CMEK settings.
+   * Output only. The resource name of the CMEK settings.
    * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -161,13 +162,14 @@ public java.lang.String getName() { * * *
-   * Output Only. The resource name of the CMEK settings.
+   * Output only. The resource name of the CMEK settings.
    * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -201,13 +203,14 @@ public com.google.protobuf.ByteString getNameBytes() { * time of encryption unless access to that key has been revoked. * To disable CMEK for the Logs Router, set this field to an empty string. * See [Enabling CMEK for Logs - * Router](/logging/docs/routing/managed-encryption) for more information. + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. *
* * string kms_key_name = 2; * * @return The kmsKeyName. */ + @java.lang.Override public java.lang.String getKmsKeyName() { java.lang.Object ref = kmsKeyName_; if (ref instanceof java.lang.String) { @@ -238,13 +241,14 @@ public java.lang.String getKmsKeyName() { * time of encryption unless access to that key has been revoked. * To disable CMEK for the Logs Router, set this field to an empty string. * See [Enabling CMEK for Logs - * Router](/logging/docs/routing/managed-encryption) for more information. + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. *
* * string kms_key_name = 2; * * @return The bytes for kmsKeyName. */ + @java.lang.Override public com.google.protobuf.ByteString getKmsKeyNameBytes() { java.lang.Object ref = kmsKeyName_; if (ref instanceof java.lang.String) { @@ -263,21 +267,22 @@ public com.google.protobuf.ByteString getKmsKeyNameBytes() { * * *
-   * Output Only. The service account that will be used by the Logs Router to
-   * access your Cloud KMS key.
+   * Output only. The service account that will be used by the Logs Router to access your
+   * Cloud KMS key.
    * Before enabling CMEK for Logs Router, you must first assign the role
    * `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that
    * the Logs Router will use to access your Cloud KMS key. Use
    * [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to
    * obtain the service account ID.
    * See [Enabling CMEK for Logs
-   * Router](/logging/docs/routing/managed-encryption) for more information.
+   * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
    * 
* - * string service_account_id = 3; + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The serviceAccountId. */ + @java.lang.Override public java.lang.String getServiceAccountId() { java.lang.Object ref = serviceAccountId_; if (ref instanceof java.lang.String) { @@ -293,21 +298,22 @@ public java.lang.String getServiceAccountId() { * * *
-   * Output Only. The service account that will be used by the Logs Router to
-   * access your Cloud KMS key.
+   * Output only. The service account that will be used by the Logs Router to access your
+   * Cloud KMS key.
    * Before enabling CMEK for Logs Router, you must first assign the role
    * `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that
    * the Logs Router will use to access your Cloud KMS key. Use
    * [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to
    * obtain the service account ID.
    * See [Enabling CMEK for Logs
-   * Router](/logging/docs/routing/managed-encryption) for more information.
+   * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
    * 
* - * string service_account_id = 3; + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for serviceAccountId. */ + @java.lang.Override public com.google.protobuf.ByteString getServiceAccountIdBytes() { java.lang.Object ref = serviceAccountId_; if (ref instanceof java.lang.String) { @@ -504,7 +510,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * Note: CMEK for the Logs Router can currently only be configured for GCP * organizations. Once configured, it applies to all projects and folders in the * GCP organization. - * See [Enabling CMEK for Logs Router](/logging/docs/routing/managed-encryption) + * See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption) * for more information. *
* @@ -676,10 +682,10 @@ public Builder mergeFrom( * * *
-     * Output Only. The resource name of the CMEK settings.
+     * Output only. The resource name of the CMEK settings.
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The name. */ @@ -698,10 +704,10 @@ public java.lang.String getName() { * * *
-     * Output Only. The resource name of the CMEK settings.
+     * Output only. The resource name of the CMEK settings.
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for name. */ @@ -720,10 +726,10 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Output Only. The resource name of the CMEK settings.
+     * Output only. The resource name of the CMEK settings.
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The name to set. * @return This builder for chaining. @@ -741,10 +747,10 @@ public Builder setName(java.lang.String value) { * * *
-     * Output Only. The resource name of the CMEK settings.
+     * Output only. The resource name of the CMEK settings.
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ @@ -758,10 +764,10 @@ public Builder clearName() { * * *
-     * Output Only. The resource name of the CMEK settings.
+     * Output only. The resource name of the CMEK settings.
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The bytes for name to set. * @return This builder for chaining. @@ -797,7 +803,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * time of encryption unless access to that key has been revoked. * To disable CMEK for the Logs Router, set this field to an empty string. * See [Enabling CMEK for Logs - * Router](/logging/docs/routing/managed-encryption) for more information. + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. *
* * string kms_key_name = 2; @@ -834,7 +840,7 @@ public java.lang.String getKmsKeyName() { * time of encryption unless access to that key has been revoked. * To disable CMEK for the Logs Router, set this field to an empty string. * See [Enabling CMEK for Logs - * Router](/logging/docs/routing/managed-encryption) for more information. + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. *
* * string kms_key_name = 2; @@ -871,7 +877,7 @@ public com.google.protobuf.ByteString getKmsKeyNameBytes() { * time of encryption unless access to that key has been revoked. * To disable CMEK for the Logs Router, set this field to an empty string. * See [Enabling CMEK for Logs - * Router](/logging/docs/routing/managed-encryption) for more information. + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. *
* * string kms_key_name = 2; @@ -907,7 +913,7 @@ public Builder setKmsKeyName(java.lang.String value) { * time of encryption unless access to that key has been revoked. * To disable CMEK for the Logs Router, set this field to an empty string. * See [Enabling CMEK for Logs - * Router](/logging/docs/routing/managed-encryption) for more information. + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. *
* * string kms_key_name = 2; @@ -939,7 +945,7 @@ public Builder clearKmsKeyName() { * time of encryption unless access to that key has been revoked. * To disable CMEK for the Logs Router, set this field to an empty string. * See [Enabling CMEK for Logs - * Router](/logging/docs/routing/managed-encryption) for more information. + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. *
* * string kms_key_name = 2; @@ -963,18 +969,18 @@ public Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value) { * * *
-     * Output Only. The service account that will be used by the Logs Router to
-     * access your Cloud KMS key.
+     * Output only. The service account that will be used by the Logs Router to access your
+     * Cloud KMS key.
      * Before enabling CMEK for Logs Router, you must first assign the role
      * `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that
      * the Logs Router will use to access your Cloud KMS key. Use
      * [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to
      * obtain the service account ID.
      * See [Enabling CMEK for Logs
-     * Router](/logging/docs/routing/managed-encryption) for more information.
+     * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
      * 
* - * string service_account_id = 3; + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The serviceAccountId. */ @@ -993,18 +999,18 @@ public java.lang.String getServiceAccountId() { * * *
-     * Output Only. The service account that will be used by the Logs Router to
-     * access your Cloud KMS key.
+     * Output only. The service account that will be used by the Logs Router to access your
+     * Cloud KMS key.
      * Before enabling CMEK for Logs Router, you must first assign the role
      * `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that
      * the Logs Router will use to access your Cloud KMS key. Use
      * [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to
      * obtain the service account ID.
      * See [Enabling CMEK for Logs
-     * Router](/logging/docs/routing/managed-encryption) for more information.
+     * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
      * 
* - * string service_account_id = 3; + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for serviceAccountId. */ @@ -1023,18 +1029,18 @@ public com.google.protobuf.ByteString getServiceAccountIdBytes() { * * *
-     * Output Only. The service account that will be used by the Logs Router to
-     * access your Cloud KMS key.
+     * Output only. The service account that will be used by the Logs Router to access your
+     * Cloud KMS key.
      * Before enabling CMEK for Logs Router, you must first assign the role
      * `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that
      * the Logs Router will use to access your Cloud KMS key. Use
      * [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to
      * obtain the service account ID.
      * See [Enabling CMEK for Logs
-     * Router](/logging/docs/routing/managed-encryption) for more information.
+     * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
      * 
* - * string service_account_id = 3; + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The serviceAccountId to set. * @return This builder for chaining. @@ -1052,18 +1058,18 @@ public Builder setServiceAccountId(java.lang.String value) { * * *
-     * Output Only. The service account that will be used by the Logs Router to
-     * access your Cloud KMS key.
+     * Output only. The service account that will be used by the Logs Router to access your
+     * Cloud KMS key.
      * Before enabling CMEK for Logs Router, you must first assign the role
      * `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that
      * the Logs Router will use to access your Cloud KMS key. Use
      * [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to
      * obtain the service account ID.
      * See [Enabling CMEK for Logs
-     * Router](/logging/docs/routing/managed-encryption) for more information.
+     * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
      * 
* - * string service_account_id = 3; + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ @@ -1077,18 +1083,18 @@ public Builder clearServiceAccountId() { * * *
-     * Output Only. The service account that will be used by the Logs Router to
-     * access your Cloud KMS key.
+     * Output only. The service account that will be used by the Logs Router to access your
+     * Cloud KMS key.
      * Before enabling CMEK for Logs Router, you must first assign the role
      * `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that
      * the Logs Router will use to access your Cloud KMS key. Use
      * [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to
      * obtain the service account ID.
      * See [Enabling CMEK for Logs
-     * Router](/logging/docs/routing/managed-encryption) for more information.
+     * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
      * 
* - * string service_account_id = 3; + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The bytes for serviceAccountId to set. * @return This builder for chaining. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettingsName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettingsName.java new file mode 100644 index 000000000..15abd2ce3 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettingsName.java @@ -0,0 +1,378 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.logging.v2; + +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class CmekSettingsName implements ResourceName { + + @Deprecated + protected CmekSettingsName() {} + + private static final PathTemplate PROJECT_CMEK_SETTINGS_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/cmekSettings"); + private static final PathTemplate ORGANIZATION_CMEK_SETTINGS_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("organizations/{organization}/cmekSettings"); + private static final PathTemplate FOLDER_CMEK_SETTINGS_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("folders/{folder}/cmekSettings"); + private static final PathTemplate BILLING_ACCOUNT_CMEK_SETTINGS_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("billingAccounts/{billing_account}/cmekSettings"); + + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + + private String project; + private String organization; + private String folder; + private String billingAccount; + + public String getProject() { + return project; + } + + public String getOrganization() { + return organization; + } + + public String getFolder() { + return folder; + } + + public String getBillingAccount() { + return billingAccount; + } + + private CmekSettingsName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + pathTemplate = PROJECT_CMEK_SETTINGS_PATH_TEMPLATE; + } + + private CmekSettingsName(OrganizationCmekSettingsBuilder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + pathTemplate = ORGANIZATION_CMEK_SETTINGS_PATH_TEMPLATE; + } + + private CmekSettingsName(FolderCmekSettingsBuilder builder) { + folder = Preconditions.checkNotNull(builder.getFolder()); + pathTemplate = FOLDER_CMEK_SETTINGS_PATH_TEMPLATE; + } + + private CmekSettingsName(BillingAccountCmekSettingsBuilder builder) { + billingAccount = Preconditions.checkNotNull(builder.getBillingAccount()); + pathTemplate = BILLING_ACCOUNT_CMEK_SETTINGS_PATH_TEMPLATE; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectCmekSettingsBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static OrganizationCmekSettingsBuilder newOrganizationCmekSettingsBuilder() { + return new OrganizationCmekSettingsBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static FolderCmekSettingsBuilder newFolderCmekSettingsBuilder() { + return new FolderCmekSettingsBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static BillingAccountCmekSettingsBuilder newBillingAccountCmekSettingsBuilder() { + return new BillingAccountCmekSettingsBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static CmekSettingsName of(String project) { + return newProjectCmekSettingsBuilder().setProject(project).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static CmekSettingsName ofProjectCmekSettingsName(String project) { + return newProjectCmekSettingsBuilder().setProject(project).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static CmekSettingsName ofOrganizationCmekSettingsName(String organization) { + return newOrganizationCmekSettingsBuilder().setOrganization(organization).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static CmekSettingsName ofFolderCmekSettingsName(String folder) { + return newFolderCmekSettingsBuilder().setFolder(folder).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static CmekSettingsName ofBillingAccountCmekSettingsName(String billingAccount) { + return newBillingAccountCmekSettingsBuilder().setBillingAccount(billingAccount).build(); + } + + public static String format(String project) { + return newBuilder().setProject(project).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectCmekSettingsName(String project) { + return newBuilder().setProject(project).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatOrganizationCmekSettingsName(String organization) { + return newOrganizationCmekSettingsBuilder().setOrganization(organization).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatFolderCmekSettingsName(String folder) { + return newFolderCmekSettingsBuilder().setFolder(folder).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatBillingAccountCmekSettingsName(String billingAccount) { + return newBillingAccountCmekSettingsBuilder() + .setBillingAccount(billingAccount) + .build() + .toString(); + } + + public static CmekSettingsName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT_CMEK_SETTINGS_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = PROJECT_CMEK_SETTINGS_PATH_TEMPLATE.match(formattedString); + return ofProjectCmekSettingsName(matchMap.get("project")); + } else if (ORGANIZATION_CMEK_SETTINGS_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = + ORGANIZATION_CMEK_SETTINGS_PATH_TEMPLATE.match(formattedString); + return ofOrganizationCmekSettingsName(matchMap.get("organization")); + } else if (FOLDER_CMEK_SETTINGS_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = FOLDER_CMEK_SETTINGS_PATH_TEMPLATE.match(formattedString); + return ofFolderCmekSettingsName(matchMap.get("folder")); + } else if (BILLING_ACCOUNT_CMEK_SETTINGS_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = + BILLING_ACCOUNT_CMEK_SETTINGS_PATH_TEMPLATE.match(formattedString); + return ofBillingAccountCmekSettingsName(matchMap.get("billing_account")); + } + throw new ValidationException("JobName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (CmekSettingsName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_CMEK_SETTINGS_PATH_TEMPLATE.matches(formattedString) + || ORGANIZATION_CMEK_SETTINGS_PATH_TEMPLATE.matches(formattedString) + || FOLDER_CMEK_SETTINGS_PATH_TEMPLATE.matches(formattedString) + || BILLING_ACCOUNT_CMEK_SETTINGS_PATH_TEMPLATE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + if (folder != null) { + fieldMapBuilder.put("folder", folder); + } + if (billingAccount != null) { + fieldMapBuilder.put("billing_account", billingAccount); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + /** Builder for projects/{project}/cmekSettings. */ + public static class Builder { + + private String project; + + protected Builder() {} + + public String getProject() { + return project; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + private Builder(CmekSettingsName cmekSettingsName) { + Preconditions.checkArgument( + cmekSettingsName.pathTemplate == PROJECT_CMEK_SETTINGS_PATH_TEMPLATE, + "toBuilder is only supported when CmekSettingsName has the pattern of " + + "projects/{project}/cmekSettings."); + project = cmekSettingsName.project; + } + + public CmekSettingsName build() { + return new CmekSettingsName(this); + } + } + + /** Builder for organizations/{organization}/cmekSettings. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class OrganizationCmekSettingsBuilder { + + private String organization; + + private OrganizationCmekSettingsBuilder() {} + + public String getOrganization() { + return organization; + } + + public OrganizationCmekSettingsBuilder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public CmekSettingsName build() { + return new CmekSettingsName(this); + } + } + + /** Builder for folders/{folder}/cmekSettings. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class FolderCmekSettingsBuilder { + + private String folder; + + private FolderCmekSettingsBuilder() {} + + public String getFolder() { + return folder; + } + + public FolderCmekSettingsBuilder setFolder(String folder) { + this.folder = folder; + return this; + } + + public CmekSettingsName build() { + return new CmekSettingsName(this); + } + } + + /** Builder for billingAccounts/{billing_account}/cmekSettings. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class BillingAccountCmekSettingsBuilder { + + private String billingAccount; + + private BillingAccountCmekSettingsBuilder() {} + + public String getBillingAccount() { + return billingAccount; + } + + public BillingAccountCmekSettingsBuilder setBillingAccount(String billingAccount) { + this.billingAccount = billingAccount; + return this; + } + + public CmekSettingsName build() { + return new CmekSettingsName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + CmekSettingsName that = (CmekSettingsName) o; + return (Objects.equals(this.project, that.project)) + && (Objects.equals(this.organization, that.organization)) + && (Objects.equals(this.folder, that.folder)) + && (Objects.equals(this.billingAccount, that.billingAccount)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(organization); + h *= 1000003; + h ^= Objects.hashCode(folder); + h *= 1000003; + h ^= Objects.hashCode(billingAccount); + return h; + } +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettingsOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettingsOrBuilder.java index 799066402..201b6a1c0 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettingsOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettingsOrBuilder.java @@ -27,10 +27,10 @@ public interface CmekSettingsOrBuilder * * *
-   * Output Only. The resource name of the CMEK settings.
+   * Output only. The resource name of the CMEK settings.
    * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The name. */ @@ -39,10 +39,10 @@ public interface CmekSettingsOrBuilder * * *
-   * Output Only. The resource name of the CMEK settings.
+   * Output only. The resource name of the CMEK settings.
    * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for name. */ @@ -67,7 +67,7 @@ public interface CmekSettingsOrBuilder * time of encryption unless access to that key has been revoked. * To disable CMEK for the Logs Router, set this field to an empty string. * See [Enabling CMEK for Logs - * Router](/logging/docs/routing/managed-encryption) for more information. + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. *
* * string kms_key_name = 2; @@ -94,7 +94,7 @@ public interface CmekSettingsOrBuilder * time of encryption unless access to that key has been revoked. * To disable CMEK for the Logs Router, set this field to an empty string. * See [Enabling CMEK for Logs - * Router](/logging/docs/routing/managed-encryption) for more information. + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. *
* * string kms_key_name = 2; @@ -107,18 +107,18 @@ public interface CmekSettingsOrBuilder * * *
-   * Output Only. The service account that will be used by the Logs Router to
-   * access your Cloud KMS key.
+   * Output only. The service account that will be used by the Logs Router to access your
+   * Cloud KMS key.
    * Before enabling CMEK for Logs Router, you must first assign the role
    * `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that
    * the Logs Router will use to access your Cloud KMS key. Use
    * [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to
    * obtain the service account ID.
    * See [Enabling CMEK for Logs
-   * Router](/logging/docs/routing/managed-encryption) for more information.
+   * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
    * 
* - * string service_account_id = 3; + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The serviceAccountId. */ @@ -127,18 +127,18 @@ public interface CmekSettingsOrBuilder * * *
-   * Output Only. The service account that will be used by the Logs Router to
-   * access your Cloud KMS key.
+   * Output only. The service account that will be used by the Logs Router to access your
+   * Cloud KMS key.
    * Before enabling CMEK for Logs Router, you must first assign the role
    * `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that
    * the Logs Router will use to access your Cloud KMS key. Use
    * [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to
    * obtain the service account ID.
    * See [Enabling CMEK for Logs
-   * Router](/logging/docs/routing/managed-encryption) for more information.
+   * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
    * 
* - * string service_account_id = 3; + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for serviceAccountId. */ diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateExclusionRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateExclusionRequest.java index 63a1c0cfd..2eaee7459 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateExclusionRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateExclusionRequest.java @@ -146,6 +146,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -175,6 +176,7 @@ public java.lang.String getParent() { * * @return The bytes for parent. */ + @java.lang.Override public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -197,10 +199,12 @@ public com.google.protobuf.ByteString getParentBytes() { * that is not already used in the parent resource. *
* - * .google.logging.v2.LogExclusion exclusion = 2; + * .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the exclusion field is set. */ + @java.lang.Override public boolean hasExclusion() { return exclusion_ != null; } @@ -212,10 +216,12 @@ public boolean hasExclusion() { * that is not already used in the parent resource. *
* - * .google.logging.v2.LogExclusion exclusion = 2; + * .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The exclusion. */ + @java.lang.Override public com.google.logging.v2.LogExclusion getExclusion() { return exclusion_ == null ? com.google.logging.v2.LogExclusion.getDefaultInstance() @@ -229,8 +235,10 @@ public com.google.logging.v2.LogExclusion getExclusion() { * that is not already used in the parent resource. *
* - * .google.logging.v2.LogExclusion exclusion = 2; + * .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ + @java.lang.Override public com.google.logging.v2.LogExclusionOrBuilder getExclusionOrBuilder() { return getExclusion(); } @@ -734,7 +742,9 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * that is not already used in the parent resource. *
* - * .google.logging.v2.LogExclusion exclusion = 2; + * + * .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the exclusion field is set. */ @@ -749,7 +759,9 @@ public boolean hasExclusion() { * that is not already used in the parent resource. *
* - * .google.logging.v2.LogExclusion exclusion = 2; + * + * .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The exclusion. */ @@ -770,7 +782,9 @@ public com.google.logging.v2.LogExclusion getExclusion() { * that is not already used in the parent resource. *
* - * .google.logging.v2.LogExclusion exclusion = 2; + * + * .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setExclusion(com.google.logging.v2.LogExclusion value) { if (exclusionBuilder_ == null) { @@ -793,7 +807,9 @@ public Builder setExclusion(com.google.logging.v2.LogExclusion value) { * that is not already used in the parent resource. *
* - * .google.logging.v2.LogExclusion exclusion = 2; + * + * .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setExclusion(com.google.logging.v2.LogExclusion.Builder builderForValue) { if (exclusionBuilder_ == null) { @@ -813,7 +829,9 @@ public Builder setExclusion(com.google.logging.v2.LogExclusion.Builder builderFo * that is not already used in the parent resource. *
* - * .google.logging.v2.LogExclusion exclusion = 2; + * + * .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder mergeExclusion(com.google.logging.v2.LogExclusion value) { if (exclusionBuilder_ == null) { @@ -840,7 +858,9 @@ public Builder mergeExclusion(com.google.logging.v2.LogExclusion value) { * that is not already used in the parent resource. *
* - * .google.logging.v2.LogExclusion exclusion = 2; + * + * .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder clearExclusion() { if (exclusionBuilder_ == null) { @@ -861,7 +881,9 @@ public Builder clearExclusion() { * that is not already used in the parent resource. *
* - * .google.logging.v2.LogExclusion exclusion = 2; + * + * .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.logging.v2.LogExclusion.Builder getExclusionBuilder() { @@ -876,7 +898,9 @@ public com.google.logging.v2.LogExclusion.Builder getExclusionBuilder() { * that is not already used in the parent resource. *
* - * .google.logging.v2.LogExclusion exclusion = 2; + * + * .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.logging.v2.LogExclusionOrBuilder getExclusionOrBuilder() { if (exclusionBuilder_ != null) { @@ -895,7 +919,9 @@ public com.google.logging.v2.LogExclusionOrBuilder getExclusionOrBuilder() { * that is not already used in the parent resource. * * - * .google.logging.v2.LogExclusion exclusion = 2; + * + * .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.logging.v2.LogExclusion, diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateExclusionRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateExclusionRequestOrBuilder.java index 569bcc87e..c9f581052 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateExclusionRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateExclusionRequestOrBuilder.java @@ -70,7 +70,8 @@ public interface CreateExclusionRequestOrBuilder * that is not already used in the parent resource. * * - * .google.logging.v2.LogExclusion exclusion = 2; + * .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the exclusion field is set. */ @@ -83,7 +84,8 @@ public interface CreateExclusionRequestOrBuilder * that is not already used in the parent resource. * * - * .google.logging.v2.LogExclusion exclusion = 2; + * .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The exclusion. */ @@ -96,7 +98,8 @@ public interface CreateExclusionRequestOrBuilder * that is not already used in the parent resource. * * - * .google.logging.v2.LogExclusion exclusion = 2; + * .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ com.google.logging.v2.LogExclusionOrBuilder getExclusionOrBuilder(); } diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLogMetricRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLogMetricRequest.java index c12b64db4..b7f9567bd 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLogMetricRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLogMetricRequest.java @@ -143,6 +143,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -169,6 +170,7 @@ public java.lang.String getParent() { * * @return The bytes for parent. */ + @java.lang.Override public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -195,6 +197,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * @return Whether the metric field is set. */ + @java.lang.Override public boolean hasMetric() { return metric_ != null; } @@ -210,6 +213,7 @@ public boolean hasMetric() { * * @return The metric. */ + @java.lang.Override public com.google.logging.v2.LogMetric getMetric() { return metric_ == null ? com.google.logging.v2.LogMetric.getDefaultInstance() : metric_; } @@ -223,6 +227,7 @@ public com.google.logging.v2.LogMetric getMetric() { * * .google.logging.v2.LogMetric metric = 2 [(.google.api.field_behavior) = REQUIRED]; */ + @java.lang.Override public com.google.logging.v2.LogMetricOrBuilder getMetricOrBuilder() { return getMetric(); } diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateSinkRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateSinkRequest.java index 3c816fb16..8f3ebaf83 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateSinkRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateSinkRequest.java @@ -150,6 +150,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -179,6 +180,7 @@ public java.lang.String getParent() { * * @return The bytes for parent. */ + @java.lang.Override public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -205,6 +207,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * @return Whether the sink field is set. */ + @java.lang.Override public boolean hasSink() { return sink_ != null; } @@ -220,6 +223,7 @@ public boolean hasSink() { * * @return The sink. */ + @java.lang.Override public com.google.logging.v2.LogSink getSink() { return sink_ == null ? com.google.logging.v2.LogSink.getDefaultInstance() : sink_; } @@ -233,6 +237,7 @@ public com.google.logging.v2.LogSink getSink() { * * .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; */ + @java.lang.Override public com.google.logging.v2.LogSinkOrBuilder getSinkOrBuilder() { return getSink(); } @@ -255,10 +260,11 @@ public com.google.logging.v2.LogSinkOrBuilder getSinkOrBuilder() { * more information, see `writer_identity` in [LogSink][google.logging.v2.LogSink]. * * - * bool unique_writer_identity = 3; + * bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The uniqueWriterIdentity. */ + @java.lang.Override public boolean getUniqueWriterIdentity() { return uniqueWriterIdentity_; } @@ -966,10 +972,11 @@ public com.google.logging.v2.LogSinkOrBuilder getSinkOrBuilder() { * more information, see `writer_identity` in [LogSink][google.logging.v2.LogSink]. * * - * bool unique_writer_identity = 3; + * bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The uniqueWriterIdentity. */ + @java.lang.Override public boolean getUniqueWriterIdentity() { return uniqueWriterIdentity_; } @@ -989,7 +996,7 @@ public boolean getUniqueWriterIdentity() { * more information, see `writer_identity` in [LogSink][google.logging.v2.LogSink]. * * - * bool unique_writer_identity = 3; + * bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The uniqueWriterIdentity to set. * @return This builder for chaining. @@ -1016,7 +1023,7 @@ public Builder setUniqueWriterIdentity(boolean value) { * more information, see `writer_identity` in [LogSink][google.logging.v2.LogSink]. * * - * bool unique_writer_identity = 3; + * bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateSinkRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateSinkRequestOrBuilder.java index 09ae70c30..360545587 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateSinkRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateSinkRequestOrBuilder.java @@ -116,7 +116,7 @@ public interface CreateSinkRequestOrBuilder * more information, see `writer_identity` in [LogSink][google.logging.v2.LogSink]. * * - * bool unique_writer_identity = 3; + * bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The uniqueWriterIdentity. */ diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteExclusionRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteExclusionRequest.java index 94d5225fa..95eda7415 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteExclusionRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteExclusionRequest.java @@ -131,6 +131,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -160,6 +161,7 @@ public java.lang.String getName() { * * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogMetricRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogMetricRequest.java index 98ad08316..e6f965851 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogMetricRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogMetricRequest.java @@ -127,6 +127,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The metricName. */ + @java.lang.Override public java.lang.String getMetricName() { java.lang.Object ref = metricName_; if (ref instanceof java.lang.String) { @@ -152,6 +153,7 @@ public java.lang.String getMetricName() { * * @return The bytes for metricName. */ + @java.lang.Override public com.google.protobuf.ByteString getMetricNameBytes() { java.lang.Object ref = metricName_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogRequest.java index 7f083d858..5e98f7bf3 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogRequest.java @@ -135,6 +135,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The logName. */ + @java.lang.Override public java.lang.String getLogName() { java.lang.Object ref = logName_; if (ref instanceof java.lang.String) { @@ -168,6 +169,7 @@ public java.lang.String getLogName() { * * @return The bytes for logName. */ + @java.lang.Override public com.google.protobuf.ByteString getLogNameBytes() { java.lang.Object ref = logName_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteSinkRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteSinkRequest.java index 2439372be..5a3c51180 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteSinkRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteSinkRequest.java @@ -117,8 +117,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The full resource name of the sink to delete, including the
-   * parent resource and the sink identifier:
+   * Required. The full resource name of the sink to delete, including the parent
+   * resource and the sink identifier:
    *     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
    *     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
    *     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
@@ -132,6 +132,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    * @return The sinkName.
    */
+  @java.lang.Override
   public java.lang.String getSinkName() {
     java.lang.Object ref = sinkName_;
     if (ref instanceof java.lang.String) {
@@ -147,8 +148,8 @@ public java.lang.String getSinkName() {
    *
    *
    * 
-   * Required. The full resource name of the sink to delete, including the
-   * parent resource and the sink identifier:
+   * Required. The full resource name of the sink to delete, including the parent
+   * resource and the sink identifier:
    *     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
    *     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
    *     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
@@ -162,6 +163,7 @@ public java.lang.String getSinkName() {
    *
    * @return The bytes for sinkName.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getSinkNameBytes() {
     java.lang.Object ref = sinkName_;
     if (ref instanceof java.lang.String) {
@@ -494,8 +496,8 @@ public Builder mergeFrom(
      *
      *
      * 
-     * Required. The full resource name of the sink to delete, including the
-     * parent resource and the sink identifier:
+     * Required. The full resource name of the sink to delete, including the parent
+     * resource and the sink identifier:
      *     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
      *     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
      *     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
@@ -524,8 +526,8 @@ public java.lang.String getSinkName() {
      *
      *
      * 
-     * Required. The full resource name of the sink to delete, including the
-     * parent resource and the sink identifier:
+     * Required. The full resource name of the sink to delete, including the parent
+     * resource and the sink identifier:
      *     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
      *     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
      *     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
@@ -554,8 +556,8 @@ public com.google.protobuf.ByteString getSinkNameBytes() {
      *
      *
      * 
-     * Required. The full resource name of the sink to delete, including the
-     * parent resource and the sink identifier:
+     * Required. The full resource name of the sink to delete, including the parent
+     * resource and the sink identifier:
      *     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
      *     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
      *     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
@@ -583,8 +585,8 @@ public Builder setSinkName(java.lang.String value) {
      *
      *
      * 
-     * Required. The full resource name of the sink to delete, including the
-     * parent resource and the sink identifier:
+     * Required. The full resource name of the sink to delete, including the parent
+     * resource and the sink identifier:
      *     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
      *     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
      *     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
@@ -608,8 +610,8 @@ public Builder clearSinkName() {
      *
      *
      * 
-     * Required. The full resource name of the sink to delete, including the
-     * parent resource and the sink identifier:
+     * Required. The full resource name of the sink to delete, including the parent
+     * resource and the sink identifier:
      *     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
      *     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
      *     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteSinkRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteSinkRequestOrBuilder.java
index 7cb0e5079..75186cb69 100644
--- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteSinkRequestOrBuilder.java
+++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteSinkRequestOrBuilder.java
@@ -27,8 +27,8 @@ public interface DeleteSinkRequestOrBuilder
    *
    *
    * 
-   * Required. The full resource name of the sink to delete, including the
-   * parent resource and the sink identifier:
+   * Required. The full resource name of the sink to delete, including the parent
+   * resource and the sink identifier:
    *     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
    *     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
    *     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
@@ -47,8 +47,8 @@ public interface DeleteSinkRequestOrBuilder
    *
    *
    * 
-   * Required. The full resource name of the sink to delete, including the
-   * parent resource and the sink identifier:
+   * Required. The full resource name of the sink to delete, including the parent
+   * resource and the sink identifier:
    *     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
    *     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
    *     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ExclusionName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ExclusionName.java
deleted file mode 100644
index 0d1c7f316..000000000
--- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ExclusionName.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2020 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.logging.v2;
-
-import com.google.api.resourcenames.ResourceName;
-
-/** AUTO-GENERATED DOCUMENTATION AND CLASS */
-@javax.annotation.Generated("by GAPIC protoc plugin")
-public abstract class ExclusionName implements ResourceName {
-  protected ExclusionName() {}
-}
diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ExclusionNames.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ExclusionNames.java
deleted file mode 100644
index a0534949a..000000000
--- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ExclusionNames.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2020 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.logging.v2;
-
-/**
- * AUTO-GENERATED DOCUMENTATION AND CLASS
- *
- * @deprecated This resource name class will be removed in the next major version.
- */
-@javax.annotation.Generated("by GAPIC protoc plugin")
-@Deprecated
-public class ExclusionNames {
-  private ExclusionNames() {}
-
-  public static ExclusionName parse(String resourceNameString) {
-    if (ProjectExclusionName.isParsableFrom(resourceNameString)) {
-      return ProjectExclusionName.parse(resourceNameString);
-    }
-    if (OrganizationExclusionName.isParsableFrom(resourceNameString)) {
-      return OrganizationExclusionName.parse(resourceNameString);
-    }
-    if (FolderExclusionName.isParsableFrom(resourceNameString)) {
-      return FolderExclusionName.parse(resourceNameString);
-    }
-    if (BillingExclusionName.isParsableFrom(resourceNameString)) {
-      return BillingExclusionName.parse(resourceNameString);
-    }
-    return UntypedExclusionName.parse(resourceNameString);
-  }
-}
diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderExclusionName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderExclusionName.java
deleted file mode 100644
index 17ab6f81e..000000000
--- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderExclusionName.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Copyright 2020 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.logging.v2;
-
-import com.google.api.pathtemplate.PathTemplate;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.ImmutableMap;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/** AUTO-GENERATED DOCUMENTATION AND CLASS */
-@javax.annotation.Generated("by GAPIC protoc plugin")
-public class FolderExclusionName extends ExclusionName {
-
-  private static final PathTemplate PATH_TEMPLATE =
-      PathTemplate.createWithoutUrlEncoding("folders/{folder}/exclusions/{exclusion}");
-
-  private volatile Map fieldValuesMap;
-
-  private final String folder;
-  private final String exclusion;
-
-  public String getFolder() {
-    return folder;
-  }
-
-  public String getExclusion() {
-    return exclusion;
-  }
-
-  public static Builder newBuilder() {
-    return new Builder();
-  }
-
-  public Builder toBuilder() {
-    return new Builder(this);
-  }
-
-  private FolderExclusionName(Builder builder) {
-    folder = Preconditions.checkNotNull(builder.getFolder());
-    exclusion = Preconditions.checkNotNull(builder.getExclusion());
-  }
-
-  public static FolderExclusionName of(String folder, String exclusion) {
-    return newBuilder().setFolder(folder).setExclusion(exclusion).build();
-  }
-
-  public static String format(String folder, String exclusion) {
-    return newBuilder().setFolder(folder).setExclusion(exclusion).build().toString();
-  }
-
-  public static FolderExclusionName parse(String formattedString) {
-    if (formattedString.isEmpty()) {
-      return null;
-    }
-    Map matchMap =
-        PATH_TEMPLATE.validatedMatch(
-            formattedString, "FolderExclusionName.parse: formattedString not in valid format");
-    return of(matchMap.get("folder"), matchMap.get("exclusion"));
-  }
-
-  public static List parseList(List formattedStrings) {
-    List list = new ArrayList<>(formattedStrings.size());
-    for (String formattedString : formattedStrings) {
-      list.add(parse(formattedString));
-    }
-    return list;
-  }
-
-  public static List toStringList(List values) {
-    List list = new ArrayList(values.size());
-    for (FolderExclusionName value : values) {
-      if (value == null) {
-        list.add("");
-      } else {
-        list.add(value.toString());
-      }
-    }
-    return list;
-  }
-
-  public static boolean isParsableFrom(String formattedString) {
-    return PATH_TEMPLATE.matches(formattedString);
-  }
-
-  public Map getFieldValuesMap() {
-    if (fieldValuesMap == null) {
-      synchronized (this) {
-        if (fieldValuesMap == null) {
-          ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder();
-          fieldMapBuilder.put("folder", folder);
-          fieldMapBuilder.put("exclusion", exclusion);
-          fieldValuesMap = fieldMapBuilder.build();
-        }
-      }
-    }
-    return fieldValuesMap;
-  }
-
-  public String getFieldValue(String fieldName) {
-    return getFieldValuesMap().get(fieldName);
-  }
-
-  @Override
-  public String toString() {
-    return PATH_TEMPLATE.instantiate("folder", folder, "exclusion", exclusion);
-  }
-
-  /** Builder for FolderExclusionName. */
-  public static class Builder {
-
-    private String folder;
-    private String exclusion;
-
-    public String getFolder() {
-      return folder;
-    }
-
-    public String getExclusion() {
-      return exclusion;
-    }
-
-    public Builder setFolder(String folder) {
-      this.folder = folder;
-      return this;
-    }
-
-    public Builder setExclusion(String exclusion) {
-      this.exclusion = exclusion;
-      return this;
-    }
-
-    private Builder() {}
-
-    private Builder(FolderExclusionName folderExclusionName) {
-      folder = folderExclusionName.folder;
-      exclusion = folderExclusionName.exclusion;
-    }
-
-    public FolderExclusionName build() {
-      return new FolderExclusionName(this);
-    }
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (o == this) {
-      return true;
-    }
-    if (o instanceof FolderExclusionName) {
-      FolderExclusionName that = (FolderExclusionName) o;
-      return (this.folder.equals(that.folder)) && (this.exclusion.equals(that.exclusion));
-    }
-    return false;
-  }
-
-  @Override
-  public int hashCode() {
-    int h = 1;
-    h *= 1000003;
-    h ^= folder.hashCode();
-    h *= 1000003;
-    h ^= exclusion.hashCode();
-    return h;
-  }
-}
diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderLogName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderLocationName.java
similarity index 61%
rename from proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderLogName.java
rename to proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderLocationName.java
index 7375d5072..ea17e86c9 100644
--- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderLogName.java
+++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderLocationName.java
@@ -17,6 +17,7 @@
 package com.google.logging.v2;
 
 import com.google.api.pathtemplate.PathTemplate;
+import com.google.api.resourcenames.ResourceName;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableMap;
 import java.util.ArrayList;
@@ -25,22 +26,22 @@
 
 /** AUTO-GENERATED DOCUMENTATION AND CLASS */
 @javax.annotation.Generated("by GAPIC protoc plugin")
-public class FolderLogName extends LogName {
+public class FolderLocationName implements ResourceName {
 
   private static final PathTemplate PATH_TEMPLATE =
-      PathTemplate.createWithoutUrlEncoding("folders/{folder}/logs/{log}");
+      PathTemplate.createWithoutUrlEncoding("folders/{folder}/locations/{location}");
 
   private volatile Map fieldValuesMap;
 
   private final String folder;
-  private final String log;
+  private final String location;
 
   public String getFolder() {
     return folder;
   }
 
-  public String getLog() {
-    return log;
+  public String getLocation() {
+    return location;
   }
 
   public static Builder newBuilder() {
@@ -51,40 +52,40 @@ public Builder toBuilder() {
     return new Builder(this);
   }
 
-  private FolderLogName(Builder builder) {
+  private FolderLocationName(Builder builder) {
     folder = Preconditions.checkNotNull(builder.getFolder());
-    log = Preconditions.checkNotNull(builder.getLog());
+    location = Preconditions.checkNotNull(builder.getLocation());
   }
 
-  public static FolderLogName of(String folder, String log) {
-    return newBuilder().setFolder(folder).setLog(log).build();
+  public static FolderLocationName of(String folder, String location) {
+    return newBuilder().setFolder(folder).setLocation(location).build();
   }
 
-  public static String format(String folder, String log) {
-    return newBuilder().setFolder(folder).setLog(log).build().toString();
+  public static String format(String folder, String location) {
+    return newBuilder().setFolder(folder).setLocation(location).build().toString();
   }
 
-  public static FolderLogName parse(String formattedString) {
+  public static FolderLocationName parse(String formattedString) {
     if (formattedString.isEmpty()) {
       return null;
     }
     Map matchMap =
         PATH_TEMPLATE.validatedMatch(
-            formattedString, "FolderLogName.parse: formattedString not in valid format");
-    return of(matchMap.get("folder"), matchMap.get("log"));
+            formattedString, "FolderLocationName.parse: formattedString not in valid format");
+    return of(matchMap.get("folder"), matchMap.get("location"));
   }
 
-  public static List parseList(List formattedStrings) {
-    List list = new ArrayList<>(formattedStrings.size());
+  public static List parseList(List formattedStrings) {
+    List list = new ArrayList<>(formattedStrings.size());
     for (String formattedString : formattedStrings) {
       list.add(parse(formattedString));
     }
     return list;
   }
 
-  public static List toStringList(List values) {
+  public static List toStringList(List values) {
     List list = new ArrayList(values.size());
-    for (FolderLogName value : values) {
+    for (FolderLocationName value : values) {
       if (value == null) {
         list.add("");
       } else {
@@ -104,7 +105,7 @@ public Map getFieldValuesMap() {
         if (fieldValuesMap == null) {
           ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder();
           fieldMapBuilder.put("folder", folder);
-          fieldMapBuilder.put("log", log);
+          fieldMapBuilder.put("location", location);
           fieldValuesMap = fieldMapBuilder.build();
         }
       }
@@ -118,21 +119,21 @@ public String getFieldValue(String fieldName) {
 
   @Override
   public String toString() {
-    return PATH_TEMPLATE.instantiate("folder", folder, "log", log);
+    return PATH_TEMPLATE.instantiate("folder", folder, "location", location);
   }
 
-  /** Builder for FolderLogName. */
+  /** Builder for FolderLocationName. */
   public static class Builder {
 
     private String folder;
-    private String log;
+    private String location;
 
     public String getFolder() {
       return folder;
     }
 
-    public String getLog() {
-      return log;
+    public String getLocation() {
+      return location;
     }
 
     public Builder setFolder(String folder) {
@@ -140,20 +141,20 @@ public Builder setFolder(String folder) {
       return this;
     }
 
-    public Builder setLog(String log) {
-      this.log = log;
+    public Builder setLocation(String location) {
+      this.location = location;
       return this;
     }
 
     private Builder() {}
 
-    private Builder(FolderLogName folderLogName) {
-      folder = folderLogName.folder;
-      log = folderLogName.log;
+    private Builder(FolderLocationName folderLocationName) {
+      folder = folderLocationName.folder;
+      location = folderLocationName.location;
     }
 
-    public FolderLogName build() {
-      return new FolderLogName(this);
+    public FolderLocationName build() {
+      return new FolderLocationName(this);
     }
   }
 
@@ -162,9 +163,9 @@ public boolean equals(Object o) {
     if (o == this) {
       return true;
     }
-    if (o instanceof FolderLogName) {
-      FolderLogName that = (FolderLogName) o;
-      return (this.folder.equals(that.folder)) && (this.log.equals(that.log));
+    if (o instanceof FolderLocationName) {
+      FolderLocationName that = (FolderLocationName) o;
+      return (this.folder.equals(that.folder)) && (this.location.equals(that.location));
     }
     return false;
   }
@@ -175,7 +176,7 @@ public int hashCode() {
     h *= 1000003;
     h ^= folder.hashCode();
     h *= 1000003;
-    h ^= log.hashCode();
+    h ^= location.hashCode();
     return h;
   }
 }
diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderName.java
index f70ece0ee..f6b5aba2b 100644
--- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderName.java
+++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderName.java
@@ -17,6 +17,7 @@
 package com.google.logging.v2;
 
 import com.google.api.pathtemplate.PathTemplate;
+import com.google.api.resourcenames.ResourceName;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableMap;
 import java.util.ArrayList;
@@ -25,7 +26,7 @@
 
 /** AUTO-GENERATED DOCUMENTATION AND CLASS */
 @javax.annotation.Generated("by GAPIC protoc plugin")
-public class FolderName extends ParentName {
+public class FolderName implements ResourceName {
 
   private static final PathTemplate PATH_TEMPLATE =
       PathTemplate.createWithoutUrlEncoding("folders/{folder}");
diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderSinkName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderSinkName.java
deleted file mode 100644
index 860a1326c..000000000
--- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderSinkName.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Copyright 2020 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.logging.v2;
-
-import com.google.api.pathtemplate.PathTemplate;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.ImmutableMap;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/** AUTO-GENERATED DOCUMENTATION AND CLASS */
-@javax.annotation.Generated("by GAPIC protoc plugin")
-public class FolderSinkName extends SinkName {
-
-  private static final PathTemplate PATH_TEMPLATE =
-      PathTemplate.createWithoutUrlEncoding("folders/{folder}/sinks/{sink}");
-
-  private volatile Map fieldValuesMap;
-
-  private final String folder;
-  private final String sink;
-
-  public String getFolder() {
-    return folder;
-  }
-
-  public String getSink() {
-    return sink;
-  }
-
-  public static Builder newBuilder() {
-    return new Builder();
-  }
-
-  public Builder toBuilder() {
-    return new Builder(this);
-  }
-
-  private FolderSinkName(Builder builder) {
-    folder = Preconditions.checkNotNull(builder.getFolder());
-    sink = Preconditions.checkNotNull(builder.getSink());
-  }
-
-  public static FolderSinkName of(String folder, String sink) {
-    return newBuilder().setFolder(folder).setSink(sink).build();
-  }
-
-  public static String format(String folder, String sink) {
-    return newBuilder().setFolder(folder).setSink(sink).build().toString();
-  }
-
-  public static FolderSinkName parse(String formattedString) {
-    if (formattedString.isEmpty()) {
-      return null;
-    }
-    Map matchMap =
-        PATH_TEMPLATE.validatedMatch(
-            formattedString, "FolderSinkName.parse: formattedString not in valid format");
-    return of(matchMap.get("folder"), matchMap.get("sink"));
-  }
-
-  public static List parseList(List formattedStrings) {
-    List list = new ArrayList<>(formattedStrings.size());
-    for (String formattedString : formattedStrings) {
-      list.add(parse(formattedString));
-    }
-    return list;
-  }
-
-  public static List toStringList(List values) {
-    List list = new ArrayList(values.size());
-    for (FolderSinkName value : values) {
-      if (value == null) {
-        list.add("");
-      } else {
-        list.add(value.toString());
-      }
-    }
-    return list;
-  }
-
-  public static boolean isParsableFrom(String formattedString) {
-    return PATH_TEMPLATE.matches(formattedString);
-  }
-
-  public Map getFieldValuesMap() {
-    if (fieldValuesMap == null) {
-      synchronized (this) {
-        if (fieldValuesMap == null) {
-          ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder();
-          fieldMapBuilder.put("folder", folder);
-          fieldMapBuilder.put("sink", sink);
-          fieldValuesMap = fieldMapBuilder.build();
-        }
-      }
-    }
-    return fieldValuesMap;
-  }
-
-  public String getFieldValue(String fieldName) {
-    return getFieldValuesMap().get(fieldName);
-  }
-
-  @Override
-  public String toString() {
-    return PATH_TEMPLATE.instantiate("folder", folder, "sink", sink);
-  }
-
-  /** Builder for FolderSinkName. */
-  public static class Builder {
-
-    private String folder;
-    private String sink;
-
-    public String getFolder() {
-      return folder;
-    }
-
-    public String getSink() {
-      return sink;
-    }
-
-    public Builder setFolder(String folder) {
-      this.folder = folder;
-      return this;
-    }
-
-    public Builder setSink(String sink) {
-      this.sink = sink;
-      return this;
-    }
-
-    private Builder() {}
-
-    private Builder(FolderSinkName folderSinkName) {
-      folder = folderSinkName.folder;
-      sink = folderSinkName.sink;
-    }
-
-    public FolderSinkName build() {
-      return new FolderSinkName(this);
-    }
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (o == this) {
-      return true;
-    }
-    if (o instanceof FolderSinkName) {
-      FolderSinkName that = (FolderSinkName) o;
-      return (this.folder.equals(that.folder)) && (this.sink.equals(that.sink));
-    }
-    return false;
-  }
-
-  @Override
-  public int hashCode() {
-    int h = 1;
-    h *= 1000003;
-    h ^= folder.hashCode();
-    h *= 1000003;
-    h ^= sink.hashCode();
-    return h;
-  }
-}
diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetBucketRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetBucketRequest.java
new file mode 100644
index 000000000..7eb3d4f03
--- /dev/null
+++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetBucketRequest.java
@@ -0,0 +1,689 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: google/logging/v2/logging_config.proto
+
+package com.google.logging.v2;
+
+/**
+ *
+ *
+ * 
+ * The parameters to `GetBucket` (Beta).
+ * 
+ * + * Protobuf type {@code google.logging.v2.GetBucketRequest} + */ +public final class GetBucketRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.logging.v2.GetBucketRequest) + GetBucketRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetBucketRequest.newBuilder() to construct. + private GetBucketRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetBucketRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetBucketRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetBucketRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_GetBucketRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_GetBucketRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.GetBucketRequest.class, + com.google.logging.v2.GetBucketRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the bucket:
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   * Example:
+   * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the bucket:
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   * Example:
+   * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.logging.v2.GetBucketRequest)) { + return super.equals(obj); + } + com.google.logging.v2.GetBucketRequest other = (com.google.logging.v2.GetBucketRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.logging.v2.GetBucketRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.GetBucketRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.logging.v2.GetBucketRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.GetBucketRequest 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.logging.v2.GetBucketRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.GetBucketRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.logging.v2.GetBucketRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.GetBucketRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.logging.v2.GetBucketRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.logging.v2.GetBucketRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.logging.v2.GetBucketRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.GetBucketRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.logging.v2.GetBucketRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The parameters to `GetBucket` (Beta).
+   * 
+ * + * Protobuf type {@code google.logging.v2.GetBucketRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.logging.v2.GetBucketRequest) + com.google.logging.v2.GetBucketRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_GetBucketRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_GetBucketRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.GetBucketRequest.class, + com.google.logging.v2.GetBucketRequest.Builder.class); + } + + // Construct using com.google.logging.v2.GetBucketRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_GetBucketRequest_descriptor; + } + + @java.lang.Override + public com.google.logging.v2.GetBucketRequest getDefaultInstanceForType() { + return com.google.logging.v2.GetBucketRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.logging.v2.GetBucketRequest build() { + com.google.logging.v2.GetBucketRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.logging.v2.GetBucketRequest buildPartial() { + com.google.logging.v2.GetBucketRequest result = + new com.google.logging.v2.GetBucketRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.logging.v2.GetBucketRequest) { + return mergeFrom((com.google.logging.v2.GetBucketRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.logging.v2.GetBucketRequest other) { + if (other == com.google.logging.v2.GetBucketRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.logging.v2.GetBucketRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.logging.v2.GetBucketRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the bucket:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     * Example:
+     * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the bucket:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     * Example:
+     * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the bucket:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     * Example:
+     * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the bucket:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     * Example:
+     * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the bucket:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     * Example:
+     * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.logging.v2.GetBucketRequest) + } + + // @@protoc_insertion_point(class_scope:google.logging.v2.GetBucketRequest) + private static final com.google.logging.v2.GetBucketRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.logging.v2.GetBucketRequest(); + } + + public static com.google.logging.v2.GetBucketRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetBucketRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetBucketRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.logging.v2.GetBucketRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetBucketRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetBucketRequestOrBuilder.java new file mode 100644 index 000000000..41d68d9a1 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetBucketRequestOrBuilder.java @@ -0,0 +1,66 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/logging/v2/logging_config.proto + +package com.google.logging.v2; + +public interface GetBucketRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.logging.v2.GetBucketRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the bucket:
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   * Example:
+   * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the bucket:
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   * Example:
+   * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetCmekSettingsRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetCmekSettingsRequest.java index 4669202d1..554848f2f 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetCmekSettingsRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetCmekSettingsRequest.java @@ -24,7 +24,7 @@ *
  * The parameters to
  * [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings].
- * See [Enabling CMEK for Logs Router](/logging/docs/routing/managed-encryption)
+ * See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
  * for more information.
  * 
* @@ -131,10 +131,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * the GCP organization. *
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -161,10 +164,13 @@ public java.lang.String getName() { * the GCP organization. *
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -342,7 +348,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
    * The parameters to
    * [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings].
-   * See [Enabling CMEK for Logs Router](/logging/docs/routing/managed-encryption)
+   * See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
    * for more information.
    * 
* @@ -512,7 +518,9 @@ public Builder mergeFrom( * the GCP organization. *
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -542,7 +550,9 @@ public java.lang.String getName() { * the GCP organization. *
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -572,7 +582,9 @@ public com.google.protobuf.ByteString getNameBytes() { * the GCP organization. *
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -601,7 +613,9 @@ public Builder setName(java.lang.String value) { * the GCP organization. *
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -626,7 +640,9 @@ public Builder clearName() { * the GCP organization. *
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetCmekSettingsRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetCmekSettingsRequestOrBuilder.java index 5934e8f48..f1be32ee6 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetCmekSettingsRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetCmekSettingsRequestOrBuilder.java @@ -38,7 +38,9 @@ public interface GetCmekSettingsRequestOrBuilder * the GCP organization. *
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -58,7 +60,9 @@ public interface GetCmekSettingsRequestOrBuilder * the GCP organization. *
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetExclusionRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetExclusionRequest.java index a50c6e933..4b8bec753 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetExclusionRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetExclusionRequest.java @@ -131,6 +131,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -160,6 +161,7 @@ public java.lang.String getName() { * * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLogMetricRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLogMetricRequest.java index 6fe893332..256ae8a83 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLogMetricRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLogMetricRequest.java @@ -127,6 +127,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The metricName. */ + @java.lang.Override public java.lang.String getMetricName() { java.lang.Object ref = metricName_; if (ref instanceof java.lang.String) { @@ -152,6 +153,7 @@ public java.lang.String getMetricName() { * * @return The bytes for metricName. */ + @java.lang.Override public com.google.protobuf.ByteString getMetricNameBytes() { java.lang.Object ref = metricName_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSinkRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSinkRequest.java index 13d953a53..842f820ac 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSinkRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSinkRequest.java @@ -131,6 +131,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The sinkName. */ + @java.lang.Override public java.lang.String getSinkName() { java.lang.Object ref = sinkName_; if (ref instanceof java.lang.String) { @@ -160,6 +161,7 @@ public java.lang.String getSinkName() { * * @return The bytes for sinkName. */ + @java.lang.Override public com.google.protobuf.ByteString getSinkNameBytes() { java.lang.Object ref = sinkName_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LifecycleState.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LifecycleState.java new file mode 100644 index 000000000..dacd152d2 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LifecycleState.java @@ -0,0 +1,178 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/logging/v2/logging_config.proto + +package com.google.logging.v2; + +/** + * + * + *
+ * LogBucket lifecycle states (Beta).
+ * 
+ * + * Protobuf enum {@code google.logging.v2.LifecycleState} + */ +public enum LifecycleState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified state.  This is only used/useful for distinguishing
+   * unset values.
+   * 
+ * + * LIFECYCLE_STATE_UNSPECIFIED = 0; + */ + LIFECYCLE_STATE_UNSPECIFIED(0), + /** + * + * + *
+   * The normal and active state.
+   * 
+ * + * ACTIVE = 1; + */ + ACTIVE(1), + /** + * + * + *
+   * The bucket has been marked for deletion by the user.
+   * 
+ * + * DELETE_REQUESTED = 2; + */ + DELETE_REQUESTED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified state.  This is only used/useful for distinguishing
+   * unset values.
+   * 
+ * + * LIFECYCLE_STATE_UNSPECIFIED = 0; + */ + public static final int LIFECYCLE_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The normal and active state.
+   * 
+ * + * ACTIVE = 1; + */ + public static final int ACTIVE_VALUE = 1; + /** + * + * + *
+   * The bucket has been marked for deletion by the user.
+   * 
+ * + * DELETE_REQUESTED = 2; + */ + public static final int DELETE_REQUESTED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LifecycleState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static LifecycleState forNumber(int value) { + switch (value) { + case 0: + return LIFECYCLE_STATE_UNSPECIFIED; + case 1: + return ACTIVE; + case 2: + return DELETE_REQUESTED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LifecycleState findValueByNumber(int number) { + return LifecycleState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.logging.v2.LoggingConfigProto.getDescriptor().getEnumTypes().get(0); + } + + private static final LifecycleState[] VALUES = values(); + + public static LifecycleState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private LifecycleState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.logging.v2.LifecycleState) +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsRequest.java new file mode 100644 index 000000000..64839373f --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsRequest.java @@ -0,0 +1,994 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/logging/v2/logging_config.proto + +package com.google.logging.v2; + +/** + * + * + *
+ * The parameters to `ListBuckets` (Beta).
+ * 
+ * + * Protobuf type {@code google.logging.v2.ListBucketsRequest} + */ +public final class ListBucketsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.logging.v2.ListBucketsRequest) + ListBucketsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListBucketsRequest.newBuilder() to construct. + private ListBucketsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListBucketsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListBucketsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListBucketsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_ListBucketsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_ListBucketsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.ListBucketsRequest.class, + com.google.logging.v2.ListBucketsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent resource whose buckets are to be listed:
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
+   *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
+   *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
+   *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]"
+   * Note: The locations portion of the resource must be specified, but
+   * supplying the character `-` in place of [LOCATION_ID] will return all
+   * buckets.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource whose buckets are to be listed:
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
+   *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
+   *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
+   *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]"
+   * Note: The locations portion of the resource must be specified, but
+   * supplying the character `-` in place of [LOCATION_ID] will return all
+   * buckets.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. If present, then retrieve the next batch of results from the
+   * preceding call to this method. `pageToken` must be the value of
+   * `nextPageToken` from the previous response. The values of other method
+   * parameters should be identical to those in the previous call.
+   * 
+ * + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. If present, then retrieve the next batch of results from the
+   * preceding call to this method. `pageToken` must be the value of
+   * `nextPageToken` from the previous response. The values of other method
+   * parameters should be identical to those in the previous call.
+   * 
+ * + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * Optional. The maximum number of results to return from this request.
+   * Non-positive values are ignored. The presence of `nextPageToken` in the
+   * response indicates that more results might be available.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageToken_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageToken_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.logging.v2.ListBucketsRequest)) { + return super.equals(obj); + } + com.google.logging.v2.ListBucketsRequest other = (com.google.logging.v2.ListBucketsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.logging.v2.ListBucketsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.ListBucketsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.logging.v2.ListBucketsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.ListBucketsRequest 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.logging.v2.ListBucketsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.ListBucketsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.logging.v2.ListBucketsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.ListBucketsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.logging.v2.ListBucketsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.logging.v2.ListBucketsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.logging.v2.ListBucketsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.ListBucketsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.logging.v2.ListBucketsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The parameters to `ListBuckets` (Beta).
+   * 
+ * + * Protobuf type {@code google.logging.v2.ListBucketsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.logging.v2.ListBucketsRequest) + com.google.logging.v2.ListBucketsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_ListBucketsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_ListBucketsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.ListBucketsRequest.class, + com.google.logging.v2.ListBucketsRequest.Builder.class); + } + + // Construct using com.google.logging.v2.ListBucketsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageToken_ = ""; + + pageSize_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_ListBucketsRequest_descriptor; + } + + @java.lang.Override + public com.google.logging.v2.ListBucketsRequest getDefaultInstanceForType() { + return com.google.logging.v2.ListBucketsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.logging.v2.ListBucketsRequest build() { + com.google.logging.v2.ListBucketsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.logging.v2.ListBucketsRequest buildPartial() { + com.google.logging.v2.ListBucketsRequest result = + new com.google.logging.v2.ListBucketsRequest(this); + result.parent_ = parent_; + result.pageToken_ = pageToken_; + result.pageSize_ = pageSize_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.logging.v2.ListBucketsRequest) { + return mergeFrom((com.google.logging.v2.ListBucketsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.logging.v2.ListBucketsRequest other) { + if (other == com.google.logging.v2.ListBucketsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.logging.v2.ListBucketsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.logging.v2.ListBucketsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource whose buckets are to be listed:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
+     *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
+     *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
+     *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]"
+     * Note: The locations portion of the resource must be specified, but
+     * supplying the character `-` in place of [LOCATION_ID] will return all
+     * buckets.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource whose buckets are to be listed:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
+     *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
+     *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
+     *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]"
+     * Note: The locations portion of the resource must be specified, but
+     * supplying the character `-` in place of [LOCATION_ID] will return all
+     * buckets.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource whose buckets are to be listed:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
+     *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
+     *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
+     *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]"
+     * Note: The locations portion of the resource must be specified, but
+     * supplying the character `-` in place of [LOCATION_ID] will return all
+     * buckets.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource whose buckets are to be listed:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
+     *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
+     *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
+     *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]"
+     * Note: The locations portion of the resource must be specified, but
+     * supplying the character `-` in place of [LOCATION_ID] will return all
+     * buckets.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource whose buckets are to be listed:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
+     *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
+     *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
+     *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]"
+     * Note: The locations portion of the resource must be specified, but
+     * supplying the character `-` in place of [LOCATION_ID] will return all
+     * buckets.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. If present, then retrieve the next batch of results from the
+     * preceding call to this method. `pageToken` must be the value of
+     * `nextPageToken` from the previous response. The values of other method
+     * parameters should be identical to those in the previous call.
+     * 
+ * + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. If present, then retrieve the next batch of results from the
+     * preceding call to this method. `pageToken` must be the value of
+     * `nextPageToken` from the previous response. The values of other method
+     * parameters should be identical to those in the previous call.
+     * 
+ * + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. If present, then retrieve the next batch of results from the
+     * preceding call to this method. `pageToken` must be the value of
+     * `nextPageToken` from the previous response. The values of other method
+     * parameters should be identical to those in the previous call.
+     * 
+ * + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If present, then retrieve the next batch of results from the
+     * preceding call to this method. `pageToken` must be the value of
+     * `nextPageToken` from the previous response. The values of other method
+     * parameters should be identical to those in the previous call.
+     * 
+ * + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If present, then retrieve the next batch of results from the
+     * preceding call to this method. `pageToken` must be the value of
+     * `nextPageToken` from the previous response. The values of other method
+     * parameters should be identical to those in the previous call.
+     * 
+ * + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The maximum number of results to return from this request.
+     * Non-positive values are ignored. The presence of `nextPageToken` in the
+     * response indicates that more results might be available.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The maximum number of results to return from this request.
+     * Non-positive values are ignored. The presence of `nextPageToken` in the
+     * response indicates that more results might be available.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The maximum number of results to return from this request.
+     * Non-positive values are ignored. The presence of `nextPageToken` in the
+     * response indicates that more results might be available.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.logging.v2.ListBucketsRequest) + } + + // @@protoc_insertion_point(class_scope:google.logging.v2.ListBucketsRequest) + private static final com.google.logging.v2.ListBucketsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.logging.v2.ListBucketsRequest(); + } + + public static com.google.logging.v2.ListBucketsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBucketsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListBucketsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.logging.v2.ListBucketsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsRequestOrBuilder.java new file mode 100644 index 000000000..0f895cf02 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsRequestOrBuilder.java @@ -0,0 +1,114 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/logging/v2/logging_config.proto + +package com.google.logging.v2; + +public interface ListBucketsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.logging.v2.ListBucketsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource whose buckets are to be listed:
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
+   *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
+   *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
+   *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]"
+   * Note: The locations portion of the resource must be specified, but
+   * supplying the character `-` in place of [LOCATION_ID] will return all
+   * buckets.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource whose buckets are to be listed:
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
+   *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
+   *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
+   *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]"
+   * Note: The locations portion of the resource must be specified, but
+   * supplying the character `-` in place of [LOCATION_ID] will return all
+   * buckets.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. If present, then retrieve the next batch of results from the
+   * preceding call to this method. `pageToken` must be the value of
+   * `nextPageToken` from the previous response. The values of other method
+   * parameters should be identical to those in the previous call.
+   * 
+ * + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. If present, then retrieve the next batch of results from the
+   * preceding call to this method. `pageToken` must be the value of
+   * `nextPageToken` from the previous response. The values of other method
+   * parameters should be identical to those in the previous call.
+   * 
+ * + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. The maximum number of results to return from this request.
+   * Non-positive values are ignored. The presence of `nextPageToken` in the
+   * response indicates that more results might be available.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsResponse.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsResponse.java new file mode 100644 index 000000000..52c5b9fff --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsResponse.java @@ -0,0 +1,1136 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/logging/v2/logging_config.proto + +package com.google.logging.v2; + +/** + * + * + *
+ * The response from ListBuckets (Beta).
+ * 
+ * + * Protobuf type {@code google.logging.v2.ListBucketsResponse} + */ +public final class ListBucketsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.logging.v2.ListBucketsResponse) + ListBucketsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListBucketsResponse.newBuilder() to construct. + private ListBucketsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListBucketsResponse() { + buckets_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListBucketsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListBucketsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + buckets_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + buckets_.add( + input.readMessage(com.google.logging.v2.LogBucket.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + buckets_ = java.util.Collections.unmodifiableList(buckets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_ListBucketsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_ListBucketsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.ListBucketsResponse.class, + com.google.logging.v2.ListBucketsResponse.Builder.class); + } + + public static final int BUCKETS_FIELD_NUMBER = 1; + private java.util.List buckets_; + /** + * + * + *
+   * A list of buckets.
+   * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + @java.lang.Override + public java.util.List getBucketsList() { + return buckets_; + } + /** + * + * + *
+   * A list of buckets.
+   * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + @java.lang.Override + public java.util.List + getBucketsOrBuilderList() { + return buckets_; + } + /** + * + * + *
+   * A list of buckets.
+   * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + @java.lang.Override + public int getBucketsCount() { + return buckets_.size(); + } + /** + * + * + *
+   * A list of buckets.
+   * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + @java.lang.Override + public com.google.logging.v2.LogBucket getBuckets(int index) { + return buckets_.get(index); + } + /** + * + * + *
+   * A list of buckets.
+   * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + @java.lang.Override + public com.google.logging.v2.LogBucketOrBuilder getBucketsOrBuilder(int index) { + return buckets_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * If there might be more results than appear in this response, then
+   * `nextPageToken` is included. To get the next set of results, call the same
+   * method again using the value of `nextPageToken` as `pageToken`.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * If there might be more results than appear in this response, then
+   * `nextPageToken` is included. To get the next set of results, call the same
+   * method again using the value of `nextPageToken` as `pageToken`.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < buckets_.size(); i++) { + output.writeMessage(1, buckets_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < buckets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, buckets_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.logging.v2.ListBucketsResponse)) { + return super.equals(obj); + } + com.google.logging.v2.ListBucketsResponse other = + (com.google.logging.v2.ListBucketsResponse) obj; + + if (!getBucketsList().equals(other.getBucketsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBucketsCount() > 0) { + hash = (37 * hash) + BUCKETS_FIELD_NUMBER; + hash = (53 * hash) + getBucketsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.logging.v2.ListBucketsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.ListBucketsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.logging.v2.ListBucketsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.ListBucketsResponse 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.logging.v2.ListBucketsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.ListBucketsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.logging.v2.ListBucketsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.ListBucketsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.logging.v2.ListBucketsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.logging.v2.ListBucketsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.logging.v2.ListBucketsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.ListBucketsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.logging.v2.ListBucketsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response from ListBuckets (Beta).
+   * 
+ * + * Protobuf type {@code google.logging.v2.ListBucketsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.logging.v2.ListBucketsResponse) + com.google.logging.v2.ListBucketsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_ListBucketsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_ListBucketsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.ListBucketsResponse.class, + com.google.logging.v2.ListBucketsResponse.Builder.class); + } + + // Construct using com.google.logging.v2.ListBucketsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getBucketsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (bucketsBuilder_ == null) { + buckets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + bucketsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_ListBucketsResponse_descriptor; + } + + @java.lang.Override + public com.google.logging.v2.ListBucketsResponse getDefaultInstanceForType() { + return com.google.logging.v2.ListBucketsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.logging.v2.ListBucketsResponse build() { + com.google.logging.v2.ListBucketsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.logging.v2.ListBucketsResponse buildPartial() { + com.google.logging.v2.ListBucketsResponse result = + new com.google.logging.v2.ListBucketsResponse(this); + int from_bitField0_ = bitField0_; + if (bucketsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + buckets_ = java.util.Collections.unmodifiableList(buckets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.buckets_ = buckets_; + } else { + result.buckets_ = bucketsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.logging.v2.ListBucketsResponse) { + return mergeFrom((com.google.logging.v2.ListBucketsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.logging.v2.ListBucketsResponse other) { + if (other == com.google.logging.v2.ListBucketsResponse.getDefaultInstance()) return this; + if (bucketsBuilder_ == null) { + if (!other.buckets_.isEmpty()) { + if (buckets_.isEmpty()) { + buckets_ = other.buckets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBucketsIsMutable(); + buckets_.addAll(other.buckets_); + } + onChanged(); + } + } else { + if (!other.buckets_.isEmpty()) { + if (bucketsBuilder_.isEmpty()) { + bucketsBuilder_.dispose(); + bucketsBuilder_ = null; + buckets_ = other.buckets_; + bitField0_ = (bitField0_ & ~0x00000001); + bucketsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBucketsFieldBuilder() + : null; + } else { + bucketsBuilder_.addAllMessages(other.buckets_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.logging.v2.ListBucketsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.logging.v2.ListBucketsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List buckets_ = + java.util.Collections.emptyList(); + + private void ensureBucketsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + buckets_ = new java.util.ArrayList(buckets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.logging.v2.LogBucket, + com.google.logging.v2.LogBucket.Builder, + com.google.logging.v2.LogBucketOrBuilder> + bucketsBuilder_; + + /** + * + * + *
+     * A list of buckets.
+     * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + public java.util.List getBucketsList() { + if (bucketsBuilder_ == null) { + return java.util.Collections.unmodifiableList(buckets_); + } else { + return bucketsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of buckets.
+     * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + public int getBucketsCount() { + if (bucketsBuilder_ == null) { + return buckets_.size(); + } else { + return bucketsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of buckets.
+     * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + public com.google.logging.v2.LogBucket getBuckets(int index) { + if (bucketsBuilder_ == null) { + return buckets_.get(index); + } else { + return bucketsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of buckets.
+     * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + public Builder setBuckets(int index, com.google.logging.v2.LogBucket value) { + if (bucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketsIsMutable(); + buckets_.set(index, value); + onChanged(); + } else { + bucketsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of buckets.
+     * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + public Builder setBuckets(int index, com.google.logging.v2.LogBucket.Builder builderForValue) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.set(index, builderForValue.build()); + onChanged(); + } else { + bucketsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of buckets.
+     * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + public Builder addBuckets(com.google.logging.v2.LogBucket value) { + if (bucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketsIsMutable(); + buckets_.add(value); + onChanged(); + } else { + bucketsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of buckets.
+     * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + public Builder addBuckets(int index, com.google.logging.v2.LogBucket value) { + if (bucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketsIsMutable(); + buckets_.add(index, value); + onChanged(); + } else { + bucketsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of buckets.
+     * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + public Builder addBuckets(com.google.logging.v2.LogBucket.Builder builderForValue) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.add(builderForValue.build()); + onChanged(); + } else { + bucketsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of buckets.
+     * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + public Builder addBuckets(int index, com.google.logging.v2.LogBucket.Builder builderForValue) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.add(index, builderForValue.build()); + onChanged(); + } else { + bucketsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of buckets.
+     * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + public Builder addAllBuckets( + java.lang.Iterable values) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, buckets_); + onChanged(); + } else { + bucketsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of buckets.
+     * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + public Builder clearBuckets() { + if (bucketsBuilder_ == null) { + buckets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + bucketsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of buckets.
+     * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + public Builder removeBuckets(int index) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.remove(index); + onChanged(); + } else { + bucketsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of buckets.
+     * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + public com.google.logging.v2.LogBucket.Builder getBucketsBuilder(int index) { + return getBucketsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of buckets.
+     * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + public com.google.logging.v2.LogBucketOrBuilder getBucketsOrBuilder(int index) { + if (bucketsBuilder_ == null) { + return buckets_.get(index); + } else { + return bucketsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of buckets.
+     * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + public java.util.List + getBucketsOrBuilderList() { + if (bucketsBuilder_ != null) { + return bucketsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(buckets_); + } + } + /** + * + * + *
+     * A list of buckets.
+     * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + public com.google.logging.v2.LogBucket.Builder addBucketsBuilder() { + return getBucketsFieldBuilder() + .addBuilder(com.google.logging.v2.LogBucket.getDefaultInstance()); + } + /** + * + * + *
+     * A list of buckets.
+     * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + public com.google.logging.v2.LogBucket.Builder addBucketsBuilder(int index) { + return getBucketsFieldBuilder() + .addBuilder(index, com.google.logging.v2.LogBucket.getDefaultInstance()); + } + /** + * + * + *
+     * A list of buckets.
+     * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + public java.util.List getBucketsBuilderList() { + return getBucketsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.logging.v2.LogBucket, + com.google.logging.v2.LogBucket.Builder, + com.google.logging.v2.LogBucketOrBuilder> + getBucketsFieldBuilder() { + if (bucketsBuilder_ == null) { + bucketsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.logging.v2.LogBucket, + com.google.logging.v2.LogBucket.Builder, + com.google.logging.v2.LogBucketOrBuilder>( + buckets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + buckets_ = null; + } + return bucketsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * If there might be more results than appear in this response, then
+     * `nextPageToken` is included. To get the next set of results, call the same
+     * method again using the value of `nextPageToken` as `pageToken`.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If there might be more results than appear in this response, then
+     * `nextPageToken` is included. To get the next set of results, call the same
+     * method again using the value of `nextPageToken` as `pageToken`.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If there might be more results than appear in this response, then
+     * `nextPageToken` is included. To get the next set of results, call the same
+     * method again using the value of `nextPageToken` as `pageToken`.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If there might be more results than appear in this response, then
+     * `nextPageToken` is included. To get the next set of results, call the same
+     * method again using the value of `nextPageToken` as `pageToken`.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * If there might be more results than appear in this response, then
+     * `nextPageToken` is included. To get the next set of results, call the same
+     * method again using the value of `nextPageToken` as `pageToken`.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.logging.v2.ListBucketsResponse) + } + + // @@protoc_insertion_point(class_scope:google.logging.v2.ListBucketsResponse) + private static final com.google.logging.v2.ListBucketsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.logging.v2.ListBucketsResponse(); + } + + public static com.google.logging.v2.ListBucketsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBucketsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListBucketsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.logging.v2.ListBucketsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsResponseOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsResponseOrBuilder.java new file mode 100644 index 000000000..2133deb62 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsResponseOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/logging/v2/logging_config.proto + +package com.google.logging.v2; + +public interface ListBucketsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.logging.v2.ListBucketsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of buckets.
+   * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + java.util.List getBucketsList(); + /** + * + * + *
+   * A list of buckets.
+   * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + com.google.logging.v2.LogBucket getBuckets(int index); + /** + * + * + *
+   * A list of buckets.
+   * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + int getBucketsCount(); + /** + * + * + *
+   * A list of buckets.
+   * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + java.util.List getBucketsOrBuilderList(); + /** + * + * + *
+   * A list of buckets.
+   * 
+ * + * repeated .google.logging.v2.LogBucket buckets = 1; + */ + com.google.logging.v2.LogBucketOrBuilder getBucketsOrBuilder(int index); + + /** + * + * + *
+   * If there might be more results than appear in this response, then
+   * `nextPageToken` is included. To get the next set of results, call the same
+   * method again using the value of `nextPageToken` as `pageToken`.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * If there might be more results than appear in this response, then
+   * `nextPageToken` is included. To get the next set of results, call the same
+   * method again using the value of `nextPageToken` as `pageToken`.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsRequest.java index cbed3c001..931918ec7 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsRequest.java @@ -143,6 +143,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -171,6 +172,7 @@ public java.lang.String getParent() { * * @return The bytes for parent. */ + @java.lang.Override public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -195,10 +197,11 @@ public com.google.protobuf.ByteString getParentBytes() { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ + @java.lang.Override public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -220,10 +223,11 @@ public java.lang.String getPageToken() { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ + @java.lang.Override public com.google.protobuf.ByteString getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -247,10 +251,11 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * response indicates that more results might be available. * * - * int32 page_size = 3; + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } @@ -749,7 +754,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -774,7 +779,7 @@ public java.lang.String getPageToken() { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ @@ -799,7 +804,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The pageToken to set. * @return This builder for chaining. @@ -823,7 +828,7 @@ public Builder setPageToken(java.lang.String value) { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -843,7 +848,7 @@ public Builder clearPageToken() { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for pageToken to set. * @return This builder for chaining. @@ -869,10 +874,11 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { * response indicates that more results might be available. * * - * int32 page_size = 3; + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } @@ -885,7 +891,7 @@ public int getPageSize() { * response indicates that more results might be available. * * - * int32 page_size = 3; + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The pageSize to set. * @return This builder for chaining. @@ -905,7 +911,7 @@ public Builder setPageSize(int value) { * response indicates that more results might be available. * * - * int32 page_size = 3; + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsRequestOrBuilder.java index 2bc5ae78b..3f41330e7 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsRequestOrBuilder.java @@ -70,7 +70,7 @@ public interface ListExclusionsRequestOrBuilder * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -85,7 +85,7 @@ public interface ListExclusionsRequestOrBuilder * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ @@ -100,7 +100,7 @@ public interface ListExclusionsRequestOrBuilder * response indicates that more results might be available. * * - * int32 page_size = 3; + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsResponse.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsResponse.java index cba144bf8..ce68fc44e 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsResponse.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsResponse.java @@ -138,6 +138,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.logging.v2.LogExclusion exclusions = 1; */ + @java.lang.Override public java.util.List getExclusionsList() { return exclusions_; } @@ -150,6 +151,7 @@ public java.util.List getExclusionsList() { * * repeated .google.logging.v2.LogExclusion exclusions = 1; */ + @java.lang.Override public java.util.List getExclusionsOrBuilderList() { return exclusions_; @@ -163,6 +165,7 @@ public java.util.List getExclusionsList() { * * repeated .google.logging.v2.LogExclusion exclusions = 1; */ + @java.lang.Override public int getExclusionsCount() { return exclusions_.size(); } @@ -175,6 +178,7 @@ public int getExclusionsCount() { * * repeated .google.logging.v2.LogExclusion exclusions = 1; */ + @java.lang.Override public com.google.logging.v2.LogExclusion getExclusions(int index) { return exclusions_.get(index); } @@ -187,6 +191,7 @@ public com.google.logging.v2.LogExclusion getExclusions(int index) { * * repeated .google.logging.v2.LogExclusion exclusions = 1; */ + @java.lang.Override public com.google.logging.v2.LogExclusionOrBuilder getExclusionsOrBuilder(int index) { return exclusions_.get(index); } @@ -206,6 +211,7 @@ public com.google.logging.v2.LogExclusionOrBuilder getExclusionsOrBuilder(int in * * @return The nextPageToken. */ + @java.lang.Override public java.lang.String getNextPageToken() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { @@ -230,6 +236,7 @@ public java.lang.String getNextPageToken() { * * @return The bytes for nextPageToken. */ + @java.lang.Override public com.google.protobuf.ByteString getNextPageTokenBytes() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesRequest.java index 445f5cb2e..dfcf2486f 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesRequest.java @@ -38,7 +38,6 @@ private ListLogEntriesRequest(com.google.protobuf.GeneratedMessageV3.Builder } private ListLogEntriesRequest() { - projectIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; resourceNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; filter_ = ""; orderBy_ = ""; @@ -75,16 +74,6 @@ private ListLogEntriesRequest( case 0: done = true; break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - projectIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - projectIds_.add(s); - break; - } case 18: { java.lang.String s = input.readStringRequireUtf8(); @@ -114,9 +103,9 @@ private ListLogEntriesRequest( case 66: { java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { resourceNames_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; + mutable_bitField0_ |= 0x00000001; } resourceNames_.add(s); break; @@ -136,9 +125,6 @@ private ListLogEntriesRequest( throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { - projectIds_ = projectIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { resourceNames_ = resourceNames_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); @@ -161,79 +147,6 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.logging.v2.ListLogEntriesRequest.Builder.class); } - public static final int PROJECT_IDS_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList projectIds_; - /** - * - * - *
-   * Deprecated. Use `resource_names` instead.  One or more project identifiers
-   * or project numbers from which to retrieve log entries.  Example:
-   * `"my-project-1A"`.
-   * 
- * - * repeated string project_ids = 1 [deprecated = true]; - * - * @return A list containing the projectIds. - */ - @java.lang.Deprecated - public com.google.protobuf.ProtocolStringList getProjectIdsList() { - return projectIds_; - } - /** - * - * - *
-   * Deprecated. Use `resource_names` instead.  One or more project identifiers
-   * or project numbers from which to retrieve log entries.  Example:
-   * `"my-project-1A"`.
-   * 
- * - * repeated string project_ids = 1 [deprecated = true]; - * - * @return The count of projectIds. - */ - @java.lang.Deprecated - public int getProjectIdsCount() { - return projectIds_.size(); - } - /** - * - * - *
-   * Deprecated. Use `resource_names` instead.  One or more project identifiers
-   * or project numbers from which to retrieve log entries.  Example:
-   * `"my-project-1A"`.
-   * 
- * - * repeated string project_ids = 1 [deprecated = true]; - * - * @param index The index of the element to return. - * @return The projectIds at the given index. - */ - @java.lang.Deprecated - public java.lang.String getProjectIds(int index) { - return projectIds_.get(index); - } - /** - * - * - *
-   * Deprecated. Use `resource_names` instead.  One or more project identifiers
-   * or project numbers from which to retrieve log entries.  Example:
-   * `"my-project-1A"`.
-   * 
- * - * repeated string project_ids = 1 [deprecated = true]; - * - * @param index The index of the value to return. - * @return The bytes of the projectIds at the given index. - */ - @java.lang.Deprecated - public com.google.protobuf.ByteString getProjectIdsBytes(int index) { - return projectIds_.getByteString(index); - } - public static final int RESOURCE_NAMES_FIELD_NUMBER = 8; private com.google.protobuf.LazyStringList resourceNames_; /** @@ -334,7 +247,7 @@ public com.google.protobuf.ByteString getResourceNamesBytes(int index) { * *
    * Optional. A filter that chooses which log entries to return.  See [Advanced
-   * Logs Queries](/logging/docs/view/advanced-queries).  Only log entries that
+   * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries).  Only log entries that
    * match the filter are returned.  An empty filter matches all log entries in
    * the resources listed in `resource_names`. Referencing a parent resource
    * that is not listed in `resource_names` will cause the filter to return no
@@ -342,10 +255,11 @@ public com.google.protobuf.ByteString getResourceNamesBytes(int index) {
    * The maximum length of the filter is 20000 characters.
    * 
* - * string filter = 2; + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The filter. */ + @java.lang.Override public java.lang.String getFilter() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { @@ -362,7 +276,7 @@ public java.lang.String getFilter() { * *
    * Optional. A filter that chooses which log entries to return.  See [Advanced
-   * Logs Queries](/logging/docs/view/advanced-queries).  Only log entries that
+   * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries).  Only log entries that
    * match the filter are returned.  An empty filter matches all log entries in
    * the resources listed in `resource_names`. Referencing a parent resource
    * that is not listed in `resource_names` will cause the filter to return no
@@ -370,10 +284,11 @@ public java.lang.String getFilter() {
    * The maximum length of the filter is 20000 characters.
    * 
* - * string filter = 2; + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for filter. */ + @java.lang.Override public com.google.protobuf.ByteString getFilterBytes() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { @@ -400,10 +315,11 @@ public com.google.protobuf.ByteString getFilterBytes() { * timestamps are returned in order of their `insert_id` values. * * - * string order_by = 3; + * string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The orderBy. */ + @java.lang.Override public java.lang.String getOrderBy() { java.lang.Object ref = orderBy_; if (ref instanceof java.lang.String) { @@ -427,10 +343,11 @@ public java.lang.String getOrderBy() { * timestamps are returned in order of their `insert_id` values. * * - * string order_by = 3; + * string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for orderBy. */ + @java.lang.Override public com.google.protobuf.ByteString getOrderByBytes() { java.lang.Object ref = orderBy_; if (ref instanceof java.lang.String) { @@ -454,10 +371,11 @@ public com.google.protobuf.ByteString getOrderByBytes() { * response indicates that more results might be available. * * - * int32 page_size = 4; + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } @@ -474,10 +392,11 @@ public int getPageSize() { * parameters should be identical to those in the previous call. * * - * string page_token = 5; + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ + @java.lang.Override public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -499,10 +418,11 @@ public java.lang.String getPageToken() { * parameters should be identical to those in the previous call. * * - * string page_token = 5; + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ + @java.lang.Override public com.google.protobuf.ByteString getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -529,9 +449,6 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < projectIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectIds_.getRaw(i)); - } if (!getFilterBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); } @@ -556,14 +473,6 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - { - int dataSize = 0; - for (int i = 0; i < projectIds_.size(); i++) { - dataSize += computeStringSizeNoTag(projectIds_.getRaw(i)); - } - size += dataSize; - size += 1 * getProjectIdsList().size(); - } if (!getFilterBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); } @@ -600,7 +509,6 @@ public boolean equals(final java.lang.Object obj) { com.google.logging.v2.ListLogEntriesRequest other = (com.google.logging.v2.ListLogEntriesRequest) obj; - if (!getProjectIdsList().equals(other.getProjectIdsList())) return false; if (!getResourceNamesList().equals(other.getResourceNamesList())) return false; if (!getFilter().equals(other.getFilter())) return false; if (!getOrderBy().equals(other.getOrderBy())) return false; @@ -617,10 +525,6 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getProjectIdsCount() > 0) { - hash = (37 * hash) + PROJECT_IDS_FIELD_NUMBER; - hash = (53 * hash) + getProjectIdsList().hashCode(); - } if (getResourceNamesCount() > 0) { hash = (37 * hash) + RESOURCE_NAMES_FIELD_NUMBER; hash = (53 * hash) + getResourceNamesList().hashCode(); @@ -778,10 +682,8 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - projectIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); resourceNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); filter_ = ""; orderBy_ = ""; @@ -819,13 +721,8 @@ public com.google.logging.v2.ListLogEntriesRequest buildPartial() { new com.google.logging.v2.ListLogEntriesRequest(this); int from_bitField0_ = bitField0_; if (((bitField0_ & 0x00000001) != 0)) { - projectIds_ = projectIds_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.projectIds_ = projectIds_; - if (((bitField0_ & 0x00000002) != 0)) { resourceNames_ = resourceNames_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); } result.resourceNames_ = resourceNames_; result.filter_ = filter_; @@ -881,20 +778,10 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.logging.v2.ListLogEntriesRequest other) { if (other == com.google.logging.v2.ListLogEntriesRequest.getDefaultInstance()) return this; - if (!other.projectIds_.isEmpty()) { - if (projectIds_.isEmpty()) { - projectIds_ = other.projectIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureProjectIdsIsMutable(); - projectIds_.addAll(other.projectIds_); - } - onChanged(); - } if (!other.resourceNames_.isEmpty()) { if (resourceNames_.isEmpty()) { resourceNames_ = other.resourceNames_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); } else { ensureResourceNamesIsMutable(); resourceNames_.addAll(other.resourceNames_); @@ -947,208 +834,13 @@ public Builder mergeFrom( private int bitField0_; - private com.google.protobuf.LazyStringList projectIds_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureProjectIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - projectIds_ = new com.google.protobuf.LazyStringArrayList(projectIds_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Deprecated. Use `resource_names` instead.  One or more project identifiers
-     * or project numbers from which to retrieve log entries.  Example:
-     * `"my-project-1A"`.
-     * 
- * - * repeated string project_ids = 1 [deprecated = true]; - * - * @return A list containing the projectIds. - */ - @java.lang.Deprecated - public com.google.protobuf.ProtocolStringList getProjectIdsList() { - return projectIds_.getUnmodifiableView(); - } - /** - * - * - *
-     * Deprecated. Use `resource_names` instead.  One or more project identifiers
-     * or project numbers from which to retrieve log entries.  Example:
-     * `"my-project-1A"`.
-     * 
- * - * repeated string project_ids = 1 [deprecated = true]; - * - * @return The count of projectIds. - */ - @java.lang.Deprecated - public int getProjectIdsCount() { - return projectIds_.size(); - } - /** - * - * - *
-     * Deprecated. Use `resource_names` instead.  One or more project identifiers
-     * or project numbers from which to retrieve log entries.  Example:
-     * `"my-project-1A"`.
-     * 
- * - * repeated string project_ids = 1 [deprecated = true]; - * - * @param index The index of the element to return. - * @return The projectIds at the given index. - */ - @java.lang.Deprecated - public java.lang.String getProjectIds(int index) { - return projectIds_.get(index); - } - /** - * - * - *
-     * Deprecated. Use `resource_names` instead.  One or more project identifiers
-     * or project numbers from which to retrieve log entries.  Example:
-     * `"my-project-1A"`.
-     * 
- * - * repeated string project_ids = 1 [deprecated = true]; - * - * @param index The index of the value to return. - * @return The bytes of the projectIds at the given index. - */ - @java.lang.Deprecated - public com.google.protobuf.ByteString getProjectIdsBytes(int index) { - return projectIds_.getByteString(index); - } - /** - * - * - *
-     * Deprecated. Use `resource_names` instead.  One or more project identifiers
-     * or project numbers from which to retrieve log entries.  Example:
-     * `"my-project-1A"`.
-     * 
- * - * repeated string project_ids = 1 [deprecated = true]; - * - * @param index The index to set the value at. - * @param value The projectIds to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder setProjectIds(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureProjectIdsIsMutable(); - projectIds_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Deprecated. Use `resource_names` instead.  One or more project identifiers
-     * or project numbers from which to retrieve log entries.  Example:
-     * `"my-project-1A"`.
-     * 
- * - * repeated string project_ids = 1 [deprecated = true]; - * - * @param value The projectIds to add. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder addProjectIds(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureProjectIdsIsMutable(); - projectIds_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Deprecated. Use `resource_names` instead.  One or more project identifiers
-     * or project numbers from which to retrieve log entries.  Example:
-     * `"my-project-1A"`.
-     * 
- * - * repeated string project_ids = 1 [deprecated = true]; - * - * @param values The projectIds to add. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder addAllProjectIds(java.lang.Iterable values) { - ensureProjectIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, projectIds_); - onChanged(); - return this; - } - /** - * - * - *
-     * Deprecated. Use `resource_names` instead.  One or more project identifiers
-     * or project numbers from which to retrieve log entries.  Example:
-     * `"my-project-1A"`.
-     * 
- * - * repeated string project_ids = 1 [deprecated = true]; - * - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder clearProjectIds() { - projectIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Deprecated. Use `resource_names` instead.  One or more project identifiers
-     * or project numbers from which to retrieve log entries.  Example:
-     * `"my-project-1A"`.
-     * 
- * - * repeated string project_ids = 1 [deprecated = true]; - * - * @param value The bytes of the projectIds to add. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder addProjectIdsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureProjectIdsIsMutable(); - projectIds_.add(value); - onChanged(); - return this; - } - private com.google.protobuf.LazyStringList resourceNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureResourceNamesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!((bitField0_ & 0x00000001) != 0)) { resourceNames_ = new com.google.protobuf.LazyStringArrayList(resourceNames_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; } } /** @@ -1347,7 +1039,7 @@ public Builder addAllResourceNames(java.lang.Iterable values) */ public Builder clearResourceNames() { resourceNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -1388,7 +1080,7 @@ public Builder addResourceNamesBytes(com.google.protobuf.ByteString value) { * *
      * Optional. A filter that chooses which log entries to return.  See [Advanced
-     * Logs Queries](/logging/docs/view/advanced-queries).  Only log entries that
+     * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries).  Only log entries that
      * match the filter are returned.  An empty filter matches all log entries in
      * the resources listed in `resource_names`. Referencing a parent resource
      * that is not listed in `resource_names` will cause the filter to return no
@@ -1396,7 +1088,7 @@ public Builder addResourceNamesBytes(com.google.protobuf.ByteString value) {
      * The maximum length of the filter is 20000 characters.
      * 
* - * string filter = 2; + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The filter. */ @@ -1416,7 +1108,7 @@ public java.lang.String getFilter() { * *
      * Optional. A filter that chooses which log entries to return.  See [Advanced
-     * Logs Queries](/logging/docs/view/advanced-queries).  Only log entries that
+     * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries).  Only log entries that
      * match the filter are returned.  An empty filter matches all log entries in
      * the resources listed in `resource_names`. Referencing a parent resource
      * that is not listed in `resource_names` will cause the filter to return no
@@ -1424,7 +1116,7 @@ public java.lang.String getFilter() {
      * The maximum length of the filter is 20000 characters.
      * 
* - * string filter = 2; + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for filter. */ @@ -1444,7 +1136,7 @@ public com.google.protobuf.ByteString getFilterBytes() { * *
      * Optional. A filter that chooses which log entries to return.  See [Advanced
-     * Logs Queries](/logging/docs/view/advanced-queries).  Only log entries that
+     * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries).  Only log entries that
      * match the filter are returned.  An empty filter matches all log entries in
      * the resources listed in `resource_names`. Referencing a parent resource
      * that is not listed in `resource_names` will cause the filter to return no
@@ -1452,7 +1144,7 @@ public com.google.protobuf.ByteString getFilterBytes() {
      * The maximum length of the filter is 20000 characters.
      * 
* - * string filter = 2; + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The filter to set. * @return This builder for chaining. @@ -1471,7 +1163,7 @@ public Builder setFilter(java.lang.String value) { * *
      * Optional. A filter that chooses which log entries to return.  See [Advanced
-     * Logs Queries](/logging/docs/view/advanced-queries).  Only log entries that
+     * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries).  Only log entries that
      * match the filter are returned.  An empty filter matches all log entries in
      * the resources listed in `resource_names`. Referencing a parent resource
      * that is not listed in `resource_names` will cause the filter to return no
@@ -1479,7 +1171,7 @@ public Builder setFilter(java.lang.String value) {
      * The maximum length of the filter is 20000 characters.
      * 
* - * string filter = 2; + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1494,7 +1186,7 @@ public Builder clearFilter() { * *
      * Optional. A filter that chooses which log entries to return.  See [Advanced
-     * Logs Queries](/logging/docs/view/advanced-queries).  Only log entries that
+     * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries).  Only log entries that
      * match the filter are returned.  An empty filter matches all log entries in
      * the resources listed in `resource_names`. Referencing a parent resource
      * that is not listed in `resource_names` will cause the filter to return no
@@ -1502,7 +1194,7 @@ public Builder clearFilter() {
      * The maximum length of the filter is 20000 characters.
      * 
* - * string filter = 2; + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for filter to set. * @return This builder for chaining. @@ -1531,7 +1223,7 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { * timestamps are returned in order of their `insert_id` values. * * - * string order_by = 3; + * string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The orderBy. */ @@ -1558,7 +1250,7 @@ public java.lang.String getOrderBy() { * timestamps are returned in order of their `insert_id` values. * * - * string order_by = 3; + * string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for orderBy. */ @@ -1585,7 +1277,7 @@ public com.google.protobuf.ByteString getOrderByBytes() { * timestamps are returned in order of their `insert_id` values. * * - * string order_by = 3; + * string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The orderBy to set. * @return This builder for chaining. @@ -1611,7 +1303,7 @@ public Builder setOrderBy(java.lang.String value) { * timestamps are returned in order of their `insert_id` values. * * - * string order_by = 3; + * string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1633,7 +1325,7 @@ public Builder clearOrderBy() { * timestamps are returned in order of their `insert_id` values. * * - * string order_by = 3; + * string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for orderBy to set. * @return This builder for chaining. @@ -1659,10 +1351,11 @@ public Builder setOrderByBytes(com.google.protobuf.ByteString value) { * response indicates that more results might be available. * * - * int32 page_size = 4; + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } @@ -1675,7 +1368,7 @@ public int getPageSize() { * response indicates that more results might be available. * * - * int32 page_size = 4; + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The pageSize to set. * @return This builder for chaining. @@ -1695,7 +1388,7 @@ public Builder setPageSize(int value) { * response indicates that more results might be available. * * - * int32 page_size = 4; + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1717,7 +1410,7 @@ public Builder clearPageSize() { * parameters should be identical to those in the previous call. * * - * string page_token = 5; + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -1742,7 +1435,7 @@ public java.lang.String getPageToken() { * parameters should be identical to those in the previous call. * * - * string page_token = 5; + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ @@ -1767,7 +1460,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * parameters should be identical to those in the previous call. * * - * string page_token = 5; + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The pageToken to set. * @return This builder for chaining. @@ -1791,7 +1484,7 @@ public Builder setPageToken(java.lang.String value) { * parameters should be identical to those in the previous call. * * - * string page_token = 5; + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1811,7 +1504,7 @@ public Builder clearPageToken() { * parameters should be identical to those in the previous call. * * - * string page_token = 5; + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for pageToken to set. * @return This builder for chaining. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesRequestOrBuilder.java index c067f3206..6f23621ec 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesRequestOrBuilder.java @@ -23,69 +23,6 @@ public interface ListLogEntriesRequestOrBuilder // @@protoc_insertion_point(interface_extends:google.logging.v2.ListLogEntriesRequest) com.google.protobuf.MessageOrBuilder { - /** - * - * - *
-   * Deprecated. Use `resource_names` instead.  One or more project identifiers
-   * or project numbers from which to retrieve log entries.  Example:
-   * `"my-project-1A"`.
-   * 
- * - * repeated string project_ids = 1 [deprecated = true]; - * - * @return A list containing the projectIds. - */ - @java.lang.Deprecated - java.util.List getProjectIdsList(); - /** - * - * - *
-   * Deprecated. Use `resource_names` instead.  One or more project identifiers
-   * or project numbers from which to retrieve log entries.  Example:
-   * `"my-project-1A"`.
-   * 
- * - * repeated string project_ids = 1 [deprecated = true]; - * - * @return The count of projectIds. - */ - @java.lang.Deprecated - int getProjectIdsCount(); - /** - * - * - *
-   * Deprecated. Use `resource_names` instead.  One or more project identifiers
-   * or project numbers from which to retrieve log entries.  Example:
-   * `"my-project-1A"`.
-   * 
- * - * repeated string project_ids = 1 [deprecated = true]; - * - * @param index The index of the element to return. - * @return The projectIds at the given index. - */ - @java.lang.Deprecated - java.lang.String getProjectIds(int index); - /** - * - * - *
-   * Deprecated. Use `resource_names` instead.  One or more project identifiers
-   * or project numbers from which to retrieve log entries.  Example:
-   * `"my-project-1A"`.
-   * 
- * - * repeated string project_ids = 1 [deprecated = true]; - * - * @param index The index of the value to return. - * @return The bytes of the projectIds at the given index. - */ - @java.lang.Deprecated - com.google.protobuf.ByteString getProjectIdsBytes(int index); - /** * * @@ -174,7 +111,7 @@ public interface ListLogEntriesRequestOrBuilder * *
    * Optional. A filter that chooses which log entries to return.  See [Advanced
-   * Logs Queries](/logging/docs/view/advanced-queries).  Only log entries that
+   * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries).  Only log entries that
    * match the filter are returned.  An empty filter matches all log entries in
    * the resources listed in `resource_names`. Referencing a parent resource
    * that is not listed in `resource_names` will cause the filter to return no
@@ -182,7 +119,7 @@ public interface ListLogEntriesRequestOrBuilder
    * The maximum length of the filter is 20000 characters.
    * 
* - * string filter = 2; + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The filter. */ @@ -192,7 +129,7 @@ public interface ListLogEntriesRequestOrBuilder * *
    * Optional. A filter that chooses which log entries to return.  See [Advanced
-   * Logs Queries](/logging/docs/view/advanced-queries).  Only log entries that
+   * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries).  Only log entries that
    * match the filter are returned.  An empty filter matches all log entries in
    * the resources listed in `resource_names`. Referencing a parent resource
    * that is not listed in `resource_names` will cause the filter to return no
@@ -200,7 +137,7 @@ public interface ListLogEntriesRequestOrBuilder
    * The maximum length of the filter is 20000 characters.
    * 
* - * string filter = 2; + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for filter. */ @@ -218,7 +155,7 @@ public interface ListLogEntriesRequestOrBuilder * timestamps are returned in order of their `insert_id` values. * * - * string order_by = 3; + * string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The orderBy. */ @@ -235,7 +172,7 @@ public interface ListLogEntriesRequestOrBuilder * timestamps are returned in order of their `insert_id` values. * * - * string order_by = 3; + * string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for orderBy. */ @@ -250,7 +187,7 @@ public interface ListLogEntriesRequestOrBuilder * response indicates that more results might be available. * * - * int32 page_size = 4; + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ @@ -266,7 +203,7 @@ public interface ListLogEntriesRequestOrBuilder * parameters should be identical to those in the previous call. * * - * string page_token = 5; + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -281,7 +218,7 @@ public interface ListLogEntriesRequestOrBuilder * parameters should be identical to those in the previous call. * * - * string page_token = 5; + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesResponse.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesResponse.java index bf5d307d5..9a7dccf69 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesResponse.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesResponse.java @@ -139,6 +139,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.logging.v2.LogEntry entries = 1; */ + @java.lang.Override public java.util.List getEntriesList() { return entries_; } @@ -153,6 +154,7 @@ public java.util.List getEntriesList() { * * repeated .google.logging.v2.LogEntry entries = 1; */ + @java.lang.Override public java.util.List getEntriesOrBuilderList() { return entries_; @@ -168,6 +170,7 @@ public java.util.List getEntriesList() { * * repeated .google.logging.v2.LogEntry entries = 1; */ + @java.lang.Override public int getEntriesCount() { return entries_.size(); } @@ -182,6 +185,7 @@ public int getEntriesCount() { * * repeated .google.logging.v2.LogEntry entries = 1; */ + @java.lang.Override public com.google.logging.v2.LogEntry getEntries(int index) { return entries_.get(index); } @@ -196,6 +200,7 @@ public com.google.logging.v2.LogEntry getEntries(int index) { * * repeated .google.logging.v2.LogEntry entries = 1; */ + @java.lang.Override public com.google.logging.v2.LogEntryOrBuilder getEntriesOrBuilder(int index) { return entries_.get(index); } @@ -221,6 +226,7 @@ public com.google.logging.v2.LogEntryOrBuilder getEntriesOrBuilder(int index) { * * @return The nextPageToken. */ + @java.lang.Override public java.lang.String getNextPageToken() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { @@ -251,6 +257,7 @@ public java.lang.String getNextPageToken() { * * @return The bytes for nextPageToken. */ + @java.lang.Override public com.google.protobuf.ByteString getNextPageTokenBytes() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsRequest.java index 72635c53f..3a5133289 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsRequest.java @@ -140,6 +140,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -165,6 +166,7 @@ public java.lang.String getParent() { * * @return The bytes for parent. */ + @java.lang.Override public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -189,10 +191,11 @@ public com.google.protobuf.ByteString getParentBytes() { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ + @java.lang.Override public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -214,10 +217,11 @@ public java.lang.String getPageToken() { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ + @java.lang.Override public com.google.protobuf.ByteString getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -241,10 +245,11 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * response indicates that more results might be available. * * - * int32 page_size = 3; + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } @@ -728,7 +733,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -753,7 +758,7 @@ public java.lang.String getPageToken() { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ @@ -778,7 +783,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The pageToken to set. * @return This builder for chaining. @@ -802,7 +807,7 @@ public Builder setPageToken(java.lang.String value) { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -822,7 +827,7 @@ public Builder clearPageToken() { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for pageToken to set. * @return This builder for chaining. @@ -848,10 +853,11 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { * response indicates that more results might be available. * * - * int32 page_size = 3; + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } @@ -864,7 +870,7 @@ public int getPageSize() { * response indicates that more results might be available. * * - * int32 page_size = 3; + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The pageSize to set. * @return This builder for chaining. @@ -884,7 +890,7 @@ public Builder setPageSize(int value) { * response indicates that more results might be available. * * - * int32 page_size = 3; + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsRequestOrBuilder.java index 14421f91e..7bc9456dc 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsRequestOrBuilder.java @@ -64,7 +64,7 @@ public interface ListLogMetricsRequestOrBuilder * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -79,7 +79,7 @@ public interface ListLogMetricsRequestOrBuilder * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ @@ -94,7 +94,7 @@ public interface ListLogMetricsRequestOrBuilder * response indicates that more results might be available. * * - * int32 page_size = 3; + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsResponse.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsResponse.java index d1ccd09cf..a01907c89 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsResponse.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsResponse.java @@ -137,6 +137,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.logging.v2.LogMetric metrics = 1; */ + @java.lang.Override public java.util.List getMetricsList() { return metrics_; } @@ -149,6 +150,7 @@ public java.util.List getMetricsList() { * * repeated .google.logging.v2.LogMetric metrics = 1; */ + @java.lang.Override public java.util.List getMetricsOrBuilderList() { return metrics_; @@ -162,6 +164,7 @@ public java.util.List getMetricsList() { * * repeated .google.logging.v2.LogMetric metrics = 1; */ + @java.lang.Override public int getMetricsCount() { return metrics_.size(); } @@ -174,6 +177,7 @@ public int getMetricsCount() { * * repeated .google.logging.v2.LogMetric metrics = 1; */ + @java.lang.Override public com.google.logging.v2.LogMetric getMetrics(int index) { return metrics_.get(index); } @@ -186,6 +190,7 @@ public com.google.logging.v2.LogMetric getMetrics(int index) { * * repeated .google.logging.v2.LogMetric metrics = 1; */ + @java.lang.Override public com.google.logging.v2.LogMetricOrBuilder getMetricsOrBuilder(int index) { return metrics_.get(index); } @@ -205,6 +210,7 @@ public com.google.logging.v2.LogMetricOrBuilder getMetricsOrBuilder(int index) { * * @return The nextPageToken. */ + @java.lang.Override public java.lang.String getNextPageToken() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { @@ -229,6 +235,7 @@ public java.lang.String getNextPageToken() { * * @return The bytes for nextPageToken. */ + @java.lang.Override public com.google.protobuf.ByteString getNextPageTokenBytes() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsRequest.java index 0fafc8d35..5cab84c26 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsRequest.java @@ -137,10 +137,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * "folders/[FOLDER_ID]" * * - * string parent = 1 [(.google.api.resource_reference) = { ... } + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -163,10 +166,13 @@ public java.lang.String getParent() { * "folders/[FOLDER_ID]" * * - * string parent = 1 [(.google.api.resource_reference) = { ... } + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ + @java.lang.Override public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -190,10 +196,11 @@ public com.google.protobuf.ByteString getParentBytes() { * response indicates that more results might be available. * * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } @@ -210,10 +217,11 @@ public int getPageSize() { * parameters should be identical to those in the previous call. * * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ + @java.lang.Override public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -235,10 +243,11 @@ public java.lang.String getPageToken() { * parameters should be identical to those in the previous call. * * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ + @java.lang.Override public com.google.protobuf.ByteString getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -608,7 +617,9 @@ public Builder mergeFrom( * "folders/[FOLDER_ID]" * * - * string parent = 1 [(.google.api.resource_reference) = { ... } + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -634,7 +645,9 @@ public java.lang.String getParent() { * "folders/[FOLDER_ID]" * * - * string parent = 1 [(.google.api.resource_reference) = { ... } + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -660,7 +673,9 @@ public com.google.protobuf.ByteString getParentBytes() { * "folders/[FOLDER_ID]" * * - * string parent = 1 [(.google.api.resource_reference) = { ... } + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The parent to set. * @return This builder for chaining. @@ -685,7 +700,9 @@ public Builder setParent(java.lang.String value) { * "folders/[FOLDER_ID]" * * - * string parent = 1 [(.google.api.resource_reference) = { ... } + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -706,7 +723,9 @@ public Builder clearParent() { * "folders/[FOLDER_ID]" * * - * string parent = 1 [(.google.api.resource_reference) = { ... } + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for parent to set. * @return This builder for chaining. @@ -732,10 +751,11 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * response indicates that more results might be available. * * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } @@ -748,7 +768,7 @@ public int getPageSize() { * response indicates that more results might be available. * * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The pageSize to set. * @return This builder for chaining. @@ -768,7 +788,7 @@ public Builder setPageSize(int value) { * response indicates that more results might be available. * * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -790,7 +810,7 @@ public Builder clearPageSize() { * parameters should be identical to those in the previous call. * * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -815,7 +835,7 @@ public java.lang.String getPageToken() { * parameters should be identical to those in the previous call. * * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ @@ -840,7 +860,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * parameters should be identical to those in the previous call. * * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The pageToken to set. * @return This builder for chaining. @@ -864,7 +884,7 @@ public Builder setPageToken(java.lang.String value) { * parameters should be identical to those in the previous call. * * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -884,7 +904,7 @@ public Builder clearPageToken() { * parameters should be identical to those in the previous call. * * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for pageToken to set. * @return This builder for chaining. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsRequestOrBuilder.java index 7d0c51c5c..bee958f74 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsRequestOrBuilder.java @@ -34,7 +34,9 @@ public interface ListLogsRequestOrBuilder * "folders/[FOLDER_ID]" * * - * string parent = 1 [(.google.api.resource_reference) = { ... } + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -50,7 +52,9 @@ public interface ListLogsRequestOrBuilder * "folders/[FOLDER_ID]" * * - * string parent = 1 [(.google.api.resource_reference) = { ... } + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -65,7 +69,7 @@ public interface ListLogsRequestOrBuilder * response indicates that more results might be available. * * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ @@ -81,7 +85,7 @@ public interface ListLogsRequestOrBuilder * parameters should be identical to those in the previous call. * * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -96,7 +100,7 @@ public interface ListLogsRequestOrBuilder * parameters should be identical to those in the previous call. * * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsResponse.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsResponse.java index 917b73d63..cc8d81699 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsResponse.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsResponse.java @@ -210,6 +210,7 @@ public com.google.protobuf.ByteString getLogNamesBytes(int index) { * * @return The nextPageToken. */ + @java.lang.Override public java.lang.String getNextPageToken() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { @@ -234,6 +235,7 @@ public java.lang.String getNextPageToken() { * * @return The bytes for nextPageToken. */ + @java.lang.Override public com.google.protobuf.ByteString getNextPageTokenBytes() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsRequest.java index 691cf0298..1f6827f5b 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsRequest.java @@ -129,10 +129,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * response indicates that more results might be available. * * - * int32 page_size = 1; + * int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } @@ -149,10 +150,11 @@ public int getPageSize() { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ + @java.lang.Override public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -174,10 +176,11 @@ public java.lang.String getPageToken() { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ + @java.lang.Override public com.google.protobuf.ByteString getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -537,10 +540,11 @@ public Builder mergeFrom( * response indicates that more results might be available. * * - * int32 page_size = 1; + * int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } @@ -553,7 +557,7 @@ public int getPageSize() { * response indicates that more results might be available. * * - * int32 page_size = 1; + * int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The pageSize to set. * @return This builder for chaining. @@ -573,7 +577,7 @@ public Builder setPageSize(int value) { * response indicates that more results might be available. * * - * int32 page_size = 1; + * int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -595,7 +599,7 @@ public Builder clearPageSize() { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -620,7 +624,7 @@ public java.lang.String getPageToken() { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ @@ -645,7 +649,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The pageToken to set. * @return This builder for chaining. @@ -669,7 +673,7 @@ public Builder setPageToken(java.lang.String value) { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -689,7 +693,7 @@ public Builder clearPageToken() { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for pageToken to set. * @return This builder for chaining. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsRequestOrBuilder.java index 649f4f49a..193bf02e2 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsRequestOrBuilder.java @@ -32,7 +32,7 @@ public interface ListMonitoredResourceDescriptorsRequestOrBuilder * response indicates that more results might be available. * * - * int32 page_size = 1; + * int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ @@ -48,7 +48,7 @@ public interface ListMonitoredResourceDescriptorsRequestOrBuilder * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -63,7 +63,7 @@ public interface ListMonitoredResourceDescriptorsRequestOrBuilder * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsResponse.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsResponse.java index c90883612..81d08f2e5 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsResponse.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsResponse.java @@ -141,6 +141,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.api.MonitoredResourceDescriptor resource_descriptors = 1; */ + @java.lang.Override public java.util.List getResourceDescriptorsList() { return resourceDescriptors_; } @@ -153,6 +154,7 @@ public java.util.List getResourceDes * * repeated .google.api.MonitoredResourceDescriptor resource_descriptors = 1; */ + @java.lang.Override public java.util.List getResourceDescriptorsOrBuilderList() { return resourceDescriptors_; @@ -166,6 +168,7 @@ public java.util.List getResourceDes * * repeated .google.api.MonitoredResourceDescriptor resource_descriptors = 1; */ + @java.lang.Override public int getResourceDescriptorsCount() { return resourceDescriptors_.size(); } @@ -178,6 +181,7 @@ public int getResourceDescriptorsCount() { * * repeated .google.api.MonitoredResourceDescriptor resource_descriptors = 1; */ + @java.lang.Override public com.google.api.MonitoredResourceDescriptor getResourceDescriptors(int index) { return resourceDescriptors_.get(index); } @@ -190,6 +194,7 @@ public com.google.api.MonitoredResourceDescriptor getResourceDescriptors(int ind * * repeated .google.api.MonitoredResourceDescriptor resource_descriptors = 1; */ + @java.lang.Override public com.google.api.MonitoredResourceDescriptorOrBuilder getResourceDescriptorsOrBuilder( int index) { return resourceDescriptors_.get(index); @@ -210,6 +215,7 @@ public com.google.api.MonitoredResourceDescriptorOrBuilder getResourceDescriptor * * @return The nextPageToken. */ + @java.lang.Override public java.lang.String getNextPageToken() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { @@ -234,6 +240,7 @@ public java.lang.String getNextPageToken() { * * @return The bytes for nextPageToken. */ + @java.lang.Override public com.google.protobuf.ByteString getNextPageTokenBytes() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksRequest.java index 058865e97..2e22b8c8f 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksRequest.java @@ -143,6 +143,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -171,6 +172,7 @@ public java.lang.String getParent() { * * @return The bytes for parent. */ + @java.lang.Override public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -195,10 +197,11 @@ public com.google.protobuf.ByteString getParentBytes() { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ + @java.lang.Override public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -220,10 +223,11 @@ public java.lang.String getPageToken() { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ + @java.lang.Override public com.google.protobuf.ByteString getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -247,10 +251,11 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * response indicates that more results might be available. * * - * int32 page_size = 3; + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } @@ -748,7 +753,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -773,7 +778,7 @@ public java.lang.String getPageToken() { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ @@ -798,7 +803,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The pageToken to set. * @return This builder for chaining. @@ -822,7 +827,7 @@ public Builder setPageToken(java.lang.String value) { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -842,7 +847,7 @@ public Builder clearPageToken() { * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for pageToken to set. * @return This builder for chaining. @@ -868,10 +873,11 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { * response indicates that more results might be available. * * - * int32 page_size = 3; + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } @@ -884,7 +890,7 @@ public int getPageSize() { * response indicates that more results might be available. * * - * int32 page_size = 3; + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The pageSize to set. * @return This builder for chaining. @@ -904,7 +910,7 @@ public Builder setPageSize(int value) { * response indicates that more results might be available. * * - * int32 page_size = 3; + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksRequestOrBuilder.java index 8db43b5be..d59e4ff79 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksRequestOrBuilder.java @@ -70,7 +70,7 @@ public interface ListSinksRequestOrBuilder * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -85,7 +85,7 @@ public interface ListSinksRequestOrBuilder * parameters should be identical to those in the previous call. * * - * string page_token = 2; + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ @@ -100,7 +100,7 @@ public interface ListSinksRequestOrBuilder * response indicates that more results might be available. * * - * int32 page_size = 3; + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksResponse.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksResponse.java index b31651c15..dcbe6479d 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksResponse.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksResponse.java @@ -137,6 +137,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.logging.v2.LogSink sinks = 1; */ + @java.lang.Override public java.util.List getSinksList() { return sinks_; } @@ -149,6 +150,7 @@ public java.util.List getSinksList() { * * repeated .google.logging.v2.LogSink sinks = 1; */ + @java.lang.Override public java.util.List getSinksOrBuilderList() { return sinks_; } @@ -161,6 +163,7 @@ public java.util.List getSinks * * repeated .google.logging.v2.LogSink sinks = 1; */ + @java.lang.Override public int getSinksCount() { return sinks_.size(); } @@ -173,6 +176,7 @@ public int getSinksCount() { * * repeated .google.logging.v2.LogSink sinks = 1; */ + @java.lang.Override public com.google.logging.v2.LogSink getSinks(int index) { return sinks_.get(index); } @@ -185,6 +189,7 @@ public com.google.logging.v2.LogSink getSinks(int index) { * * repeated .google.logging.v2.LogSink sinks = 1; */ + @java.lang.Override public com.google.logging.v2.LogSinkOrBuilder getSinksOrBuilder(int index) { return sinks_.get(index); } @@ -204,6 +209,7 @@ public com.google.logging.v2.LogSinkOrBuilder getSinksOrBuilder(int index) { * * @return The nextPageToken. */ + @java.lang.Override public java.lang.String getNextPageToken() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { @@ -228,6 +234,7 @@ public java.lang.String getNextPageToken() { * * @return The bytes for nextPageToken. */ + @java.lang.Override public com.google.protobuf.ByteString getNextPageTokenBytes() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ProjectLogName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LocationName.java similarity index 63% rename from proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ProjectLogName.java rename to proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LocationName.java index 7b0ed5336..b4ab6eccd 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ProjectLogName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LocationName.java @@ -17,6 +17,7 @@ package com.google.logging.v2; import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; import java.util.ArrayList; @@ -25,22 +26,22 @@ /** AUTO-GENERATED DOCUMENTATION AND CLASS */ @javax.annotation.Generated("by GAPIC protoc plugin") -public class ProjectLogName extends LogName { +public class LocationName implements ResourceName { private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/logs/{log}"); + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); private volatile Map fieldValuesMap; private final String project; - private final String log; + private final String location; public String getProject() { return project; } - public String getLog() { - return log; + public String getLocation() { + return location; } public static Builder newBuilder() { @@ -51,40 +52,40 @@ public Builder toBuilder() { return new Builder(this); } - private ProjectLogName(Builder builder) { + private LocationName(Builder builder) { project = Preconditions.checkNotNull(builder.getProject()); - log = Preconditions.checkNotNull(builder.getLog()); + location = Preconditions.checkNotNull(builder.getLocation()); } - public static ProjectLogName of(String project, String log) { - return newBuilder().setProject(project).setLog(log).build(); + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); } - public static String format(String project, String log) { - return newBuilder().setProject(project).setLog(log).build().toString(); + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); } - public static ProjectLogName parse(String formattedString) { + public static LocationName parse(String formattedString) { if (formattedString.isEmpty()) { return null; } Map matchMap = PATH_TEMPLATE.validatedMatch( - formattedString, "ProjectLogName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("log")); + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); } - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); for (String formattedString : formattedStrings) { list.add(parse(formattedString)); } return list; } - public static List toStringList(List values) { + public static List toStringList(List values) { List list = new ArrayList(values.size()); - for (ProjectLogName value : values) { + for (LocationName value : values) { if (value == null) { list.add(""); } else { @@ -104,7 +105,7 @@ public Map getFieldValuesMap() { if (fieldValuesMap == null) { ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); fieldMapBuilder.put("project", project); - fieldMapBuilder.put("log", log); + fieldMapBuilder.put("location", location); fieldValuesMap = fieldMapBuilder.build(); } } @@ -118,21 +119,21 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "log", log); + return PATH_TEMPLATE.instantiate("project", project, "location", location); } - /** Builder for ProjectLogName. */ + /** Builder for LocationName. */ public static class Builder { private String project; - private String log; + private String location; public String getProject() { return project; } - public String getLog() { - return log; + public String getLocation() { + return location; } public Builder setProject(String project) { @@ -140,20 +141,20 @@ public Builder setProject(String project) { return this; } - public Builder setLog(String log) { - this.log = log; + public Builder setLocation(String location) { + this.location = location; return this; } private Builder() {} - private Builder(ProjectLogName projectLogName) { - project = projectLogName.project; - log = projectLogName.log; + private Builder(LocationName locationName) { + project = locationName.project; + location = locationName.location; } - public ProjectLogName build() { - return new ProjectLogName(this); + public LocationName build() { + return new LocationName(this); } } @@ -162,9 +163,9 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o instanceof ProjectLogName) { - ProjectLogName that = (ProjectLogName) o; - return (this.project.equals(that.project)) && (this.log.equals(that.log)); + if (o instanceof LocationName) { + LocationName that = (LocationName) o; + return (this.project.equals(that.project)) && (this.location.equals(that.location)); } return false; } @@ -175,7 +176,7 @@ public int hashCode() { h *= 1000003; h ^= project.hashCode(); h *= 1000003; - h ^= log.hashCode(); + h ^= location.hashCode(); return h; } } diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogBucket.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogBucket.java new file mode 100644 index 000000000..578e0d7f3 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogBucket.java @@ -0,0 +1,1730 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/logging/v2/logging_config.proto + +package com.google.logging.v2; + +/** + * + * + *
+ * Describes a repository of logs (Beta).
+ * 
+ * + * Protobuf type {@code google.logging.v2.LogBucket} + */ +public final class LogBucket extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.logging.v2.LogBucket) + LogBucketOrBuilder { + private static final long serialVersionUID = 0L; + // Use LogBucket.newBuilder() to construct. + private LogBucket(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LogBucket() { + name_ = ""; + description_ = ""; + lifecycleState_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LogBucket(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LogBucket( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 88: + { + retentionDays_ = input.readInt32(); + break; + } + case 96: + { + int rawValue = input.readEnum(); + + lifecycleState_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_LogBucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_LogBucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.LogBucket.class, com.google.logging.v2.LogBucket.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The resource name of the bucket.
+   * For example:
+   * "projects/my-project-id/locations/my-location/buckets/my-bucket-id The
+   * supported locations are:
+   *   "global"
+   *   "us-central1"
+   * For the location of `global` it is unspecified where logs are actually
+   * stored.
+   * Once a bucket has been created, the location can not be changed.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the bucket.
+   * For example:
+   * "projects/my-project-id/locations/my-location/buckets/my-bucket-id The
+   * supported locations are:
+   *   "global"
+   *   "us-central1"
+   * For the location of `global` it is unspecified where logs are actually
+   * stored.
+   * Once a bucket has been created, the location can not be changed.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Describes this bucket.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * Describes this bucket.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + 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 CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The creation timestamp of the bucket. This is not set for any of the
+   * default buckets.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The creation timestamp of the bucket. This is not set for any of the
+   * default buckets.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The creation timestamp of the bucket. This is not set for any of the
+   * default buckets.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The last update timestamp of the bucket.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The last update timestamp of the bucket.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The last update timestamp of the bucket.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int RETENTION_DAYS_FIELD_NUMBER = 11; + private int retentionDays_; + /** + * + * + *
+   * Logs will be retained by default for this amount of time, after which they
+   * will automatically be deleted. The minimum retention period is 1 day.
+   * If this value is set to zero at bucket creation time, the default time of
+   * 30 days will be used.
+   * 
+ * + * int32 retention_days = 11; + * + * @return The retentionDays. + */ + @java.lang.Override + public int getRetentionDays() { + return retentionDays_; + } + + public static final int LIFECYCLE_STATE_FIELD_NUMBER = 12; + private int lifecycleState_; + /** + * + * + *
+   * Output only. The bucket lifecycle state.
+   * 
+ * + * + * .google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lifecycleState. + */ + @java.lang.Override + public int getLifecycleStateValue() { + return lifecycleState_; + } + /** + * + * + *
+   * Output only. The bucket lifecycle state.
+   * 
+ * + * + * .google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lifecycleState. + */ + @java.lang.Override + public com.google.logging.v2.LifecycleState getLifecycleState() { + @SuppressWarnings("deprecation") + com.google.logging.v2.LifecycleState result = + com.google.logging.v2.LifecycleState.valueOf(lifecycleState_); + return result == null ? com.google.logging.v2.LifecycleState.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (createTime_ != null) { + output.writeMessage(4, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(5, getUpdateTime()); + } + if (retentionDays_ != 0) { + output.writeInt32(11, retentionDays_); + } + if (lifecycleState_ + != com.google.logging.v2.LifecycleState.LIFECYCLE_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(12, lifecycleState_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); + } + if (retentionDays_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(11, retentionDays_); + } + if (lifecycleState_ + != com.google.logging.v2.LifecycleState.LIFECYCLE_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, lifecycleState_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.logging.v2.LogBucket)) { + return super.equals(obj); + } + com.google.logging.v2.LogBucket other = (com.google.logging.v2.LogBucket) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (getRetentionDays() != other.getRetentionDays()) return false; + if (lifecycleState_ != other.lifecycleState_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + RETENTION_DAYS_FIELD_NUMBER; + hash = (53 * hash) + getRetentionDays(); + hash = (37 * hash) + LIFECYCLE_STATE_FIELD_NUMBER; + hash = (53 * hash) + lifecycleState_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.logging.v2.LogBucket parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.LogBucket parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.logging.v2.LogBucket parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.LogBucket 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.logging.v2.LogBucket parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.LogBucket parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.logging.v2.LogBucket parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.LogBucket parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.logging.v2.LogBucket parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.logging.v2.LogBucket parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.logging.v2.LogBucket parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.LogBucket parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.logging.v2.LogBucket prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Describes a repository of logs (Beta).
+   * 
+ * + * Protobuf type {@code google.logging.v2.LogBucket} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.logging.v2.LogBucket) + com.google.logging.v2.LogBucketOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_LogBucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_LogBucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.LogBucket.class, com.google.logging.v2.LogBucket.Builder.class); + } + + // Construct using com.google.logging.v2.LogBucket.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + description_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + retentionDays_ = 0; + + lifecycleState_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_LogBucket_descriptor; + } + + @java.lang.Override + public com.google.logging.v2.LogBucket getDefaultInstanceForType() { + return com.google.logging.v2.LogBucket.getDefaultInstance(); + } + + @java.lang.Override + public com.google.logging.v2.LogBucket build() { + com.google.logging.v2.LogBucket result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.logging.v2.LogBucket buildPartial() { + com.google.logging.v2.LogBucket result = new com.google.logging.v2.LogBucket(this); + result.name_ = name_; + result.description_ = description_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.retentionDays_ = retentionDays_; + result.lifecycleState_ = lifecycleState_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.logging.v2.LogBucket) { + return mergeFrom((com.google.logging.v2.LogBucket) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.logging.v2.LogBucket other) { + if (other == com.google.logging.v2.LogBucket.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.getRetentionDays() != 0) { + setRetentionDays(other.getRetentionDays()); + } + if (other.lifecycleState_ != 0) { + setLifecycleStateValue(other.getLifecycleStateValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.logging.v2.LogBucket parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.logging.v2.LogBucket) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name of the bucket.
+     * For example:
+     * "projects/my-project-id/locations/my-location/buckets/my-bucket-id The
+     * supported locations are:
+     *   "global"
+     *   "us-central1"
+     * For the location of `global` it is unspecified where logs are actually
+     * stored.
+     * Once a bucket has been created, the location can not be changed.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the bucket.
+     * For example:
+     * "projects/my-project-id/locations/my-location/buckets/my-bucket-id The
+     * supported locations are:
+     *   "global"
+     *   "us-central1"
+     * For the location of `global` it is unspecified where logs are actually
+     * stored.
+     * Once a bucket has been created, the location can not be changed.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the bucket.
+     * For example:
+     * "projects/my-project-id/locations/my-location/buckets/my-bucket-id The
+     * supported locations are:
+     *   "global"
+     *   "us-central1"
+     * For the location of `global` it is unspecified where logs are actually
+     * stored.
+     * Once a bucket has been created, the location can not be changed.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the bucket.
+     * For example:
+     * "projects/my-project-id/locations/my-location/buckets/my-bucket-id The
+     * supported locations are:
+     *   "global"
+     *   "us-central1"
+     * For the location of `global` it is unspecified where logs are actually
+     * stored.
+     * Once a bucket has been created, the location can not be changed.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the bucket.
+     * For example:
+     * "projects/my-project-id/locations/my-location/buckets/my-bucket-id The
+     * supported locations are:
+     *   "global"
+     *   "us-central1"
+     * For the location of `global` it is unspecified where logs are actually
+     * stored.
+     * Once a bucket has been created, the location can not be changed.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Describes this bucket.
+     * 
+ * + * string description = 3; + * + * @return The description. + */ + 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; + } + } + /** + * + * + *
+     * Describes this bucket.
+     * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + 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; + } + } + /** + * + * + *
+     * Describes this bucket.
+     * 
+ * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Describes this bucket.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Describes this bucket.
+     * 
+ * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The creation timestamp of the bucket. This is not set for any of the
+     * default buckets.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The creation timestamp of the bucket. This is not set for any of the
+     * default buckets.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The creation timestamp of the bucket. This is not set for any of the
+     * default buckets.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The creation timestamp of the bucket. This is not set for any of the
+     * default buckets.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The creation timestamp of the bucket. This is not set for any of the
+     * default buckets.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The creation timestamp of the bucket. This is not set for any of the
+     * default buckets.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The creation timestamp of the bucket. This is not set for any of the
+     * default buckets.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The creation timestamp of the bucket. This is not set for any of the
+     * default buckets.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The creation timestamp of the bucket. This is not set for any of the
+     * default buckets.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The last update timestamp of the bucket.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The last update timestamp of the bucket.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The last update timestamp of the bucket.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The last update timestamp of the bucket.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The last update timestamp of the bucket.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The last update timestamp of the bucket.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The last update timestamp of the bucket.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The last update timestamp of the bucket.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The last update timestamp of the bucket.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private int retentionDays_; + /** + * + * + *
+     * Logs will be retained by default for this amount of time, after which they
+     * will automatically be deleted. The minimum retention period is 1 day.
+     * If this value is set to zero at bucket creation time, the default time of
+     * 30 days will be used.
+     * 
+ * + * int32 retention_days = 11; + * + * @return The retentionDays. + */ + @java.lang.Override + public int getRetentionDays() { + return retentionDays_; + } + /** + * + * + *
+     * Logs will be retained by default for this amount of time, after which they
+     * will automatically be deleted. The minimum retention period is 1 day.
+     * If this value is set to zero at bucket creation time, the default time of
+     * 30 days will be used.
+     * 
+ * + * int32 retention_days = 11; + * + * @param value The retentionDays to set. + * @return This builder for chaining. + */ + public Builder setRetentionDays(int value) { + + retentionDays_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Logs will be retained by default for this amount of time, after which they
+     * will automatically be deleted. The minimum retention period is 1 day.
+     * If this value is set to zero at bucket creation time, the default time of
+     * 30 days will be used.
+     * 
+ * + * int32 retention_days = 11; + * + * @return This builder for chaining. + */ + public Builder clearRetentionDays() { + + retentionDays_ = 0; + onChanged(); + return this; + } + + private int lifecycleState_ = 0; + /** + * + * + *
+     * Output only. The bucket lifecycle state.
+     * 
+ * + * + * .google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lifecycleState. + */ + @java.lang.Override + public int getLifecycleStateValue() { + return lifecycleState_; + } + /** + * + * + *
+     * Output only. The bucket lifecycle state.
+     * 
+ * + * + * .google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for lifecycleState to set. + * @return This builder for chaining. + */ + public Builder setLifecycleStateValue(int value) { + + lifecycleState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The bucket lifecycle state.
+     * 
+ * + * + * .google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lifecycleState. + */ + @java.lang.Override + public com.google.logging.v2.LifecycleState getLifecycleState() { + @SuppressWarnings("deprecation") + com.google.logging.v2.LifecycleState result = + com.google.logging.v2.LifecycleState.valueOf(lifecycleState_); + return result == null ? com.google.logging.v2.LifecycleState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The bucket lifecycle state.
+     * 
+ * + * + * .google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The lifecycleState to set. + * @return This builder for chaining. + */ + public Builder setLifecycleState(com.google.logging.v2.LifecycleState value) { + if (value == null) { + throw new NullPointerException(); + } + + lifecycleState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The bucket lifecycle state.
+     * 
+ * + * + * .google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearLifecycleState() { + + lifecycleState_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.logging.v2.LogBucket) + } + + // @@protoc_insertion_point(class_scope:google.logging.v2.LogBucket) + private static final com.google.logging.v2.LogBucket DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.logging.v2.LogBucket(); + } + + public static com.google.logging.v2.LogBucket getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LogBucket parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LogBucket(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.logging.v2.LogBucket getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogBucketName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogBucketName.java new file mode 100644 index 000000000..c72ea4ce8 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogBucketName.java @@ -0,0 +1,548 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.logging.v2; + +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class LogBucketName implements ResourceName { + + @Deprecated + protected LogBucketName() {} + + private static final PathTemplate PROJECT_LOCATION_BUCKET_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/buckets/{bucket}"); + private static final PathTemplate ORGANIZATION_LOCATION_BUCKET_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "organizations/{organization}/locations/{location}/buckets/{bucket}"); + private static final PathTemplate FOLDER_LOCATION_BUCKET_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "folders/{folder}/locations/{location}/buckets/{bucket}"); + private static final PathTemplate BILLING_ACCOUNT_LOCATION_BUCKET_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}"); + + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + + private String project; + private String location; + private String bucket; + private String organization; + private String folder; + private String billingAccount; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBucket() { + return bucket; + } + + public String getOrganization() { + return organization; + } + + public String getFolder() { + return folder; + } + + public String getBillingAccount() { + return billingAccount; + } + + private LogBucketName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + bucket = Preconditions.checkNotNull(builder.getBucket()); + pathTemplate = PROJECT_LOCATION_BUCKET_PATH_TEMPLATE; + } + + private LogBucketName(OrganizationLocationBucketBuilder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + location = Preconditions.checkNotNull(builder.getLocation()); + bucket = Preconditions.checkNotNull(builder.getBucket()); + pathTemplate = ORGANIZATION_LOCATION_BUCKET_PATH_TEMPLATE; + } + + private LogBucketName(FolderLocationBucketBuilder builder) { + folder = Preconditions.checkNotNull(builder.getFolder()); + location = Preconditions.checkNotNull(builder.getLocation()); + bucket = Preconditions.checkNotNull(builder.getBucket()); + pathTemplate = FOLDER_LOCATION_BUCKET_PATH_TEMPLATE; + } + + private LogBucketName(BillingAccountLocationBucketBuilder builder) { + billingAccount = Preconditions.checkNotNull(builder.getBillingAccount()); + location = Preconditions.checkNotNull(builder.getLocation()); + bucket = Preconditions.checkNotNull(builder.getBucket()); + pathTemplate = BILLING_ACCOUNT_LOCATION_BUCKET_PATH_TEMPLATE; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectLocationBucketBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static OrganizationLocationBucketBuilder newOrganizationLocationBucketBuilder() { + return new OrganizationLocationBucketBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static FolderLocationBucketBuilder newFolderLocationBucketBuilder() { + return new FolderLocationBucketBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static BillingAccountLocationBucketBuilder newBillingAccountLocationBucketBuilder() { + return new BillingAccountLocationBucketBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LogBucketName of(String project, String location, String bucket) { + return newProjectLocationBucketBuilder() + .setProject(project) + .setLocation(location) + .setBucket(bucket) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static LogBucketName ofProjectLocationBucketName( + String project, String location, String bucket) { + return newProjectLocationBucketBuilder() + .setProject(project) + .setLocation(location) + .setBucket(bucket) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static LogBucketName ofOrganizationLocationBucketName( + String organization, String location, String bucket) { + return newOrganizationLocationBucketBuilder() + .setOrganization(organization) + .setLocation(location) + .setBucket(bucket) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static LogBucketName ofFolderLocationBucketName( + String folder, String location, String bucket) { + return newFolderLocationBucketBuilder() + .setFolder(folder) + .setLocation(location) + .setBucket(bucket) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static LogBucketName ofBillingAccountLocationBucketName( + String billingAccount, String location, String bucket) { + return newBillingAccountLocationBucketBuilder() + .setBillingAccount(billingAccount) + .setLocation(location) + .setBucket(bucket) + .build(); + } + + public static String format(String project, String location, String bucket) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBucket(bucket) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationBucketName( + String project, String location, String bucket) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBucket(bucket) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatOrganizationLocationBucketName( + String organization, String location, String bucket) { + return newOrganizationLocationBucketBuilder() + .setOrganization(organization) + .setLocation(location) + .setBucket(bucket) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatFolderLocationBucketName( + String folder, String location, String bucket) { + return newFolderLocationBucketBuilder() + .setFolder(folder) + .setLocation(location) + .setBucket(bucket) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatBillingAccountLocationBucketName( + String billingAccount, String location, String bucket) { + return newBillingAccountLocationBucketBuilder() + .setBillingAccount(billingAccount) + .setLocation(location) + .setBucket(bucket) + .build() + .toString(); + } + + public static LogBucketName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT_LOCATION_BUCKET_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION_BUCKET_PATH_TEMPLATE.match(formattedString); + return ofProjectLocationBucketName( + matchMap.get("project"), matchMap.get("location"), matchMap.get("bucket")); + } else if (ORGANIZATION_LOCATION_BUCKET_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = + ORGANIZATION_LOCATION_BUCKET_PATH_TEMPLATE.match(formattedString); + return ofOrganizationLocationBucketName( + matchMap.get("organization"), matchMap.get("location"), matchMap.get("bucket")); + } else if (FOLDER_LOCATION_BUCKET_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = FOLDER_LOCATION_BUCKET_PATH_TEMPLATE.match(formattedString); + return ofFolderLocationBucketName( + matchMap.get("folder"), matchMap.get("location"), matchMap.get("bucket")); + } else if (BILLING_ACCOUNT_LOCATION_BUCKET_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = + BILLING_ACCOUNT_LOCATION_BUCKET_PATH_TEMPLATE.match(formattedString); + return ofBillingAccountLocationBucketName( + matchMap.get("billing_account"), matchMap.get("location"), matchMap.get("bucket")); + } + throw new ValidationException("JobName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LogBucketName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_BUCKET_PATH_TEMPLATE.matches(formattedString) + || ORGANIZATION_LOCATION_BUCKET_PATH_TEMPLATE.matches(formattedString) + || FOLDER_LOCATION_BUCKET_PATH_TEMPLATE.matches(formattedString) + || BILLING_ACCOUNT_LOCATION_BUCKET_PATH_TEMPLATE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (bucket != null) { + fieldMapBuilder.put("bucket", bucket); + } + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + if (folder != null) { + fieldMapBuilder.put("folder", folder); + } + if (billingAccount != null) { + fieldMapBuilder.put("billing_account", billingAccount); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + /** Builder for projects/{project}/locations/{location}/buckets/{bucket}. */ + public static class Builder { + + private String project; + private String location; + private String bucket; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBucket() { + return bucket; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setBucket(String bucket) { + this.bucket = bucket; + return this; + } + + private Builder(LogBucketName logBucketName) { + Preconditions.checkArgument( + logBucketName.pathTemplate == PROJECT_LOCATION_BUCKET_PATH_TEMPLATE, + "toBuilder is only supported when LogBucketName has the pattern of " + + "projects/{project}/locations/{location}/buckets/{bucket}."); + project = logBucketName.project; + location = logBucketName.location; + bucket = logBucketName.bucket; + } + + public LogBucketName build() { + return new LogBucketName(this); + } + } + + /** Builder for organizations/{organization}/locations/{location}/buckets/{bucket}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class OrganizationLocationBucketBuilder { + + private String organization; + private String location; + private String bucket; + + private OrganizationLocationBucketBuilder() {} + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public String getBucket() { + return bucket; + } + + public OrganizationLocationBucketBuilder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public OrganizationLocationBucketBuilder setLocation(String location) { + this.location = location; + return this; + } + + public OrganizationLocationBucketBuilder setBucket(String bucket) { + this.bucket = bucket; + return this; + } + + public LogBucketName build() { + return new LogBucketName(this); + } + } + + /** Builder for folders/{folder}/locations/{location}/buckets/{bucket}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class FolderLocationBucketBuilder { + + private String folder; + private String location; + private String bucket; + + private FolderLocationBucketBuilder() {} + + public String getFolder() { + return folder; + } + + public String getLocation() { + return location; + } + + public String getBucket() { + return bucket; + } + + public FolderLocationBucketBuilder setFolder(String folder) { + this.folder = folder; + return this; + } + + public FolderLocationBucketBuilder setLocation(String location) { + this.location = location; + return this; + } + + public FolderLocationBucketBuilder setBucket(String bucket) { + this.bucket = bucket; + return this; + } + + public LogBucketName build() { + return new LogBucketName(this); + } + } + + /** Builder for billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class BillingAccountLocationBucketBuilder { + + private String billingAccount; + private String location; + private String bucket; + + private BillingAccountLocationBucketBuilder() {} + + public String getBillingAccount() { + return billingAccount; + } + + public String getLocation() { + return location; + } + + public String getBucket() { + return bucket; + } + + public BillingAccountLocationBucketBuilder setBillingAccount(String billingAccount) { + this.billingAccount = billingAccount; + return this; + } + + public BillingAccountLocationBucketBuilder setLocation(String location) { + this.location = location; + return this; + } + + public BillingAccountLocationBucketBuilder setBucket(String bucket) { + this.bucket = bucket; + return this; + } + + public LogBucketName build() { + return new LogBucketName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + LogBucketName that = (LogBucketName) o; + return (Objects.equals(this.project, that.project)) + && (Objects.equals(this.location, that.location)) + && (Objects.equals(this.bucket, that.bucket)) + && (Objects.equals(this.organization, that.organization)) + && (Objects.equals(this.folder, that.folder)) + && (Objects.equals(this.billingAccount, that.billingAccount)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(bucket); + h *= 1000003; + h ^= Objects.hashCode(organization); + h *= 1000003; + h ^= Objects.hashCode(folder); + h *= 1000003; + h ^= Objects.hashCode(billingAccount); + return h; + } +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogBucketOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogBucketOrBuilder.java new file mode 100644 index 000000000..d67d519b6 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogBucketOrBuilder.java @@ -0,0 +1,215 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/logging/v2/logging_config.proto + +package com.google.logging.v2; + +public interface LogBucketOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.logging.v2.LogBucket) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the bucket.
+   * For example:
+   * "projects/my-project-id/locations/my-location/buckets/my-bucket-id The
+   * supported locations are:
+   *   "global"
+   *   "us-central1"
+   * For the location of `global` it is unspecified where logs are actually
+   * stored.
+   * Once a bucket has been created, the location can not be changed.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name of the bucket.
+   * For example:
+   * "projects/my-project-id/locations/my-location/buckets/my-bucket-id The
+   * supported locations are:
+   *   "global"
+   *   "us-central1"
+   * For the location of `global` it is unspecified where logs are actually
+   * stored.
+   * Once a bucket has been created, the location can not be changed.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Describes this bucket.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Describes this bucket.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The creation timestamp of the bucket. This is not set for any of the
+   * default buckets.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The creation timestamp of the bucket. This is not set for any of the
+   * default buckets.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The creation timestamp of the bucket. This is not set for any of the
+   * default buckets.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The last update timestamp of the bucket.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The last update timestamp of the bucket.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The last update timestamp of the bucket.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Logs will be retained by default for this amount of time, after which they
+   * will automatically be deleted. The minimum retention period is 1 day.
+   * If this value is set to zero at bucket creation time, the default time of
+   * 30 days will be used.
+   * 
+ * + * int32 retention_days = 11; + * + * @return The retentionDays. + */ + int getRetentionDays(); + + /** + * + * + *
+   * Output only. The bucket lifecycle state.
+   * 
+ * + * + * .google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lifecycleState. + */ + int getLifecycleStateValue(); + /** + * + * + *
+   * Output only. The bucket lifecycle state.
+   * 
+ * + * + * .google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lifecycleState. + */ + com.google.logging.v2.LifecycleState getLifecycleState(); +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntry.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntry.java index 3138e7279..9f0739275 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntry.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntry.java @@ -242,22 +242,6 @@ private LogEntry( receiveTimestamp_ = subBuilder.buildPartial(); } - break; - } - case 202: - { - com.google.api.MonitoredResourceMetadata.Builder subBuilder = null; - if (metadata_ != null) { - subBuilder = metadata_.toBuilder(); - } - metadata_ = - input.readMessage( - com.google.api.MonitoredResourceMetadata.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(metadata_); - metadata_ = subBuilder.buildPartial(); - } - break; } case 218: @@ -377,9 +361,9 @@ public PayloadCase getPayloadCase() { * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" * "folders/[FOLDER_ID]/logs/[LOG_ID]" - * A project number may optionally be used in place of PROJECT_ID. The project - * number is translated to its corresponding PROJECT_ID internally and the - * `log_name` field will contain PROJECT_ID in queries and exports. + * A project number may be used in place of PROJECT_ID. The project number is + * translated to its corresponding PROJECT_ID internally and the `log_name` + * field will contain PROJECT_ID in queries and exports. * `[LOG_ID]` must be URL-encoded within `log_name`. Example: * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. * `[LOG_ID]` must be less than 512 characters long and can only include the @@ -392,10 +376,11 @@ public PayloadCase getPayloadCase() { * any results. * * - * string log_name = 12; + * string log_name = 12 [(.google.api.field_behavior) = REQUIRED]; * * @return The logName. */ + @java.lang.Override public java.lang.String getLogName() { java.lang.Object ref = logName_; if (ref instanceof java.lang.String) { @@ -416,9 +401,9 @@ public java.lang.String getLogName() { * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" * "folders/[FOLDER_ID]/logs/[LOG_ID]" - * A project number may optionally be used in place of PROJECT_ID. The project - * number is translated to its corresponding PROJECT_ID internally and the - * `log_name` field will contain PROJECT_ID in queries and exports. + * A project number may be used in place of PROJECT_ID. The project number is + * translated to its corresponding PROJECT_ID internally and the `log_name` + * field will contain PROJECT_ID in queries and exports. * `[LOG_ID]` must be URL-encoded within `log_name`. Example: * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. * `[LOG_ID]` must be less than 512 characters long and can only include the @@ -431,10 +416,11 @@ public java.lang.String getLogName() { * any results. * * - * string log_name = 12; + * string log_name = 12 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for logName. */ + @java.lang.Override public com.google.protobuf.ByteString getLogNameBytes() { java.lang.Object ref = logName_; if (ref instanceof java.lang.String) { @@ -459,10 +445,12 @@ public com.google.protobuf.ByteString getLogNameBytes() { * the error. * * - * .google.api.MonitoredResource resource = 8; + * .google.api.MonitoredResource resource = 8 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the resource field is set. */ + @java.lang.Override public boolean hasResource() { return resource_ != null; } @@ -476,10 +464,12 @@ public boolean hasResource() { * the error. * * - * .google.api.MonitoredResource resource = 8; + * .google.api.MonitoredResource resource = 8 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The resource. */ + @java.lang.Override public com.google.api.MonitoredResource getResource() { return resource_ == null ? com.google.api.MonitoredResource.getDefaultInstance() : resource_; } @@ -493,8 +483,10 @@ public com.google.api.MonitoredResource getResource() { * the error. * * - * .google.api.MonitoredResource resource = 8; + * .google.api.MonitoredResource resource = 8 [(.google.api.field_behavior) = REQUIRED]; + * */ + @java.lang.Override public com.google.api.MonitoredResourceOrBuilder getResourceOrBuilder() { return getResource(); } @@ -516,6 +508,7 @@ public com.google.api.MonitoredResourceOrBuilder getResourceOrBuilder() { * * @return Whether the protoPayload field is set. */ + @java.lang.Override public boolean hasProtoPayload() { return payloadCase_ == 2; } @@ -535,6 +528,7 @@ public boolean hasProtoPayload() { * * @return The protoPayload. */ + @java.lang.Override public com.google.protobuf.Any getProtoPayload() { if (payloadCase_ == 2) { return (com.google.protobuf.Any) payload_; @@ -555,6 +549,7 @@ public com.google.protobuf.Any getProtoPayload() { * * .google.protobuf.Any proto_payload = 2; */ + @java.lang.Override public com.google.protobuf.AnyOrBuilder getProtoPayloadOrBuilder() { if (payloadCase_ == 2) { return (com.google.protobuf.Any) payload_; @@ -631,6 +626,7 @@ public com.google.protobuf.ByteString getTextPayloadBytes() { * * @return Whether the jsonPayload field is set. */ + @java.lang.Override public boolean hasJsonPayload() { return payloadCase_ == 6; } @@ -646,6 +642,7 @@ public boolean hasJsonPayload() { * * @return The jsonPayload. */ + @java.lang.Override public com.google.protobuf.Struct getJsonPayload() { if (payloadCase_ == 6) { return (com.google.protobuf.Struct) payload_; @@ -662,6 +659,7 @@ public com.google.protobuf.Struct getJsonPayload() { * * .google.protobuf.Struct json_payload = 6; */ + @java.lang.Override public com.google.protobuf.StructOrBuilder getJsonPayloadOrBuilder() { if (payloadCase_ == 6) { return (com.google.protobuf.Struct) payload_; @@ -675,23 +673,24 @@ public com.google.protobuf.StructOrBuilder getJsonPayloadOrBuilder() { * * *
-   * Optional. The time the event described by the log entry occurred.  This
-   * time is used to compute the log entry's age and to enforce the logs
-   * retention period. If this field is omitted in a new log entry, then Logging
-   * assigns it the current time.  Timestamps have nanosecond accuracy, but
-   * trailing zeros in the fractional seconds might be omitted when the
-   * timestamp is displayed.
+   * Optional. The time the event described by the log entry occurred. This time is used
+   * to compute the log entry's age and to enforce the logs retention period.
+   * If this field is omitted in a new log entry, then Logging assigns it the
+   * current time. Timestamps have nanosecond accuracy, but trailing zeros in
+   * the fractional seconds might be omitted when the timestamp is displayed.
    * Incoming log entries should have timestamps that are no more than the [logs
-   * retention period](/logging/quotas) in the past, and no more than 24 hours
+   * retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours
    * in the future. Log entries outside those time boundaries will not be
    * available when calling `entries.list`, but those log entries can still be
-   * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs).
+   * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
    * 
* - * .google.protobuf.Timestamp timestamp = 9; + * .google.protobuf.Timestamp timestamp = 9 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the timestamp field is set. */ + @java.lang.Override public boolean hasTimestamp() { return timestamp_ != null; } @@ -699,23 +698,24 @@ public boolean hasTimestamp() { * * *
-   * Optional. The time the event described by the log entry occurred.  This
-   * time is used to compute the log entry's age and to enforce the logs
-   * retention period. If this field is omitted in a new log entry, then Logging
-   * assigns it the current time.  Timestamps have nanosecond accuracy, but
-   * trailing zeros in the fractional seconds might be omitted when the
-   * timestamp is displayed.
+   * Optional. The time the event described by the log entry occurred. This time is used
+   * to compute the log entry's age and to enforce the logs retention period.
+   * If this field is omitted in a new log entry, then Logging assigns it the
+   * current time. Timestamps have nanosecond accuracy, but trailing zeros in
+   * the fractional seconds might be omitted when the timestamp is displayed.
    * Incoming log entries should have timestamps that are no more than the [logs
-   * retention period](/logging/quotas) in the past, and no more than 24 hours
+   * retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours
    * in the future. Log entries outside those time boundaries will not be
    * available when calling `entries.list`, but those log entries can still be
-   * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs).
+   * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
    * 
* - * .google.protobuf.Timestamp timestamp = 9; + * .google.protobuf.Timestamp timestamp = 9 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The timestamp. */ + @java.lang.Override public com.google.protobuf.Timestamp getTimestamp() { return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; } @@ -723,21 +723,22 @@ public com.google.protobuf.Timestamp getTimestamp() { * * *
-   * Optional. The time the event described by the log entry occurred.  This
-   * time is used to compute the log entry's age and to enforce the logs
-   * retention period. If this field is omitted in a new log entry, then Logging
-   * assigns it the current time.  Timestamps have nanosecond accuracy, but
-   * trailing zeros in the fractional seconds might be omitted when the
-   * timestamp is displayed.
+   * Optional. The time the event described by the log entry occurred. This time is used
+   * to compute the log entry's age and to enforce the logs retention period.
+   * If this field is omitted in a new log entry, then Logging assigns it the
+   * current time. Timestamps have nanosecond accuracy, but trailing zeros in
+   * the fractional seconds might be omitted when the timestamp is displayed.
    * Incoming log entries should have timestamps that are no more than the [logs
-   * retention period](/logging/quotas) in the past, and no more than 24 hours
+   * retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours
    * in the future. Log entries outside those time boundaries will not be
    * available when calling `entries.list`, but those log entries can still be
-   * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs).
+   * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
    * 
* - * .google.protobuf.Timestamp timestamp = 9; + * .google.protobuf.Timestamp timestamp = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { return getTimestamp(); } @@ -751,10 +752,13 @@ public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { * Output only. The time the log entry was received by Logging. * * - * .google.protobuf.Timestamp receive_timestamp = 24; + * + * .google.protobuf.Timestamp receive_timestamp = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the receiveTimestamp field is set. */ + @java.lang.Override public boolean hasReceiveTimestamp() { return receiveTimestamp_ != null; } @@ -765,10 +769,13 @@ public boolean hasReceiveTimestamp() { * Output only. The time the log entry was received by Logging. * * - * .google.protobuf.Timestamp receive_timestamp = 24; + * + * .google.protobuf.Timestamp receive_timestamp = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The receiveTimestamp. */ + @java.lang.Override public com.google.protobuf.Timestamp getReceiveTimestamp() { return receiveTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() @@ -781,8 +788,11 @@ public com.google.protobuf.Timestamp getReceiveTimestamp() { * Output only. The time the log entry was received by Logging. * * - * .google.protobuf.Timestamp receive_timestamp = 24; + * + * .google.protobuf.Timestamp receive_timestamp = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReceiveTimestampOrBuilder() { return getReceiveTimestamp(); } @@ -793,14 +803,15 @@ public com.google.protobuf.TimestampOrBuilder getReceiveTimestampOrBuilder() { * * *
-   * Optional. The severity of the log entry. The default value is
-   * `LogSeverity.DEFAULT`.
+   * Optional. The severity of the log entry. The default value is `LogSeverity.DEFAULT`.
    * 
* - * .google.logging.type.LogSeverity severity = 10; + * .google.logging.type.LogSeverity severity = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The enum numeric value on the wire for severity. */ + @java.lang.Override public int getSeverityValue() { return severity_; } @@ -808,14 +819,15 @@ public int getSeverityValue() { * * *
-   * Optional. The severity of the log entry. The default value is
-   * `LogSeverity.DEFAULT`.
+   * Optional. The severity of the log entry. The default value is `LogSeverity.DEFAULT`.
    * 
* - * .google.logging.type.LogSeverity severity = 10; + * .google.logging.type.LogSeverity severity = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The severity. */ + @java.lang.Override public com.google.logging.type.LogSeverity getSeverity() { @SuppressWarnings("deprecation") com.google.logging.type.LogSeverity result = @@ -829,8 +841,8 @@ public com.google.logging.type.LogSeverity getSeverity() { * * *
-   * Optional. A unique identifier for the log entry. If you provide a value,
-   * then Logging considers other log entries in the same project, with the same
+   * Optional. A unique identifier for the log entry. If you provide a value, then
+   * Logging considers other log entries in the same project, with the same
    * `timestamp`, and with the same `insert_id` to be duplicates which are
    * removed in a single query result. However, there are no guarantees of
    * de-duplication in the export of logs.
@@ -840,10 +852,11 @@ public com.google.logging.type.LogSeverity getSeverity() {
    * the same `log_name` and `timestamp` values.
    * 
* - * string insert_id = 4; + * string insert_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The insertId. */ + @java.lang.Override public java.lang.String getInsertId() { java.lang.Object ref = insertId_; if (ref instanceof java.lang.String) { @@ -859,8 +872,8 @@ public java.lang.String getInsertId() { * * *
-   * Optional. A unique identifier for the log entry. If you provide a value,
-   * then Logging considers other log entries in the same project, with the same
+   * Optional. A unique identifier for the log entry. If you provide a value, then
+   * Logging considers other log entries in the same project, with the same
    * `timestamp`, and with the same `insert_id` to be duplicates which are
    * removed in a single query result. However, there are no guarantees of
    * de-duplication in the export of logs.
@@ -870,10 +883,11 @@ public java.lang.String getInsertId() {
    * the same `log_name` and `timestamp` values.
    * 
* - * string insert_id = 4; + * string insert_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for insertId. */ + @java.lang.Override public com.google.protobuf.ByteString getInsertIdBytes() { java.lang.Object ref = insertId_; if (ref instanceof java.lang.String) { @@ -892,14 +906,17 @@ public com.google.protobuf.ByteString getInsertIdBytes() { * * *
-   * Optional. Information about the HTTP request associated with this log
-   * entry, if applicable.
+   * Optional. Information about the HTTP request associated with this log entry, if
+   * applicable.
    * 
* - * .google.logging.type.HttpRequest http_request = 7; + * + * .google.logging.type.HttpRequest http_request = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the httpRequest field is set. */ + @java.lang.Override public boolean hasHttpRequest() { return httpRequest_ != null; } @@ -907,14 +924,17 @@ public boolean hasHttpRequest() { * * *
-   * Optional. Information about the HTTP request associated with this log
-   * entry, if applicable.
+   * Optional. Information about the HTTP request associated with this log entry, if
+   * applicable.
    * 
* - * .google.logging.type.HttpRequest http_request = 7; + * + * .google.logging.type.HttpRequest http_request = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The httpRequest. */ + @java.lang.Override public com.google.logging.type.HttpRequest getHttpRequest() { return httpRequest_ == null ? com.google.logging.type.HttpRequest.getDefaultInstance() @@ -924,12 +944,15 @@ public com.google.logging.type.HttpRequest getHttpRequest() { * * *
-   * Optional. Information about the HTTP request associated with this log
-   * entry, if applicable.
+   * Optional. Information about the HTTP request associated with this log entry, if
+   * applicable.
    * 
* - * .google.logging.type.HttpRequest http_request = 7; + * + * .google.logging.type.HttpRequest http_request = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ + @java.lang.Override public com.google.logging.type.HttpRequestOrBuilder getHttpRequestOrBuilder() { return getHttpRequest(); } @@ -967,8 +990,9 @@ public int getLabelsCount() { * information about the log entry. * * - * map<string, string> labels = 11; + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; */ + @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -976,6 +1000,7 @@ public boolean containsLabels(java.lang.String key) { return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); @@ -988,8 +1013,9 @@ public java.util.Map getLabels() { * information about the log entry. * * - * map<string, string> labels = 11; + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; */ + @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } @@ -1001,8 +1027,9 @@ public java.util.Map getLabelsMap() { * information about the log entry. * * - * map<string, string> labels = 11; + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; */ + @java.lang.Override public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1018,8 +1045,9 @@ public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.Strin * information about the log entry. * * - * map<string, string> labels = 11; + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; */ + @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1031,75 +1059,6 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { return map.get(key); } - public static final int METADATA_FIELD_NUMBER = 25; - private com.google.api.MonitoredResourceMetadata metadata_; - /** - * - * - *
-   * Deprecated. Output only. Additional metadata about the monitored resource.
-   * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
-   * this field populated for GKE versions older than 1.12.6. For GKE versions
-   * 1.12.6 and above, the `metadata` field has been deprecated. The Kubernetes
-   * pod labels that used to be in `metadata.userLabels` will now be present in
-   * the `labels` field with a key prefix of `k8s-pod/`. The Stackdriver system
-   * labels that were present in the `metadata.systemLabels` field will no
-   * longer be available in the LogEntry.
-   * 
- * - * .google.api.MonitoredResourceMetadata metadata = 25 [deprecated = true]; - * - * @return Whether the metadata field is set. - */ - @java.lang.Deprecated - public boolean hasMetadata() { - return metadata_ != null; - } - /** - * - * - *
-   * Deprecated. Output only. Additional metadata about the monitored resource.
-   * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
-   * this field populated for GKE versions older than 1.12.6. For GKE versions
-   * 1.12.6 and above, the `metadata` field has been deprecated. The Kubernetes
-   * pod labels that used to be in `metadata.userLabels` will now be present in
-   * the `labels` field with a key prefix of `k8s-pod/`. The Stackdriver system
-   * labels that were present in the `metadata.systemLabels` field will no
-   * longer be available in the LogEntry.
-   * 
- * - * .google.api.MonitoredResourceMetadata metadata = 25 [deprecated = true]; - * - * @return The metadata. - */ - @java.lang.Deprecated - public com.google.api.MonitoredResourceMetadata getMetadata() { - return metadata_ == null - ? com.google.api.MonitoredResourceMetadata.getDefaultInstance() - : metadata_; - } - /** - * - * - *
-   * Deprecated. Output only. Additional metadata about the monitored resource.
-   * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
-   * this field populated for GKE versions older than 1.12.6. For GKE versions
-   * 1.12.6 and above, the `metadata` field has been deprecated. The Kubernetes
-   * pod labels that used to be in `metadata.userLabels` will now be present in
-   * the `labels` field with a key prefix of `k8s-pod/`. The Stackdriver system
-   * labels that were present in the `metadata.systemLabels` field will no
-   * longer be available in the LogEntry.
-   * 
- * - * .google.api.MonitoredResourceMetadata metadata = 25 [deprecated = true]; - */ - @java.lang.Deprecated - public com.google.api.MonitoredResourceMetadataOrBuilder getMetadataOrBuilder() { - return getMetadata(); - } - public static final int OPERATION_FIELD_NUMBER = 15; private com.google.logging.v2.LogEntryOperation operation_; /** @@ -1110,10 +1069,13 @@ public com.google.api.MonitoredResourceMetadataOrBuilder getMetadataOrBuilder() * applicable. * * - * .google.logging.v2.LogEntryOperation operation = 15; + * + * .google.logging.v2.LogEntryOperation operation = 15 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the operation field is set. */ + @java.lang.Override public boolean hasOperation() { return operation_ != null; } @@ -1125,10 +1087,13 @@ public boolean hasOperation() { * applicable. * * - * .google.logging.v2.LogEntryOperation operation = 15; + * + * .google.logging.v2.LogEntryOperation operation = 15 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The operation. */ + @java.lang.Override public com.google.logging.v2.LogEntryOperation getOperation() { return operation_ == null ? com.google.logging.v2.LogEntryOperation.getDefaultInstance() @@ -1142,8 +1107,11 @@ public com.google.logging.v2.LogEntryOperation getOperation() { * applicable. * * - * .google.logging.v2.LogEntryOperation operation = 15; + * + * .google.logging.v2.LogEntryOperation operation = 15 [(.google.api.field_behavior) = OPTIONAL]; + * */ + @java.lang.Override public com.google.logging.v2.LogEntryOperationOrBuilder getOperationOrBuilder() { return getOperation(); } @@ -1154,16 +1122,17 @@ public com.google.logging.v2.LogEntryOperationOrBuilder getOperationOrBuilder() * * *
-   * Optional. Resource name of the trace associated with the log entry, if any.
-   * If it contains a relative resource name, the name is assumed to be relative
-   * to `//tracing.googleapis.com`. Example:
+   * Optional. Resource name of the trace associated with the log entry, if any. If it
+   * contains a relative resource name, the name is assumed to be relative to
+   * `//tracing.googleapis.com`. Example:
    * `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
    * 
* - * string trace = 22; + * string trace = 22 [(.google.api.field_behavior) = OPTIONAL]; * * @return The trace. */ + @java.lang.Override public java.lang.String getTrace() { java.lang.Object ref = trace_; if (ref instanceof java.lang.String) { @@ -1179,16 +1148,17 @@ public java.lang.String getTrace() { * * *
-   * Optional. Resource name of the trace associated with the log entry, if any.
-   * If it contains a relative resource name, the name is assumed to be relative
-   * to `//tracing.googleapis.com`. Example:
+   * Optional. Resource name of the trace associated with the log entry, if any. If it
+   * contains a relative resource name, the name is assumed to be relative to
+   * `//tracing.googleapis.com`. Example:
    * `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
    * 
* - * string trace = 22; + * string trace = 22 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for trace. */ + @java.lang.Override public com.google.protobuf.ByteString getTraceBytes() { java.lang.Object ref = trace_; if (ref instanceof java.lang.String) { @@ -1210,13 +1180,14 @@ public com.google.protobuf.ByteString getTraceBytes() { * Optional. The span ID within the trace associated with the log entry. * For Trace spans, this is the same format that the Trace API v2 uses: a * 16-character hexadecimal encoding of an 8-byte array, such as - * <code>"000000000000004a"</code>. + * `000000000000004a`. * * - * string span_id = 27; + * string span_id = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @return The spanId. */ + @java.lang.Override public java.lang.String getSpanId() { java.lang.Object ref = spanId_; if (ref instanceof java.lang.String) { @@ -1235,13 +1206,14 @@ public java.lang.String getSpanId() { * Optional. The span ID within the trace associated with the log entry. * For Trace spans, this is the same format that the Trace API v2 uses: a * 16-character hexadecimal encoding of an 8-byte array, such as - * <code>"000000000000004a"</code>. + * `000000000000004a`. * * - * string span_id = 27; + * string span_id = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for spanId. */ + @java.lang.Override public com.google.protobuf.ByteString getSpanIdBytes() { java.lang.Object ref = spanId_; if (ref instanceof java.lang.String) { @@ -1268,10 +1240,11 @@ public com.google.protobuf.ByteString getSpanIdBytes() { * request correlation identifier. The default is False. * * - * bool trace_sampled = 30; + * bool trace_sampled = 30 [(.google.api.field_behavior) = OPTIONAL]; * * @return The traceSampled. */ + @java.lang.Override public boolean getTraceSampled() { return traceSampled_; } @@ -1282,14 +1255,16 @@ public boolean getTraceSampled() { * * *
-   * Optional. Source code location information associated with the log entry,
-   * if any.
+   * Optional. Source code location information associated with the log entry, if any.
    * 
* - * .google.logging.v2.LogEntrySourceLocation source_location = 23; + * + * .google.logging.v2.LogEntrySourceLocation source_location = 23 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the sourceLocation field is set. */ + @java.lang.Override public boolean hasSourceLocation() { return sourceLocation_ != null; } @@ -1297,14 +1272,16 @@ public boolean hasSourceLocation() { * * *
-   * Optional. Source code location information associated with the log entry,
-   * if any.
+   * Optional. Source code location information associated with the log entry, if any.
    * 
* - * .google.logging.v2.LogEntrySourceLocation source_location = 23; + * + * .google.logging.v2.LogEntrySourceLocation source_location = 23 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The sourceLocation. */ + @java.lang.Override public com.google.logging.v2.LogEntrySourceLocation getSourceLocation() { return sourceLocation_ == null ? com.google.logging.v2.LogEntrySourceLocation.getDefaultInstance() @@ -1314,12 +1291,14 @@ public com.google.logging.v2.LogEntrySourceLocation getSourceLocation() { * * *
-   * Optional. Source code location information associated with the log entry,
-   * if any.
+   * Optional. Source code location information associated with the log entry, if any.
    * 
* - * .google.logging.v2.LogEntrySourceLocation source_location = 23; + * + * .google.logging.v2.LogEntrySourceLocation source_location = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ + @java.lang.Override public com.google.logging.v2.LogEntrySourceLocationOrBuilder getSourceLocationOrBuilder() { return getSourceLocation(); } @@ -1379,9 +1358,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (receiveTimestamp_ != null) { output.writeMessage(24, getReceiveTimestamp()); } - if (metadata_ != null) { - output.writeMessage(25, getMetadata()); - } if (!getSpanIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 27, spanId_); } @@ -1450,9 +1426,6 @@ public int getSerializedSize() { if (receiveTimestamp_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, getReceiveTimestamp()); } - if (metadata_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(25, getMetadata()); - } if (!getSpanIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(27, spanId_); } @@ -1494,10 +1467,6 @@ public boolean equals(final java.lang.Object obj) { if (!getHttpRequest().equals(other.getHttpRequest())) return false; } if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata().equals(other.getMetadata())) return false; - } if (hasOperation() != other.hasOperation()) return false; if (hasOperation()) { if (!getOperation().equals(other.getOperation())) return false; @@ -1560,10 +1529,6 @@ public int hashCode() { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } if (hasOperation()) { hash = (37 * hash) + OPERATION_FIELD_NUMBER; hash = (53 * hash) + getOperation().hashCode(); @@ -1788,12 +1753,6 @@ public Builder clear() { httpRequestBuilder_ = null; } internalGetMutableLabels().clear(); - if (metadataBuilder_ == null) { - metadata_ = null; - } else { - metadata_ = null; - metadataBuilder_ = null; - } if (operationBuilder_ == null) { operation_ = null; } else { @@ -1883,11 +1842,6 @@ public com.google.logging.v2.LogEntry buildPartial() { } result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); - if (metadataBuilder_ == null) { - result.metadata_ = metadata_; - } else { - result.metadata_ = metadataBuilder_.build(); - } if (operationBuilder_ == null) { result.operation_ = operation_; } else { @@ -1975,9 +1929,6 @@ public Builder mergeFrom(com.google.logging.v2.LogEntry other) { mergeHttpRequest(other.getHttpRequest()); } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } if (other.hasOperation()) { mergeOperation(other.getOperation()); } @@ -2073,9 +2024,9 @@ public Builder clearPayload() { * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" * "folders/[FOLDER_ID]/logs/[LOG_ID]" - * A project number may optionally be used in place of PROJECT_ID. The project - * number is translated to its corresponding PROJECT_ID internally and the - * `log_name` field will contain PROJECT_ID in queries and exports. + * A project number may be used in place of PROJECT_ID. The project number is + * translated to its corresponding PROJECT_ID internally and the `log_name` + * field will contain PROJECT_ID in queries and exports. * `[LOG_ID]` must be URL-encoded within `log_name`. Example: * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. * `[LOG_ID]` must be less than 512 characters long and can only include the @@ -2088,7 +2039,7 @@ public Builder clearPayload() { * any results. * * - * string log_name = 12; + * string log_name = 12 [(.google.api.field_behavior) = REQUIRED]; * * @return The logName. */ @@ -2112,9 +2063,9 @@ public java.lang.String getLogName() { * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" * "folders/[FOLDER_ID]/logs/[LOG_ID]" - * A project number may optionally be used in place of PROJECT_ID. The project - * number is translated to its corresponding PROJECT_ID internally and the - * `log_name` field will contain PROJECT_ID in queries and exports. + * A project number may be used in place of PROJECT_ID. The project number is + * translated to its corresponding PROJECT_ID internally and the `log_name` + * field will contain PROJECT_ID in queries and exports. * `[LOG_ID]` must be URL-encoded within `log_name`. Example: * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. * `[LOG_ID]` must be less than 512 characters long and can only include the @@ -2127,7 +2078,7 @@ public java.lang.String getLogName() { * any results. * * - * string log_name = 12; + * string log_name = 12 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for logName. */ @@ -2151,9 +2102,9 @@ public com.google.protobuf.ByteString getLogNameBytes() { * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" * "folders/[FOLDER_ID]/logs/[LOG_ID]" - * A project number may optionally be used in place of PROJECT_ID. The project - * number is translated to its corresponding PROJECT_ID internally and the - * `log_name` field will contain PROJECT_ID in queries and exports. + * A project number may be used in place of PROJECT_ID. The project number is + * translated to its corresponding PROJECT_ID internally and the `log_name` + * field will contain PROJECT_ID in queries and exports. * `[LOG_ID]` must be URL-encoded within `log_name`. Example: * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. * `[LOG_ID]` must be less than 512 characters long and can only include the @@ -2166,7 +2117,7 @@ public com.google.protobuf.ByteString getLogNameBytes() { * any results. * * - * string log_name = 12; + * string log_name = 12 [(.google.api.field_behavior) = REQUIRED]; * * @param value The logName to set. * @return This builder for chaining. @@ -2189,9 +2140,9 @@ public Builder setLogName(java.lang.String value) { * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" * "folders/[FOLDER_ID]/logs/[LOG_ID]" - * A project number may optionally be used in place of PROJECT_ID. The project - * number is translated to its corresponding PROJECT_ID internally and the - * `log_name` field will contain PROJECT_ID in queries and exports. + * A project number may be used in place of PROJECT_ID. The project number is + * translated to its corresponding PROJECT_ID internally and the `log_name` + * field will contain PROJECT_ID in queries and exports. * `[LOG_ID]` must be URL-encoded within `log_name`. Example: * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. * `[LOG_ID]` must be less than 512 characters long and can only include the @@ -2204,7 +2155,7 @@ public Builder setLogName(java.lang.String value) { * any results. * * - * string log_name = 12; + * string log_name = 12 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ @@ -2223,9 +2174,9 @@ public Builder clearLogName() { * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" * "folders/[FOLDER_ID]/logs/[LOG_ID]" - * A project number may optionally be used in place of PROJECT_ID. The project - * number is translated to its corresponding PROJECT_ID internally and the - * `log_name` field will contain PROJECT_ID in queries and exports. + * A project number may be used in place of PROJECT_ID. The project number is + * translated to its corresponding PROJECT_ID internally and the `log_name` + * field will contain PROJECT_ID in queries and exports. * `[LOG_ID]` must be URL-encoded within `log_name`. Example: * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. * `[LOG_ID]` must be less than 512 characters long and can only include the @@ -2238,7 +2189,7 @@ public Builder clearLogName() { * any results. * * - * string log_name = 12; + * string log_name = 12 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for logName to set. * @return This builder for chaining. @@ -2270,7 +2221,8 @@ public Builder setLogNameBytes(com.google.protobuf.ByteString value) { * the error. * * - * .google.api.MonitoredResource resource = 8; + * .google.api.MonitoredResource resource = 8 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the resource field is set. */ @@ -2287,7 +2239,8 @@ public boolean hasResource() { * the error. * * - * .google.api.MonitoredResource resource = 8; + * .google.api.MonitoredResource resource = 8 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The resource. */ @@ -2310,7 +2263,8 @@ public com.google.api.MonitoredResource getResource() { * the error. * * - * .google.api.MonitoredResource resource = 8; + * .google.api.MonitoredResource resource = 8 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setResource(com.google.api.MonitoredResource value) { if (resourceBuilder_ == null) { @@ -2335,7 +2289,8 @@ public Builder setResource(com.google.api.MonitoredResource value) { * the error. * * - * .google.api.MonitoredResource resource = 8; + * .google.api.MonitoredResource resource = 8 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setResource(com.google.api.MonitoredResource.Builder builderForValue) { if (resourceBuilder_ == null) { @@ -2357,7 +2312,8 @@ public Builder setResource(com.google.api.MonitoredResource.Builder builderForVa * the error. * * - * .google.api.MonitoredResource resource = 8; + * .google.api.MonitoredResource resource = 8 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder mergeResource(com.google.api.MonitoredResource value) { if (resourceBuilder_ == null) { @@ -2386,7 +2342,8 @@ public Builder mergeResource(com.google.api.MonitoredResource value) { * the error. * * - * .google.api.MonitoredResource resource = 8; + * .google.api.MonitoredResource resource = 8 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder clearResource() { if (resourceBuilder_ == null) { @@ -2409,7 +2366,8 @@ public Builder clearResource() { * the error. * * - * .google.api.MonitoredResource resource = 8; + * .google.api.MonitoredResource resource = 8 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.api.MonitoredResource.Builder getResourceBuilder() { @@ -2426,7 +2384,8 @@ public com.google.api.MonitoredResource.Builder getResourceBuilder() { * the error. * * - * .google.api.MonitoredResource resource = 8; + * .google.api.MonitoredResource resource = 8 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.api.MonitoredResourceOrBuilder getResourceOrBuilder() { if (resourceBuilder_ != null) { @@ -2447,7 +2406,8 @@ public com.google.api.MonitoredResourceOrBuilder getResourceOrBuilder() { * the error. * * - * .google.api.MonitoredResource resource = 8; + * .google.api.MonitoredResource resource = 8 [(.google.api.field_behavior) = REQUIRED]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.api.MonitoredResource, @@ -2487,6 +2447,7 @@ public com.google.api.MonitoredResourceOrBuilder getResourceOrBuilder() { * * @return Whether the protoPayload field is set. */ + @java.lang.Override public boolean hasProtoPayload() { return payloadCase_ == 2; } @@ -2506,6 +2467,7 @@ public boolean hasProtoPayload() { * * @return The protoPayload. */ + @java.lang.Override public com.google.protobuf.Any getProtoPayload() { if (protoPayloadBuilder_ == null) { if (payloadCase_ == 2) { @@ -2665,6 +2627,7 @@ public com.google.protobuf.Any.Builder getProtoPayloadBuilder() { * * .google.protobuf.Any proto_payload = 2; */ + @java.lang.Override public com.google.protobuf.AnyOrBuilder getProtoPayloadOrBuilder() { if ((payloadCase_ == 2) && (protoPayloadBuilder_ != null)) { return protoPayloadBuilder_.getMessageOrBuilder(); @@ -2723,6 +2686,7 @@ public com.google.protobuf.AnyOrBuilder getProtoPayloadOrBuilder() { * * @return The textPayload. */ + @java.lang.Override public java.lang.String getTextPayload() { java.lang.Object ref = ""; if (payloadCase_ == 3) { @@ -2750,6 +2714,7 @@ public java.lang.String getTextPayload() { * * @return The bytes for textPayload. */ + @java.lang.Override public com.google.protobuf.ByteString getTextPayloadBytes() { java.lang.Object ref = ""; if (payloadCase_ == 3) { @@ -2846,6 +2811,7 @@ public Builder setTextPayloadBytes(com.google.protobuf.ByteString value) { * * @return Whether the jsonPayload field is set. */ + @java.lang.Override public boolean hasJsonPayload() { return payloadCase_ == 6; } @@ -2861,6 +2827,7 @@ public boolean hasJsonPayload() { * * @return The jsonPayload. */ + @java.lang.Override public com.google.protobuf.Struct getJsonPayload() { if (jsonPayloadBuilder_ == null) { if (payloadCase_ == 6) { @@ -2996,6 +2963,7 @@ public com.google.protobuf.Struct.Builder getJsonPayloadBuilder() { * * .google.protobuf.Struct json_payload = 6; */ + @java.lang.Override public com.google.protobuf.StructOrBuilder getJsonPayloadOrBuilder() { if ((payloadCase_ == 6) && (jsonPayloadBuilder_ != null)) { return jsonPayloadBuilder_.getMessageOrBuilder(); @@ -3049,20 +3017,20 @@ public com.google.protobuf.StructOrBuilder getJsonPayloadOrBuilder() { * * *
-     * Optional. The time the event described by the log entry occurred.  This
-     * time is used to compute the log entry's age and to enforce the logs
-     * retention period. If this field is omitted in a new log entry, then Logging
-     * assigns it the current time.  Timestamps have nanosecond accuracy, but
-     * trailing zeros in the fractional seconds might be omitted when the
-     * timestamp is displayed.
+     * Optional. The time the event described by the log entry occurred. This time is used
+     * to compute the log entry's age and to enforce the logs retention period.
+     * If this field is omitted in a new log entry, then Logging assigns it the
+     * current time. Timestamps have nanosecond accuracy, but trailing zeros in
+     * the fractional seconds might be omitted when the timestamp is displayed.
      * Incoming log entries should have timestamps that are no more than the [logs
-     * retention period](/logging/quotas) in the past, and no more than 24 hours
+     * retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours
      * in the future. Log entries outside those time boundaries will not be
      * available when calling `entries.list`, but those log entries can still be
-     * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs).
+     * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
      * 
* - * .google.protobuf.Timestamp timestamp = 9; + * .google.protobuf.Timestamp timestamp = 9 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the timestamp field is set. */ @@ -3073,20 +3041,20 @@ public boolean hasTimestamp() { * * *
-     * Optional. The time the event described by the log entry occurred.  This
-     * time is used to compute the log entry's age and to enforce the logs
-     * retention period. If this field is omitted in a new log entry, then Logging
-     * assigns it the current time.  Timestamps have nanosecond accuracy, but
-     * trailing zeros in the fractional seconds might be omitted when the
-     * timestamp is displayed.
+     * Optional. The time the event described by the log entry occurred. This time is used
+     * to compute the log entry's age and to enforce the logs retention period.
+     * If this field is omitted in a new log entry, then Logging assigns it the
+     * current time. Timestamps have nanosecond accuracy, but trailing zeros in
+     * the fractional seconds might be omitted when the timestamp is displayed.
      * Incoming log entries should have timestamps that are no more than the [logs
-     * retention period](/logging/quotas) in the past, and no more than 24 hours
+     * retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours
      * in the future. Log entries outside those time boundaries will not be
      * available when calling `entries.list`, but those log entries can still be
-     * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs).
+     * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
      * 
* - * .google.protobuf.Timestamp timestamp = 9; + * .google.protobuf.Timestamp timestamp = 9 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The timestamp. */ @@ -3101,20 +3069,20 @@ public com.google.protobuf.Timestamp getTimestamp() { * * *
-     * Optional. The time the event described by the log entry occurred.  This
-     * time is used to compute the log entry's age and to enforce the logs
-     * retention period. If this field is omitted in a new log entry, then Logging
-     * assigns it the current time.  Timestamps have nanosecond accuracy, but
-     * trailing zeros in the fractional seconds might be omitted when the
-     * timestamp is displayed.
+     * Optional. The time the event described by the log entry occurred. This time is used
+     * to compute the log entry's age and to enforce the logs retention period.
+     * If this field is omitted in a new log entry, then Logging assigns it the
+     * current time. Timestamps have nanosecond accuracy, but trailing zeros in
+     * the fractional seconds might be omitted when the timestamp is displayed.
      * Incoming log entries should have timestamps that are no more than the [logs
-     * retention period](/logging/quotas) in the past, and no more than 24 hours
+     * retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours
      * in the future. Log entries outside those time boundaries will not be
      * available when calling `entries.list`, but those log entries can still be
-     * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs).
+     * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
      * 
* - * .google.protobuf.Timestamp timestamp = 9; + * .google.protobuf.Timestamp timestamp = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setTimestamp(com.google.protobuf.Timestamp value) { if (timestampBuilder_ == null) { @@ -3133,20 +3101,20 @@ public Builder setTimestamp(com.google.protobuf.Timestamp value) { * * *
-     * Optional. The time the event described by the log entry occurred.  This
-     * time is used to compute the log entry's age and to enforce the logs
-     * retention period. If this field is omitted in a new log entry, then Logging
-     * assigns it the current time.  Timestamps have nanosecond accuracy, but
-     * trailing zeros in the fractional seconds might be omitted when the
-     * timestamp is displayed.
+     * Optional. The time the event described by the log entry occurred. This time is used
+     * to compute the log entry's age and to enforce the logs retention period.
+     * If this field is omitted in a new log entry, then Logging assigns it the
+     * current time. Timestamps have nanosecond accuracy, but trailing zeros in
+     * the fractional seconds might be omitted when the timestamp is displayed.
      * Incoming log entries should have timestamps that are no more than the [logs
-     * retention period](/logging/quotas) in the past, and no more than 24 hours
+     * retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours
      * in the future. Log entries outside those time boundaries will not be
      * available when calling `entries.list`, but those log entries can still be
-     * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs).
+     * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
      * 
* - * .google.protobuf.Timestamp timestamp = 9; + * .google.protobuf.Timestamp timestamp = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setTimestamp(com.google.protobuf.Timestamp.Builder builderForValue) { if (timestampBuilder_ == null) { @@ -3162,20 +3130,20 @@ public Builder setTimestamp(com.google.protobuf.Timestamp.Builder builderForValu * * *
-     * Optional. The time the event described by the log entry occurred.  This
-     * time is used to compute the log entry's age and to enforce the logs
-     * retention period. If this field is omitted in a new log entry, then Logging
-     * assigns it the current time.  Timestamps have nanosecond accuracy, but
-     * trailing zeros in the fractional seconds might be omitted when the
-     * timestamp is displayed.
+     * Optional. The time the event described by the log entry occurred. This time is used
+     * to compute the log entry's age and to enforce the logs retention period.
+     * If this field is omitted in a new log entry, then Logging assigns it the
+     * current time. Timestamps have nanosecond accuracy, but trailing zeros in
+     * the fractional seconds might be omitted when the timestamp is displayed.
      * Incoming log entries should have timestamps that are no more than the [logs
-     * retention period](/logging/quotas) in the past, and no more than 24 hours
+     * retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours
      * in the future. Log entries outside those time boundaries will not be
      * available when calling `entries.list`, but those log entries can still be
-     * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs).
+     * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
      * 
* - * .google.protobuf.Timestamp timestamp = 9; + * .google.protobuf.Timestamp timestamp = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeTimestamp(com.google.protobuf.Timestamp value) { if (timestampBuilder_ == null) { @@ -3196,20 +3164,20 @@ public Builder mergeTimestamp(com.google.protobuf.Timestamp value) { * * *
-     * Optional. The time the event described by the log entry occurred.  This
-     * time is used to compute the log entry's age and to enforce the logs
-     * retention period. If this field is omitted in a new log entry, then Logging
-     * assigns it the current time.  Timestamps have nanosecond accuracy, but
-     * trailing zeros in the fractional seconds might be omitted when the
-     * timestamp is displayed.
+     * Optional. The time the event described by the log entry occurred. This time is used
+     * to compute the log entry's age and to enforce the logs retention period.
+     * If this field is omitted in a new log entry, then Logging assigns it the
+     * current time. Timestamps have nanosecond accuracy, but trailing zeros in
+     * the fractional seconds might be omitted when the timestamp is displayed.
      * Incoming log entries should have timestamps that are no more than the [logs
-     * retention period](/logging/quotas) in the past, and no more than 24 hours
+     * retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours
      * in the future. Log entries outside those time boundaries will not be
      * available when calling `entries.list`, but those log entries can still be
-     * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs).
+     * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
      * 
* - * .google.protobuf.Timestamp timestamp = 9; + * .google.protobuf.Timestamp timestamp = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearTimestamp() { if (timestampBuilder_ == null) { @@ -3226,20 +3194,20 @@ public Builder clearTimestamp() { * * *
-     * Optional. The time the event described by the log entry occurred.  This
-     * time is used to compute the log entry's age and to enforce the logs
-     * retention period. If this field is omitted in a new log entry, then Logging
-     * assigns it the current time.  Timestamps have nanosecond accuracy, but
-     * trailing zeros in the fractional seconds might be omitted when the
-     * timestamp is displayed.
+     * Optional. The time the event described by the log entry occurred. This time is used
+     * to compute the log entry's age and to enforce the logs retention period.
+     * If this field is omitted in a new log entry, then Logging assigns it the
+     * current time. Timestamps have nanosecond accuracy, but trailing zeros in
+     * the fractional seconds might be omitted when the timestamp is displayed.
      * Incoming log entries should have timestamps that are no more than the [logs
-     * retention period](/logging/quotas) in the past, and no more than 24 hours
+     * retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours
      * in the future. Log entries outside those time boundaries will not be
      * available when calling `entries.list`, but those log entries can still be
-     * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs).
+     * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
      * 
* - * .google.protobuf.Timestamp timestamp = 9; + * .google.protobuf.Timestamp timestamp = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.protobuf.Timestamp.Builder getTimestampBuilder() { @@ -3250,20 +3218,20 @@ public com.google.protobuf.Timestamp.Builder getTimestampBuilder() { * * *
-     * Optional. The time the event described by the log entry occurred.  This
-     * time is used to compute the log entry's age and to enforce the logs
-     * retention period. If this field is omitted in a new log entry, then Logging
-     * assigns it the current time.  Timestamps have nanosecond accuracy, but
-     * trailing zeros in the fractional seconds might be omitted when the
-     * timestamp is displayed.
+     * Optional. The time the event described by the log entry occurred. This time is used
+     * to compute the log entry's age and to enforce the logs retention period.
+     * If this field is omitted in a new log entry, then Logging assigns it the
+     * current time. Timestamps have nanosecond accuracy, but trailing zeros in
+     * the fractional seconds might be omitted when the timestamp is displayed.
      * Incoming log entries should have timestamps that are no more than the [logs
-     * retention period](/logging/quotas) in the past, and no more than 24 hours
+     * retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours
      * in the future. Log entries outside those time boundaries will not be
      * available when calling `entries.list`, but those log entries can still be
-     * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs).
+     * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
      * 
* - * .google.protobuf.Timestamp timestamp = 9; + * .google.protobuf.Timestamp timestamp = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { if (timestampBuilder_ != null) { @@ -3276,20 +3244,20 @@ public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { * * *
-     * Optional. The time the event described by the log entry occurred.  This
-     * time is used to compute the log entry's age and to enforce the logs
-     * retention period. If this field is omitted in a new log entry, then Logging
-     * assigns it the current time.  Timestamps have nanosecond accuracy, but
-     * trailing zeros in the fractional seconds might be omitted when the
-     * timestamp is displayed.
+     * Optional. The time the event described by the log entry occurred. This time is used
+     * to compute the log entry's age and to enforce the logs retention period.
+     * If this field is omitted in a new log entry, then Logging assigns it the
+     * current time. Timestamps have nanosecond accuracy, but trailing zeros in
+     * the fractional seconds might be omitted when the timestamp is displayed.
      * Incoming log entries should have timestamps that are no more than the [logs
-     * retention period](/logging/quotas) in the past, and no more than 24 hours
+     * retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours
      * in the future. Log entries outside those time boundaries will not be
      * available when calling `entries.list`, but those log entries can still be
-     * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs).
+     * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
      * 
* - * .google.protobuf.Timestamp timestamp = 9; + * .google.protobuf.Timestamp timestamp = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, @@ -3321,7 +3289,9 @@ public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { * Output only. The time the log entry was received by Logging. * * - * .google.protobuf.Timestamp receive_timestamp = 24; + * + * .google.protobuf.Timestamp receive_timestamp = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the receiveTimestamp field is set. */ @@ -3335,7 +3305,9 @@ public boolean hasReceiveTimestamp() { * Output only. The time the log entry was received by Logging. * * - * .google.protobuf.Timestamp receive_timestamp = 24; + * + * .google.protobuf.Timestamp receive_timestamp = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The receiveTimestamp. */ @@ -3355,7 +3327,9 @@ public com.google.protobuf.Timestamp getReceiveTimestamp() { * Output only. The time the log entry was received by Logging. * * - * .google.protobuf.Timestamp receive_timestamp = 24; + * + * .google.protobuf.Timestamp receive_timestamp = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder setReceiveTimestamp(com.google.protobuf.Timestamp value) { if (receiveTimestampBuilder_ == null) { @@ -3377,7 +3351,9 @@ public Builder setReceiveTimestamp(com.google.protobuf.Timestamp value) { * Output only. The time the log entry was received by Logging. * * - * .google.protobuf.Timestamp receive_timestamp = 24; + * + * .google.protobuf.Timestamp receive_timestamp = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder setReceiveTimestamp(com.google.protobuf.Timestamp.Builder builderForValue) { if (receiveTimestampBuilder_ == null) { @@ -3396,7 +3372,9 @@ public Builder setReceiveTimestamp(com.google.protobuf.Timestamp.Builder builder * Output only. The time the log entry was received by Logging. * * - * .google.protobuf.Timestamp receive_timestamp = 24; + * + * .google.protobuf.Timestamp receive_timestamp = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder mergeReceiveTimestamp(com.google.protobuf.Timestamp value) { if (receiveTimestampBuilder_ == null) { @@ -3422,7 +3400,9 @@ public Builder mergeReceiveTimestamp(com.google.protobuf.Timestamp value) { * Output only. The time the log entry was received by Logging. * * - * .google.protobuf.Timestamp receive_timestamp = 24; + * + * .google.protobuf.Timestamp receive_timestamp = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder clearReceiveTimestamp() { if (receiveTimestampBuilder_ == null) { @@ -3442,7 +3422,9 @@ public Builder clearReceiveTimestamp() { * Output only. The time the log entry was received by Logging. * * - * .google.protobuf.Timestamp receive_timestamp = 24; + * + * .google.protobuf.Timestamp receive_timestamp = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public com.google.protobuf.Timestamp.Builder getReceiveTimestampBuilder() { @@ -3456,7 +3438,9 @@ public com.google.protobuf.Timestamp.Builder getReceiveTimestampBuilder() { * Output only. The time the log entry was received by Logging. * * - * .google.protobuf.Timestamp receive_timestamp = 24; + * + * .google.protobuf.Timestamp receive_timestamp = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public com.google.protobuf.TimestampOrBuilder getReceiveTimestampOrBuilder() { if (receiveTimestampBuilder_ != null) { @@ -3474,7 +3458,9 @@ public com.google.protobuf.TimestampOrBuilder getReceiveTimestampOrBuilder() { * Output only. The time the log entry was received by Logging. * * - * .google.protobuf.Timestamp receive_timestamp = 24; + * + * .google.protobuf.Timestamp receive_timestamp = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, @@ -3498,14 +3484,16 @@ public com.google.protobuf.TimestampOrBuilder getReceiveTimestampOrBuilder() { * * *
-     * Optional. The severity of the log entry. The default value is
-     * `LogSeverity.DEFAULT`.
+     * Optional. The severity of the log entry. The default value is `LogSeverity.DEFAULT`.
      * 
* - * .google.logging.type.LogSeverity severity = 10; + * + * .google.logging.type.LogSeverity severity = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The enum numeric value on the wire for severity. */ + @java.lang.Override public int getSeverityValue() { return severity_; } @@ -3513,16 +3501,18 @@ public int getSeverityValue() { * * *
-     * Optional. The severity of the log entry. The default value is
-     * `LogSeverity.DEFAULT`.
+     * Optional. The severity of the log entry. The default value is `LogSeverity.DEFAULT`.
      * 
* - * .google.logging.type.LogSeverity severity = 10; + * + * .google.logging.type.LogSeverity severity = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param value The enum numeric value on the wire for severity to set. * @return This builder for chaining. */ public Builder setSeverityValue(int value) { + severity_ = value; onChanged(); return this; @@ -3531,14 +3521,16 @@ public Builder setSeverityValue(int value) { * * *
-     * Optional. The severity of the log entry. The default value is
-     * `LogSeverity.DEFAULT`.
+     * Optional. The severity of the log entry. The default value is `LogSeverity.DEFAULT`.
      * 
* - * .google.logging.type.LogSeverity severity = 10; + * + * .google.logging.type.LogSeverity severity = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The severity. */ + @java.lang.Override public com.google.logging.type.LogSeverity getSeverity() { @SuppressWarnings("deprecation") com.google.logging.type.LogSeverity result = @@ -3549,11 +3541,12 @@ public com.google.logging.type.LogSeverity getSeverity() { * * *
-     * Optional. The severity of the log entry. The default value is
-     * `LogSeverity.DEFAULT`.
+     * Optional. The severity of the log entry. The default value is `LogSeverity.DEFAULT`.
      * 
* - * .google.logging.type.LogSeverity severity = 10; + * + * .google.logging.type.LogSeverity severity = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param value The severity to set. * @return This builder for chaining. @@ -3571,11 +3564,12 @@ public Builder setSeverity(com.google.logging.type.LogSeverity value) { * * *
-     * Optional. The severity of the log entry. The default value is
-     * `LogSeverity.DEFAULT`.
+     * Optional. The severity of the log entry. The default value is `LogSeverity.DEFAULT`.
      * 
* - * .google.logging.type.LogSeverity severity = 10; + * + * .google.logging.type.LogSeverity severity = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return This builder for chaining. */ @@ -3591,8 +3585,8 @@ public Builder clearSeverity() { * * *
-     * Optional. A unique identifier for the log entry. If you provide a value,
-     * then Logging considers other log entries in the same project, with the same
+     * Optional. A unique identifier for the log entry. If you provide a value, then
+     * Logging considers other log entries in the same project, with the same
      * `timestamp`, and with the same `insert_id` to be duplicates which are
      * removed in a single query result. However, there are no guarantees of
      * de-duplication in the export of logs.
@@ -3602,7 +3596,7 @@ public Builder clearSeverity() {
      * the same `log_name` and `timestamp` values.
      * 
* - * string insert_id = 4; + * string insert_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The insertId. */ @@ -3621,8 +3615,8 @@ public java.lang.String getInsertId() { * * *
-     * Optional. A unique identifier for the log entry. If you provide a value,
-     * then Logging considers other log entries in the same project, with the same
+     * Optional. A unique identifier for the log entry. If you provide a value, then
+     * Logging considers other log entries in the same project, with the same
      * `timestamp`, and with the same `insert_id` to be duplicates which are
      * removed in a single query result. However, there are no guarantees of
      * de-duplication in the export of logs.
@@ -3632,7 +3626,7 @@ public java.lang.String getInsertId() {
      * the same `log_name` and `timestamp` values.
      * 
* - * string insert_id = 4; + * string insert_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for insertId. */ @@ -3651,8 +3645,8 @@ public com.google.protobuf.ByteString getInsertIdBytes() { * * *
-     * Optional. A unique identifier for the log entry. If you provide a value,
-     * then Logging considers other log entries in the same project, with the same
+     * Optional. A unique identifier for the log entry. If you provide a value, then
+     * Logging considers other log entries in the same project, with the same
      * `timestamp`, and with the same `insert_id` to be duplicates which are
      * removed in a single query result. However, there are no guarantees of
      * de-duplication in the export of logs.
@@ -3662,7 +3656,7 @@ public com.google.protobuf.ByteString getInsertIdBytes() {
      * the same `log_name` and `timestamp` values.
      * 
* - * string insert_id = 4; + * string insert_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The insertId to set. * @return This builder for chaining. @@ -3680,8 +3674,8 @@ public Builder setInsertId(java.lang.String value) { * * *
-     * Optional. A unique identifier for the log entry. If you provide a value,
-     * then Logging considers other log entries in the same project, with the same
+     * Optional. A unique identifier for the log entry. If you provide a value, then
+     * Logging considers other log entries in the same project, with the same
      * `timestamp`, and with the same `insert_id` to be duplicates which are
      * removed in a single query result. However, there are no guarantees of
      * de-duplication in the export of logs.
@@ -3691,7 +3685,7 @@ public Builder setInsertId(java.lang.String value) {
      * the same `log_name` and `timestamp` values.
      * 
* - * string insert_id = 4; + * string insert_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -3705,8 +3699,8 @@ public Builder clearInsertId() { * * *
-     * Optional. A unique identifier for the log entry. If you provide a value,
-     * then Logging considers other log entries in the same project, with the same
+     * Optional. A unique identifier for the log entry. If you provide a value, then
+     * Logging considers other log entries in the same project, with the same
      * `timestamp`, and with the same `insert_id` to be duplicates which are
      * removed in a single query result. However, there are no guarantees of
      * de-duplication in the export of logs.
@@ -3716,7 +3710,7 @@ public Builder clearInsertId() {
      * the same `log_name` and `timestamp` values.
      * 
* - * string insert_id = 4; + * string insert_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for insertId to set. * @return This builder for chaining. @@ -3742,11 +3736,13 @@ public Builder setInsertIdBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. Information about the HTTP request associated with this log
-     * entry, if applicable.
+     * Optional. Information about the HTTP request associated with this log entry, if
+     * applicable.
      * 
* - * .google.logging.type.HttpRequest http_request = 7; + * + * .google.logging.type.HttpRequest http_request = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the httpRequest field is set. */ @@ -3757,11 +3753,13 @@ public boolean hasHttpRequest() { * * *
-     * Optional. Information about the HTTP request associated with this log
-     * entry, if applicable.
+     * Optional. Information about the HTTP request associated with this log entry, if
+     * applicable.
      * 
* - * .google.logging.type.HttpRequest http_request = 7; + * + * .google.logging.type.HttpRequest http_request = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The httpRequest. */ @@ -3778,11 +3776,13 @@ public com.google.logging.type.HttpRequest getHttpRequest() { * * *
-     * Optional. Information about the HTTP request associated with this log
-     * entry, if applicable.
+     * Optional. Information about the HTTP request associated with this log entry, if
+     * applicable.
      * 
* - * .google.logging.type.HttpRequest http_request = 7; + * + * .google.logging.type.HttpRequest http_request = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setHttpRequest(com.google.logging.type.HttpRequest value) { if (httpRequestBuilder_ == null) { @@ -3801,11 +3801,13 @@ public Builder setHttpRequest(com.google.logging.type.HttpRequest value) { * * *
-     * Optional. Information about the HTTP request associated with this log
-     * entry, if applicable.
+     * Optional. Information about the HTTP request associated with this log entry, if
+     * applicable.
      * 
* - * .google.logging.type.HttpRequest http_request = 7; + * + * .google.logging.type.HttpRequest http_request = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setHttpRequest(com.google.logging.type.HttpRequest.Builder builderForValue) { if (httpRequestBuilder_ == null) { @@ -3821,11 +3823,13 @@ public Builder setHttpRequest(com.google.logging.type.HttpRequest.Builder builde * * *
-     * Optional. Information about the HTTP request associated with this log
-     * entry, if applicable.
+     * Optional. Information about the HTTP request associated with this log entry, if
+     * applicable.
      * 
* - * .google.logging.type.HttpRequest http_request = 7; + * + * .google.logging.type.HttpRequest http_request = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeHttpRequest(com.google.logging.type.HttpRequest value) { if (httpRequestBuilder_ == null) { @@ -3848,11 +3852,13 @@ public Builder mergeHttpRequest(com.google.logging.type.HttpRequest value) { * * *
-     * Optional. Information about the HTTP request associated with this log
-     * entry, if applicable.
+     * Optional. Information about the HTTP request associated with this log entry, if
+     * applicable.
      * 
* - * .google.logging.type.HttpRequest http_request = 7; + * + * .google.logging.type.HttpRequest http_request = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearHttpRequest() { if (httpRequestBuilder_ == null) { @@ -3869,11 +3875,13 @@ public Builder clearHttpRequest() { * * *
-     * Optional. Information about the HTTP request associated with this log
-     * entry, if applicable.
+     * Optional. Information about the HTTP request associated with this log entry, if
+     * applicable.
      * 
* - * .google.logging.type.HttpRequest http_request = 7; + * + * .google.logging.type.HttpRequest http_request = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.logging.type.HttpRequest.Builder getHttpRequestBuilder() { @@ -3884,11 +3892,13 @@ public com.google.logging.type.HttpRequest.Builder getHttpRequestBuilder() { * * *
-     * Optional. Information about the HTTP request associated with this log
-     * entry, if applicable.
+     * Optional. Information about the HTTP request associated with this log entry, if
+     * applicable.
      * 
* - * .google.logging.type.HttpRequest http_request = 7; + * + * .google.logging.type.HttpRequest http_request = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.logging.type.HttpRequestOrBuilder getHttpRequestOrBuilder() { if (httpRequestBuilder_ != null) { @@ -3903,11 +3913,13 @@ public com.google.logging.type.HttpRequestOrBuilder getHttpRequestOrBuilder() { * * *
-     * Optional. Information about the HTTP request associated with this log
-     * entry, if applicable.
+     * Optional. Information about the HTTP request associated with this log entry, if
+     * applicable.
      * 
* - * .google.logging.type.HttpRequest http_request = 7; + * + * .google.logging.type.HttpRequest http_request = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.logging.type.HttpRequest, @@ -3959,8 +3971,9 @@ public int getLabelsCount() { * information about the log entry. * * - * map<string, string> labels = 11; + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; */ + @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -3968,6 +3981,7 @@ public boolean containsLabels(java.lang.String key) { return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); @@ -3980,8 +3994,9 @@ public java.util.Map getLabels() { * information about the log entry. * * - * map<string, string> labels = 11; + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; */ + @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } @@ -3993,8 +4008,9 @@ public java.util.Map getLabelsMap() { * information about the log entry. * * - * map<string, string> labels = 11; + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; */ + @java.lang.Override public java.lang.String getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -4011,8 +4027,9 @@ public java.lang.String getLabelsOrDefault( * information about the log entry. * * - * map<string, string> labels = 11; + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; */ + @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -4036,7 +4053,7 @@ public Builder clearLabels() { * information about the log entry. * * - * map<string, string> labels = 11; + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder removeLabels(java.lang.String key) { if (key == null) { @@ -4058,7 +4075,7 @@ public java.util.Map getMutableLabels() { * information about the log entry. * * - * map<string, string> labels = 11; + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder putLabels(java.lang.String key, java.lang.String value) { if (key == null) { @@ -4078,269 +4095,13 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { * information about the log entry. * * - * map<string, string> labels = 11; + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder putAllLabels(java.util.Map values) { internalGetMutableLabels().getMutableMap().putAll(values); return this; } - private com.google.api.MonitoredResourceMetadata metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.api.MonitoredResourceMetadata, - com.google.api.MonitoredResourceMetadata.Builder, - com.google.api.MonitoredResourceMetadataOrBuilder> - metadataBuilder_; - /** - * - * - *
-     * Deprecated. Output only. Additional metadata about the monitored resource.
-     * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
-     * this field populated for GKE versions older than 1.12.6. For GKE versions
-     * 1.12.6 and above, the `metadata` field has been deprecated. The Kubernetes
-     * pod labels that used to be in `metadata.userLabels` will now be present in
-     * the `labels` field with a key prefix of `k8s-pod/`. The Stackdriver system
-     * labels that were present in the `metadata.systemLabels` field will no
-     * longer be available in the LogEntry.
-     * 
- * - * .google.api.MonitoredResourceMetadata metadata = 25 [deprecated = true]; - * - * @return Whether the metadata field is set. - */ - @java.lang.Deprecated - public boolean hasMetadata() { - return metadataBuilder_ != null || metadata_ != null; - } - /** - * - * - *
-     * Deprecated. Output only. Additional metadata about the monitored resource.
-     * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
-     * this field populated for GKE versions older than 1.12.6. For GKE versions
-     * 1.12.6 and above, the `metadata` field has been deprecated. The Kubernetes
-     * pod labels that used to be in `metadata.userLabels` will now be present in
-     * the `labels` field with a key prefix of `k8s-pod/`. The Stackdriver system
-     * labels that were present in the `metadata.systemLabels` field will no
-     * longer be available in the LogEntry.
-     * 
- * - * .google.api.MonitoredResourceMetadata metadata = 25 [deprecated = true]; - * - * @return The metadata. - */ - @java.lang.Deprecated - public com.google.api.MonitoredResourceMetadata getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null - ? com.google.api.MonitoredResourceMetadata.getDefaultInstance() - : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Deprecated. Output only. Additional metadata about the monitored resource.
-     * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
-     * this field populated for GKE versions older than 1.12.6. For GKE versions
-     * 1.12.6 and above, the `metadata` field has been deprecated. The Kubernetes
-     * pod labels that used to be in `metadata.userLabels` will now be present in
-     * the `labels` field with a key prefix of `k8s-pod/`. The Stackdriver system
-     * labels that were present in the `metadata.systemLabels` field will no
-     * longer be available in the LogEntry.
-     * 
- * - * .google.api.MonitoredResourceMetadata metadata = 25 [deprecated = true]; - */ - @java.lang.Deprecated - public Builder setMetadata(com.google.api.MonitoredResourceMetadata value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - onChanged(); - } else { - metadataBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Deprecated. Output only. Additional metadata about the monitored resource.
-     * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
-     * this field populated for GKE versions older than 1.12.6. For GKE versions
-     * 1.12.6 and above, the `metadata` field has been deprecated. The Kubernetes
-     * pod labels that used to be in `metadata.userLabels` will now be present in
-     * the `labels` field with a key prefix of `k8s-pod/`. The Stackdriver system
-     * labels that were present in the `metadata.systemLabels` field will no
-     * longer be available in the LogEntry.
-     * 
- * - * .google.api.MonitoredResourceMetadata metadata = 25 [deprecated = true]; - */ - @java.lang.Deprecated - public Builder setMetadata(com.google.api.MonitoredResourceMetadata.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - onChanged(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Deprecated. Output only. Additional metadata about the monitored resource.
-     * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
-     * this field populated for GKE versions older than 1.12.6. For GKE versions
-     * 1.12.6 and above, the `metadata` field has been deprecated. The Kubernetes
-     * pod labels that used to be in `metadata.userLabels` will now be present in
-     * the `labels` field with a key prefix of `k8s-pod/`. The Stackdriver system
-     * labels that were present in the `metadata.systemLabels` field will no
-     * longer be available in the LogEntry.
-     * 
- * - * .google.api.MonitoredResourceMetadata metadata = 25 [deprecated = true]; - */ - @java.lang.Deprecated - public Builder mergeMetadata(com.google.api.MonitoredResourceMetadata value) { - if (metadataBuilder_ == null) { - if (metadata_ != null) { - metadata_ = - com.google.api.MonitoredResourceMetadata.newBuilder(metadata_) - .mergeFrom(value) - .buildPartial(); - } else { - metadata_ = value; - } - onChanged(); - } else { - metadataBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Deprecated. Output only. Additional metadata about the monitored resource.
-     * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
-     * this field populated for GKE versions older than 1.12.6. For GKE versions
-     * 1.12.6 and above, the `metadata` field has been deprecated. The Kubernetes
-     * pod labels that used to be in `metadata.userLabels` will now be present in
-     * the `labels` field with a key prefix of `k8s-pod/`. The Stackdriver system
-     * labels that were present in the `metadata.systemLabels` field will no
-     * longer be available in the LogEntry.
-     * 
- * - * .google.api.MonitoredResourceMetadata metadata = 25 [deprecated = true]; - */ - @java.lang.Deprecated - public Builder clearMetadata() { - if (metadataBuilder_ == null) { - metadata_ = null; - onChanged(); - } else { - metadata_ = null; - metadataBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Deprecated. Output only. Additional metadata about the monitored resource.
-     * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
-     * this field populated for GKE versions older than 1.12.6. For GKE versions
-     * 1.12.6 and above, the `metadata` field has been deprecated. The Kubernetes
-     * pod labels that used to be in `metadata.userLabels` will now be present in
-     * the `labels` field with a key prefix of `k8s-pod/`. The Stackdriver system
-     * labels that were present in the `metadata.systemLabels` field will no
-     * longer be available in the LogEntry.
-     * 
- * - * .google.api.MonitoredResourceMetadata metadata = 25 [deprecated = true]; - */ - @java.lang.Deprecated - public com.google.api.MonitoredResourceMetadata.Builder getMetadataBuilder() { - - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Deprecated. Output only. Additional metadata about the monitored resource.
-     * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
-     * this field populated for GKE versions older than 1.12.6. For GKE versions
-     * 1.12.6 and above, the `metadata` field has been deprecated. The Kubernetes
-     * pod labels that used to be in `metadata.userLabels` will now be present in
-     * the `labels` field with a key prefix of `k8s-pod/`. The Stackdriver system
-     * labels that were present in the `metadata.systemLabels` field will no
-     * longer be available in the LogEntry.
-     * 
- * - * .google.api.MonitoredResourceMetadata metadata = 25 [deprecated = true]; - */ - @java.lang.Deprecated - public com.google.api.MonitoredResourceMetadataOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null - ? com.google.api.MonitoredResourceMetadata.getDefaultInstance() - : metadata_; - } - } - /** - * - * - *
-     * Deprecated. Output only. Additional metadata about the monitored resource.
-     * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
-     * this field populated for GKE versions older than 1.12.6. For GKE versions
-     * 1.12.6 and above, the `metadata` field has been deprecated. The Kubernetes
-     * pod labels that used to be in `metadata.userLabels` will now be present in
-     * the `labels` field with a key prefix of `k8s-pod/`. The Stackdriver system
-     * labels that were present in the `metadata.systemLabels` field will no
-     * longer be available in the LogEntry.
-     * 
- * - * .google.api.MonitoredResourceMetadata metadata = 25 [deprecated = true]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.api.MonitoredResourceMetadata, - com.google.api.MonitoredResourceMetadata.Builder, - com.google.api.MonitoredResourceMetadataOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.api.MonitoredResourceMetadata, - com.google.api.MonitoredResourceMetadata.Builder, - com.google.api.MonitoredResourceMetadataOrBuilder>( - getMetadata(), getParentForChildren(), isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - private com.google.logging.v2.LogEntryOperation operation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.logging.v2.LogEntryOperation, @@ -4355,7 +4116,9 @@ public com.google.api.MonitoredResourceMetadataOrBuilder getMetadataOrBuilder() * applicable. * * - * .google.logging.v2.LogEntryOperation operation = 15; + * + * .google.logging.v2.LogEntryOperation operation = 15 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the operation field is set. */ @@ -4370,7 +4133,9 @@ public boolean hasOperation() { * applicable. * * - * .google.logging.v2.LogEntryOperation operation = 15; + * + * .google.logging.v2.LogEntryOperation operation = 15 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The operation. */ @@ -4391,7 +4156,9 @@ public com.google.logging.v2.LogEntryOperation getOperation() { * applicable. * * - * .google.logging.v2.LogEntryOperation operation = 15; + * + * .google.logging.v2.LogEntryOperation operation = 15 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setOperation(com.google.logging.v2.LogEntryOperation value) { if (operationBuilder_ == null) { @@ -4414,7 +4181,9 @@ public Builder setOperation(com.google.logging.v2.LogEntryOperation value) { * applicable. * * - * .google.logging.v2.LogEntryOperation operation = 15; + * + * .google.logging.v2.LogEntryOperation operation = 15 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setOperation(com.google.logging.v2.LogEntryOperation.Builder builderForValue) { if (operationBuilder_ == null) { @@ -4434,7 +4203,9 @@ public Builder setOperation(com.google.logging.v2.LogEntryOperation.Builder buil * applicable. * * - * .google.logging.v2.LogEntryOperation operation = 15; + * + * .google.logging.v2.LogEntryOperation operation = 15 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeOperation(com.google.logging.v2.LogEntryOperation value) { if (operationBuilder_ == null) { @@ -4461,7 +4232,9 @@ public Builder mergeOperation(com.google.logging.v2.LogEntryOperation value) { * applicable. * * - * .google.logging.v2.LogEntryOperation operation = 15; + * + * .google.logging.v2.LogEntryOperation operation = 15 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearOperation() { if (operationBuilder_ == null) { @@ -4482,7 +4255,9 @@ public Builder clearOperation() { * applicable. * * - * .google.logging.v2.LogEntryOperation operation = 15; + * + * .google.logging.v2.LogEntryOperation operation = 15 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.logging.v2.LogEntryOperation.Builder getOperationBuilder() { @@ -4497,7 +4272,9 @@ public com.google.logging.v2.LogEntryOperation.Builder getOperationBuilder() { * applicable. * * - * .google.logging.v2.LogEntryOperation operation = 15; + * + * .google.logging.v2.LogEntryOperation operation = 15 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.logging.v2.LogEntryOperationOrBuilder getOperationOrBuilder() { if (operationBuilder_ != null) { @@ -4516,7 +4293,9 @@ public com.google.logging.v2.LogEntryOperationOrBuilder getOperationOrBuilder() * applicable. * * - * .google.logging.v2.LogEntryOperation operation = 15; + * + * .google.logging.v2.LogEntryOperation operation = 15 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.logging.v2.LogEntryOperation, @@ -4540,13 +4319,13 @@ public com.google.logging.v2.LogEntryOperationOrBuilder getOperationOrBuilder() * * *
-     * Optional. Resource name of the trace associated with the log entry, if any.
-     * If it contains a relative resource name, the name is assumed to be relative
-     * to `//tracing.googleapis.com`. Example:
+     * Optional. Resource name of the trace associated with the log entry, if any. If it
+     * contains a relative resource name, the name is assumed to be relative to
+     * `//tracing.googleapis.com`. Example:
      * `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
      * 
* - * string trace = 22; + * string trace = 22 [(.google.api.field_behavior) = OPTIONAL]; * * @return The trace. */ @@ -4565,13 +4344,13 @@ public java.lang.String getTrace() { * * *
-     * Optional. Resource name of the trace associated with the log entry, if any.
-     * If it contains a relative resource name, the name is assumed to be relative
-     * to `//tracing.googleapis.com`. Example:
+     * Optional. Resource name of the trace associated with the log entry, if any. If it
+     * contains a relative resource name, the name is assumed to be relative to
+     * `//tracing.googleapis.com`. Example:
      * `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
      * 
* - * string trace = 22; + * string trace = 22 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for trace. */ @@ -4590,13 +4369,13 @@ public com.google.protobuf.ByteString getTraceBytes() { * * *
-     * Optional. Resource name of the trace associated with the log entry, if any.
-     * If it contains a relative resource name, the name is assumed to be relative
-     * to `//tracing.googleapis.com`. Example:
+     * Optional. Resource name of the trace associated with the log entry, if any. If it
+     * contains a relative resource name, the name is assumed to be relative to
+     * `//tracing.googleapis.com`. Example:
      * `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
      * 
* - * string trace = 22; + * string trace = 22 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The trace to set. * @return This builder for chaining. @@ -4614,13 +4393,13 @@ public Builder setTrace(java.lang.String value) { * * *
-     * Optional. Resource name of the trace associated with the log entry, if any.
-     * If it contains a relative resource name, the name is assumed to be relative
-     * to `//tracing.googleapis.com`. Example:
+     * Optional. Resource name of the trace associated with the log entry, if any. If it
+     * contains a relative resource name, the name is assumed to be relative to
+     * `//tracing.googleapis.com`. Example:
      * `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
      * 
* - * string trace = 22; + * string trace = 22 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -4634,13 +4413,13 @@ public Builder clearTrace() { * * *
-     * Optional. Resource name of the trace associated with the log entry, if any.
-     * If it contains a relative resource name, the name is assumed to be relative
-     * to `//tracing.googleapis.com`. Example:
+     * Optional. Resource name of the trace associated with the log entry, if any. If it
+     * contains a relative resource name, the name is assumed to be relative to
+     * `//tracing.googleapis.com`. Example:
      * `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
      * 
* - * string trace = 22; + * string trace = 22 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for trace to set. * @return This builder for chaining. @@ -4664,10 +4443,10 @@ public Builder setTraceBytes(com.google.protobuf.ByteString value) { * Optional. The span ID within the trace associated with the log entry. * For Trace spans, this is the same format that the Trace API v2 uses: a * 16-character hexadecimal encoding of an 8-byte array, such as - * <code>"000000000000004a"</code>. + * `000000000000004a`. * * - * string span_id = 27; + * string span_id = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @return The spanId. */ @@ -4689,10 +4468,10 @@ public java.lang.String getSpanId() { * Optional. The span ID within the trace associated with the log entry. * For Trace spans, this is the same format that the Trace API v2 uses: a * 16-character hexadecimal encoding of an 8-byte array, such as - * <code>"000000000000004a"</code>. + * `000000000000004a`. * * - * string span_id = 27; + * string span_id = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for spanId. */ @@ -4714,10 +4493,10 @@ public com.google.protobuf.ByteString getSpanIdBytes() { * Optional. The span ID within the trace associated with the log entry. * For Trace spans, this is the same format that the Trace API v2 uses: a * 16-character hexadecimal encoding of an 8-byte array, such as - * <code>"000000000000004a"</code>. + * `000000000000004a`. * * - * string span_id = 27; + * string span_id = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The spanId to set. * @return This builder for chaining. @@ -4738,10 +4517,10 @@ public Builder setSpanId(java.lang.String value) { * Optional. The span ID within the trace associated with the log entry. * For Trace spans, this is the same format that the Trace API v2 uses: a * 16-character hexadecimal encoding of an 8-byte array, such as - * <code>"000000000000004a"</code>. + * `000000000000004a`. * * - * string span_id = 27; + * string span_id = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -4758,10 +4537,10 @@ public Builder clearSpanId() { * Optional. The span ID within the trace associated with the log entry. * For Trace spans, this is the same format that the Trace API v2 uses: a * 16-character hexadecimal encoding of an 8-byte array, such as - * <code>"000000000000004a"</code>. + * `000000000000004a`. * * - * string span_id = 27; + * string span_id = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for spanId to set. * @return This builder for chaining. @@ -4790,10 +4569,11 @@ public Builder setSpanIdBytes(com.google.protobuf.ByteString value) { * request correlation identifier. The default is False. * * - * bool trace_sampled = 30; + * bool trace_sampled = 30 [(.google.api.field_behavior) = OPTIONAL]; * * @return The traceSampled. */ + @java.lang.Override public boolean getTraceSampled() { return traceSampled_; } @@ -4809,7 +4589,7 @@ public boolean getTraceSampled() { * request correlation identifier. The default is False. * * - * bool trace_sampled = 30; + * bool trace_sampled = 30 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The traceSampled to set. * @return This builder for chaining. @@ -4832,7 +4612,7 @@ public Builder setTraceSampled(boolean value) { * request correlation identifier. The default is False. * * - * bool trace_sampled = 30; + * bool trace_sampled = 30 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -4853,11 +4633,12 @@ public Builder clearTraceSampled() { * * *
-     * Optional. Source code location information associated with the log entry,
-     * if any.
+     * Optional. Source code location information associated with the log entry, if any.
      * 
* - * .google.logging.v2.LogEntrySourceLocation source_location = 23; + * + * .google.logging.v2.LogEntrySourceLocation source_location = 23 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the sourceLocation field is set. */ @@ -4868,11 +4649,12 @@ public boolean hasSourceLocation() { * * *
-     * Optional. Source code location information associated with the log entry,
-     * if any.
+     * Optional. Source code location information associated with the log entry, if any.
      * 
* - * .google.logging.v2.LogEntrySourceLocation source_location = 23; + * + * .google.logging.v2.LogEntrySourceLocation source_location = 23 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The sourceLocation. */ @@ -4889,11 +4671,12 @@ public com.google.logging.v2.LogEntrySourceLocation getSourceLocation() { * * *
-     * Optional. Source code location information associated with the log entry,
-     * if any.
+     * Optional. Source code location information associated with the log entry, if any.
      * 
* - * .google.logging.v2.LogEntrySourceLocation source_location = 23; + * + * .google.logging.v2.LogEntrySourceLocation source_location = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setSourceLocation(com.google.logging.v2.LogEntrySourceLocation value) { if (sourceLocationBuilder_ == null) { @@ -4912,11 +4695,12 @@ public Builder setSourceLocation(com.google.logging.v2.LogEntrySourceLocation va * * *
-     * Optional. Source code location information associated with the log entry,
-     * if any.
+     * Optional. Source code location information associated with the log entry, if any.
      * 
* - * .google.logging.v2.LogEntrySourceLocation source_location = 23; + * + * .google.logging.v2.LogEntrySourceLocation source_location = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setSourceLocation( com.google.logging.v2.LogEntrySourceLocation.Builder builderForValue) { @@ -4933,11 +4717,12 @@ public Builder setSourceLocation( * * *
-     * Optional. Source code location information associated with the log entry,
-     * if any.
+     * Optional. Source code location information associated with the log entry, if any.
      * 
* - * .google.logging.v2.LogEntrySourceLocation source_location = 23; + * + * .google.logging.v2.LogEntrySourceLocation source_location = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeSourceLocation(com.google.logging.v2.LogEntrySourceLocation value) { if (sourceLocationBuilder_ == null) { @@ -4960,11 +4745,12 @@ public Builder mergeSourceLocation(com.google.logging.v2.LogEntrySourceLocation * * *
-     * Optional. Source code location information associated with the log entry,
-     * if any.
+     * Optional. Source code location information associated with the log entry, if any.
      * 
* - * .google.logging.v2.LogEntrySourceLocation source_location = 23; + * + * .google.logging.v2.LogEntrySourceLocation source_location = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearSourceLocation() { if (sourceLocationBuilder_ == null) { @@ -4981,11 +4767,12 @@ public Builder clearSourceLocation() { * * *
-     * Optional. Source code location information associated with the log entry,
-     * if any.
+     * Optional. Source code location information associated with the log entry, if any.
      * 
* - * .google.logging.v2.LogEntrySourceLocation source_location = 23; + * + * .google.logging.v2.LogEntrySourceLocation source_location = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.logging.v2.LogEntrySourceLocation.Builder getSourceLocationBuilder() { @@ -4996,11 +4783,12 @@ public com.google.logging.v2.LogEntrySourceLocation.Builder getSourceLocationBui * * *
-     * Optional. Source code location information associated with the log entry,
-     * if any.
+     * Optional. Source code location information associated with the log entry, if any.
      * 
* - * .google.logging.v2.LogEntrySourceLocation source_location = 23; + * + * .google.logging.v2.LogEntrySourceLocation source_location = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.logging.v2.LogEntrySourceLocationOrBuilder getSourceLocationOrBuilder() { if (sourceLocationBuilder_ != null) { @@ -5015,11 +4803,12 @@ public com.google.logging.v2.LogEntrySourceLocationOrBuilder getSourceLocationOr * * *
-     * Optional. Source code location information associated with the log entry,
-     * if any.
+     * Optional. Source code location information associated with the log entry, if any.
      * 
* - * .google.logging.v2.LogEntrySourceLocation source_location = 23; + * + * .google.logging.v2.LogEntrySourceLocation source_location = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.logging.v2.LogEntrySourceLocation, diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOperation.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOperation.java index 7eadb6a1e..3e689aaf4 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOperation.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOperation.java @@ -140,10 +140,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * identifier are assumed to be part of the same operation. * * - * string id = 1; + * string id = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The id. */ + @java.lang.Override public java.lang.String getId() { java.lang.Object ref = id_; if (ref instanceof java.lang.String) { @@ -163,10 +164,11 @@ public java.lang.String getId() { * identifier are assumed to be part of the same operation. * * - * string id = 1; + * string id = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for id. */ + @java.lang.Override public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof java.lang.String) { @@ -190,10 +192,11 @@ public com.google.protobuf.ByteString getIdBytes() { * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. * * - * string producer = 2; + * string producer = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The producer. */ + @java.lang.Override public java.lang.String getProducer() { java.lang.Object ref = producer_; if (ref instanceof java.lang.String) { @@ -214,10 +217,11 @@ public java.lang.String getProducer() { * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. * * - * string producer = 2; + * string producer = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for producer. */ + @java.lang.Override public com.google.protobuf.ByteString getProducerBytes() { java.lang.Object ref = producer_; if (ref instanceof java.lang.String) { @@ -239,10 +243,11 @@ public com.google.protobuf.ByteString getProducerBytes() { * Optional. Set this to True if this is the first log entry in the operation. * * - * bool first = 3; + * bool first = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The first. */ + @java.lang.Override public boolean getFirst() { return first_; } @@ -256,10 +261,11 @@ public boolean getFirst() { * Optional. Set this to True if this is the last log entry in the operation. * * - * bool last = 4; + * bool last = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The last. */ + @java.lang.Override public boolean getLast() { return last_; } @@ -635,7 +641,7 @@ public Builder mergeFrom( * identifier are assumed to be part of the same operation. * * - * string id = 1; + * string id = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The id. */ @@ -658,7 +664,7 @@ public java.lang.String getId() { * identifier are assumed to be part of the same operation. * * - * string id = 1; + * string id = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for id. */ @@ -681,7 +687,7 @@ public com.google.protobuf.ByteString getIdBytes() { * identifier are assumed to be part of the same operation. * * - * string id = 1; + * string id = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The id to set. * @return This builder for chaining. @@ -703,7 +709,7 @@ public Builder setId(java.lang.String value) { * identifier are assumed to be part of the same operation. * * - * string id = 1; + * string id = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -721,7 +727,7 @@ public Builder clearId() { * identifier are assumed to be part of the same operation. * * - * string id = 1; + * string id = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for id to set. * @return This builder for chaining. @@ -747,7 +753,7 @@ public Builder setIdBytes(com.google.protobuf.ByteString value) { * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. * * - * string producer = 2; + * string producer = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The producer. */ @@ -771,7 +777,7 @@ public java.lang.String getProducer() { * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. * * - * string producer = 2; + * string producer = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for producer. */ @@ -795,7 +801,7 @@ public com.google.protobuf.ByteString getProducerBytes() { * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. * * - * string producer = 2; + * string producer = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The producer to set. * @return This builder for chaining. @@ -818,7 +824,7 @@ public Builder setProducer(java.lang.String value) { * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. * * - * string producer = 2; + * string producer = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -837,7 +843,7 @@ public Builder clearProducer() { * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. * * - * string producer = 2; + * string producer = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for producer to set. * @return This builder for chaining. @@ -861,10 +867,11 @@ public Builder setProducerBytes(com.google.protobuf.ByteString value) { * Optional. Set this to True if this is the first log entry in the operation. * * - * bool first = 3; + * bool first = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The first. */ + @java.lang.Override public boolean getFirst() { return first_; } @@ -875,7 +882,7 @@ public boolean getFirst() { * Optional. Set this to True if this is the first log entry in the operation. * * - * bool first = 3; + * bool first = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The first to set. * @return This builder for chaining. @@ -893,7 +900,7 @@ public Builder setFirst(boolean value) { * Optional. Set this to True if this is the first log entry in the operation. * * - * bool first = 3; + * bool first = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -912,10 +919,11 @@ public Builder clearFirst() { * Optional. Set this to True if this is the last log entry in the operation. * * - * bool last = 4; + * bool last = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The last. */ + @java.lang.Override public boolean getLast() { return last_; } @@ -926,7 +934,7 @@ public boolean getLast() { * Optional. Set this to True if this is the last log entry in the operation. * * - * bool last = 4; + * bool last = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The last to set. * @return This builder for chaining. @@ -944,7 +952,7 @@ public Builder setLast(boolean value) { * Optional. Set this to True if this is the last log entry in the operation. * * - * bool last = 4; + * bool last = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOperationOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOperationOrBuilder.java index 5e7242102..2ed903f6e 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOperationOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOperationOrBuilder.java @@ -31,7 +31,7 @@ public interface LogEntryOperationOrBuilder * identifier are assumed to be part of the same operation. * * - * string id = 1; + * string id = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The id. */ @@ -44,7 +44,7 @@ public interface LogEntryOperationOrBuilder * identifier are assumed to be part of the same operation. * * - * string id = 1; + * string id = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for id. */ @@ -59,7 +59,7 @@ public interface LogEntryOperationOrBuilder * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. * * - * string producer = 2; + * string producer = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The producer. */ @@ -73,7 +73,7 @@ public interface LogEntryOperationOrBuilder * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. * * - * string producer = 2; + * string producer = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for producer. */ @@ -86,7 +86,7 @@ public interface LogEntryOperationOrBuilder * Optional. Set this to True if this is the first log entry in the operation. * * - * bool first = 3; + * bool first = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The first. */ @@ -99,7 +99,7 @@ public interface LogEntryOperationOrBuilder * Optional. Set this to True if this is the last log entry in the operation. * * - * bool last = 4; + * bool last = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The last. */ diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOrBuilder.java index 4ce3fea2e..6fc979909 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOrBuilder.java @@ -32,9 +32,9 @@ public interface LogEntryOrBuilder * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" * "folders/[FOLDER_ID]/logs/[LOG_ID]" - * A project number may optionally be used in place of PROJECT_ID. The project - * number is translated to its corresponding PROJECT_ID internally and the - * `log_name` field will contain PROJECT_ID in queries and exports. + * A project number may be used in place of PROJECT_ID. The project number is + * translated to its corresponding PROJECT_ID internally and the `log_name` + * field will contain PROJECT_ID in queries and exports. * `[LOG_ID]` must be URL-encoded within `log_name`. Example: * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. * `[LOG_ID]` must be less than 512 characters long and can only include the @@ -47,7 +47,7 @@ public interface LogEntryOrBuilder * any results. * * - * string log_name = 12; + * string log_name = 12 [(.google.api.field_behavior) = REQUIRED]; * * @return The logName. */ @@ -61,9 +61,9 @@ public interface LogEntryOrBuilder * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" * "folders/[FOLDER_ID]/logs/[LOG_ID]" - * A project number may optionally be used in place of PROJECT_ID. The project - * number is translated to its corresponding PROJECT_ID internally and the - * `log_name` field will contain PROJECT_ID in queries and exports. + * A project number may be used in place of PROJECT_ID. The project number is + * translated to its corresponding PROJECT_ID internally and the `log_name` + * field will contain PROJECT_ID in queries and exports. * `[LOG_ID]` must be URL-encoded within `log_name`. Example: * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. * `[LOG_ID]` must be less than 512 characters long and can only include the @@ -76,7 +76,7 @@ public interface LogEntryOrBuilder * any results. * * - * string log_name = 12; + * string log_name = 12 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for logName. */ @@ -92,7 +92,8 @@ public interface LogEntryOrBuilder * the error. * * - * .google.api.MonitoredResource resource = 8; + * .google.api.MonitoredResource resource = 8 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the resource field is set. */ @@ -107,7 +108,8 @@ public interface LogEntryOrBuilder * the error. * * - * .google.api.MonitoredResource resource = 8; + * .google.api.MonitoredResource resource = 8 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The resource. */ @@ -122,7 +124,8 @@ public interface LogEntryOrBuilder * the error. * * - * .google.api.MonitoredResource resource = 8; + * .google.api.MonitoredResource resource = 8 [(.google.api.field_behavior) = REQUIRED]; + * */ com.google.api.MonitoredResourceOrBuilder getResourceOrBuilder(); @@ -243,20 +246,20 @@ public interface LogEntryOrBuilder * * *
-   * Optional. The time the event described by the log entry occurred.  This
-   * time is used to compute the log entry's age and to enforce the logs
-   * retention period. If this field is omitted in a new log entry, then Logging
-   * assigns it the current time.  Timestamps have nanosecond accuracy, but
-   * trailing zeros in the fractional seconds might be omitted when the
-   * timestamp is displayed.
+   * Optional. The time the event described by the log entry occurred. This time is used
+   * to compute the log entry's age and to enforce the logs retention period.
+   * If this field is omitted in a new log entry, then Logging assigns it the
+   * current time. Timestamps have nanosecond accuracy, but trailing zeros in
+   * the fractional seconds might be omitted when the timestamp is displayed.
    * Incoming log entries should have timestamps that are no more than the [logs
-   * retention period](/logging/quotas) in the past, and no more than 24 hours
+   * retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours
    * in the future. Log entries outside those time boundaries will not be
    * available when calling `entries.list`, but those log entries can still be
-   * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs).
+   * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
    * 
* - * .google.protobuf.Timestamp timestamp = 9; + * .google.protobuf.Timestamp timestamp = 9 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the timestamp field is set. */ @@ -265,20 +268,20 @@ public interface LogEntryOrBuilder * * *
-   * Optional. The time the event described by the log entry occurred.  This
-   * time is used to compute the log entry's age and to enforce the logs
-   * retention period. If this field is omitted in a new log entry, then Logging
-   * assigns it the current time.  Timestamps have nanosecond accuracy, but
-   * trailing zeros in the fractional seconds might be omitted when the
-   * timestamp is displayed.
+   * Optional. The time the event described by the log entry occurred. This time is used
+   * to compute the log entry's age and to enforce the logs retention period.
+   * If this field is omitted in a new log entry, then Logging assigns it the
+   * current time. Timestamps have nanosecond accuracy, but trailing zeros in
+   * the fractional seconds might be omitted when the timestamp is displayed.
    * Incoming log entries should have timestamps that are no more than the [logs
-   * retention period](/logging/quotas) in the past, and no more than 24 hours
+   * retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours
    * in the future. Log entries outside those time boundaries will not be
    * available when calling `entries.list`, but those log entries can still be
-   * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs).
+   * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
    * 
* - * .google.protobuf.Timestamp timestamp = 9; + * .google.protobuf.Timestamp timestamp = 9 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The timestamp. */ @@ -287,20 +290,20 @@ public interface LogEntryOrBuilder * * *
-   * Optional. The time the event described by the log entry occurred.  This
-   * time is used to compute the log entry's age and to enforce the logs
-   * retention period. If this field is omitted in a new log entry, then Logging
-   * assigns it the current time.  Timestamps have nanosecond accuracy, but
-   * trailing zeros in the fractional seconds might be omitted when the
-   * timestamp is displayed.
+   * Optional. The time the event described by the log entry occurred. This time is used
+   * to compute the log entry's age and to enforce the logs retention period.
+   * If this field is omitted in a new log entry, then Logging assigns it the
+   * current time. Timestamps have nanosecond accuracy, but trailing zeros in
+   * the fractional seconds might be omitted when the timestamp is displayed.
    * Incoming log entries should have timestamps that are no more than the [logs
-   * retention period](/logging/quotas) in the past, and no more than 24 hours
+   * retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours
    * in the future. Log entries outside those time boundaries will not be
    * available when calling `entries.list`, but those log entries can still be
-   * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs).
+   * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
    * 
* - * .google.protobuf.Timestamp timestamp = 9; + * .google.protobuf.Timestamp timestamp = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder(); @@ -311,7 +314,9 @@ public interface LogEntryOrBuilder * Output only. The time the log entry was received by Logging. * * - * .google.protobuf.Timestamp receive_timestamp = 24; + * + * .google.protobuf.Timestamp receive_timestamp = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the receiveTimestamp field is set. */ @@ -323,7 +328,9 @@ public interface LogEntryOrBuilder * Output only. The time the log entry was received by Logging. * * - * .google.protobuf.Timestamp receive_timestamp = 24; + * + * .google.protobuf.Timestamp receive_timestamp = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The receiveTimestamp. */ @@ -335,7 +342,9 @@ public interface LogEntryOrBuilder * Output only. The time the log entry was received by Logging. * * - * .google.protobuf.Timestamp receive_timestamp = 24; + * + * .google.protobuf.Timestamp receive_timestamp = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ com.google.protobuf.TimestampOrBuilder getReceiveTimestampOrBuilder(); @@ -343,11 +352,11 @@ public interface LogEntryOrBuilder * * *
-   * Optional. The severity of the log entry. The default value is
-   * `LogSeverity.DEFAULT`.
+   * Optional. The severity of the log entry. The default value is `LogSeverity.DEFAULT`.
    * 
* - * .google.logging.type.LogSeverity severity = 10; + * .google.logging.type.LogSeverity severity = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The enum numeric value on the wire for severity. */ @@ -356,11 +365,11 @@ public interface LogEntryOrBuilder * * *
-   * Optional. The severity of the log entry. The default value is
-   * `LogSeverity.DEFAULT`.
+   * Optional. The severity of the log entry. The default value is `LogSeverity.DEFAULT`.
    * 
* - * .google.logging.type.LogSeverity severity = 10; + * .google.logging.type.LogSeverity severity = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The severity. */ @@ -370,8 +379,8 @@ public interface LogEntryOrBuilder * * *
-   * Optional. A unique identifier for the log entry. If you provide a value,
-   * then Logging considers other log entries in the same project, with the same
+   * Optional. A unique identifier for the log entry. If you provide a value, then
+   * Logging considers other log entries in the same project, with the same
    * `timestamp`, and with the same `insert_id` to be duplicates which are
    * removed in a single query result. However, there are no guarantees of
    * de-duplication in the export of logs.
@@ -381,7 +390,7 @@ public interface LogEntryOrBuilder
    * the same `log_name` and `timestamp` values.
    * 
* - * string insert_id = 4; + * string insert_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The insertId. */ @@ -390,8 +399,8 @@ public interface LogEntryOrBuilder * * *
-   * Optional. A unique identifier for the log entry. If you provide a value,
-   * then Logging considers other log entries in the same project, with the same
+   * Optional. A unique identifier for the log entry. If you provide a value, then
+   * Logging considers other log entries in the same project, with the same
    * `timestamp`, and with the same `insert_id` to be duplicates which are
    * removed in a single query result. However, there are no guarantees of
    * de-duplication in the export of logs.
@@ -401,7 +410,7 @@ public interface LogEntryOrBuilder
    * the same `log_name` and `timestamp` values.
    * 
* - * string insert_id = 4; + * string insert_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for insertId. */ @@ -411,11 +420,13 @@ public interface LogEntryOrBuilder * * *
-   * Optional. Information about the HTTP request associated with this log
-   * entry, if applicable.
+   * Optional. Information about the HTTP request associated with this log entry, if
+   * applicable.
    * 
* - * .google.logging.type.HttpRequest http_request = 7; + * + * .google.logging.type.HttpRequest http_request = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the httpRequest field is set. */ @@ -424,11 +435,13 @@ public interface LogEntryOrBuilder * * *
-   * Optional. Information about the HTTP request associated with this log
-   * entry, if applicable.
+   * Optional. Information about the HTTP request associated with this log entry, if
+   * applicable.
    * 
* - * .google.logging.type.HttpRequest http_request = 7; + * + * .google.logging.type.HttpRequest http_request = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The httpRequest. */ @@ -437,11 +450,13 @@ public interface LogEntryOrBuilder * * *
-   * Optional. Information about the HTTP request associated with this log
-   * entry, if applicable.
+   * Optional. Information about the HTTP request associated with this log entry, if
+   * applicable.
    * 
* - * .google.logging.type.HttpRequest http_request = 7; + * + * .google.logging.type.HttpRequest http_request = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.logging.type.HttpRequestOrBuilder getHttpRequestOrBuilder(); @@ -453,7 +468,7 @@ public interface LogEntryOrBuilder * information about the log entry. * * - * map<string, string> labels = 11; + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; */ int getLabelsCount(); /** @@ -464,7 +479,7 @@ public interface LogEntryOrBuilder * information about the log entry. * * - * map<string, string> labels = 11; + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; */ boolean containsLabels(java.lang.String key); /** Use {@link #getLabelsMap()} instead. */ @@ -478,7 +493,7 @@ public interface LogEntryOrBuilder * information about the log entry. * * - * map<string, string> labels = 11; + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; */ java.util.Map getLabelsMap(); /** @@ -489,7 +504,7 @@ public interface LogEntryOrBuilder * information about the log entry. * * - * map<string, string> labels = 11; + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; */ java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); /** @@ -500,69 +515,10 @@ public interface LogEntryOrBuilder * information about the log entry. * * - * map<string, string> labels = 11; + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; */ java.lang.String getLabelsOrThrow(java.lang.String key); - /** - * - * - *
-   * Deprecated. Output only. Additional metadata about the monitored resource.
-   * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
-   * this field populated for GKE versions older than 1.12.6. For GKE versions
-   * 1.12.6 and above, the `metadata` field has been deprecated. The Kubernetes
-   * pod labels that used to be in `metadata.userLabels` will now be present in
-   * the `labels` field with a key prefix of `k8s-pod/`. The Stackdriver system
-   * labels that were present in the `metadata.systemLabels` field will no
-   * longer be available in the LogEntry.
-   * 
- * - * .google.api.MonitoredResourceMetadata metadata = 25 [deprecated = true]; - * - * @return Whether the metadata field is set. - */ - @java.lang.Deprecated - boolean hasMetadata(); - /** - * - * - *
-   * Deprecated. Output only. Additional metadata about the monitored resource.
-   * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
-   * this field populated for GKE versions older than 1.12.6. For GKE versions
-   * 1.12.6 and above, the `metadata` field has been deprecated. The Kubernetes
-   * pod labels that used to be in `metadata.userLabels` will now be present in
-   * the `labels` field with a key prefix of `k8s-pod/`. The Stackdriver system
-   * labels that were present in the `metadata.systemLabels` field will no
-   * longer be available in the LogEntry.
-   * 
- * - * .google.api.MonitoredResourceMetadata metadata = 25 [deprecated = true]; - * - * @return The metadata. - */ - @java.lang.Deprecated - com.google.api.MonitoredResourceMetadata getMetadata(); - /** - * - * - *
-   * Deprecated. Output only. Additional metadata about the monitored resource.
-   * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
-   * this field populated for GKE versions older than 1.12.6. For GKE versions
-   * 1.12.6 and above, the `metadata` field has been deprecated. The Kubernetes
-   * pod labels that used to be in `metadata.userLabels` will now be present in
-   * the `labels` field with a key prefix of `k8s-pod/`. The Stackdriver system
-   * labels that were present in the `metadata.systemLabels` field will no
-   * longer be available in the LogEntry.
-   * 
- * - * .google.api.MonitoredResourceMetadata metadata = 25 [deprecated = true]; - */ - @java.lang.Deprecated - com.google.api.MonitoredResourceMetadataOrBuilder getMetadataOrBuilder(); - /** * * @@ -571,7 +527,9 @@ public interface LogEntryOrBuilder * applicable. * * - * .google.logging.v2.LogEntryOperation operation = 15; + * + * .google.logging.v2.LogEntryOperation operation = 15 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the operation field is set. */ @@ -584,7 +542,9 @@ public interface LogEntryOrBuilder * applicable. * * - * .google.logging.v2.LogEntryOperation operation = 15; + * + * .google.logging.v2.LogEntryOperation operation = 15 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The operation. */ @@ -597,7 +557,9 @@ public interface LogEntryOrBuilder * applicable. * * - * .google.logging.v2.LogEntryOperation operation = 15; + * + * .google.logging.v2.LogEntryOperation operation = 15 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.logging.v2.LogEntryOperationOrBuilder getOperationOrBuilder(); @@ -605,13 +567,13 @@ public interface LogEntryOrBuilder * * *
-   * Optional. Resource name of the trace associated with the log entry, if any.
-   * If it contains a relative resource name, the name is assumed to be relative
-   * to `//tracing.googleapis.com`. Example:
+   * Optional. Resource name of the trace associated with the log entry, if any. If it
+   * contains a relative resource name, the name is assumed to be relative to
+   * `//tracing.googleapis.com`. Example:
    * `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
    * 
* - * string trace = 22; + * string trace = 22 [(.google.api.field_behavior) = OPTIONAL]; * * @return The trace. */ @@ -620,13 +582,13 @@ public interface LogEntryOrBuilder * * *
-   * Optional. Resource name of the trace associated with the log entry, if any.
-   * If it contains a relative resource name, the name is assumed to be relative
-   * to `//tracing.googleapis.com`. Example:
+   * Optional. Resource name of the trace associated with the log entry, if any. If it
+   * contains a relative resource name, the name is assumed to be relative to
+   * `//tracing.googleapis.com`. Example:
    * `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
    * 
* - * string trace = 22; + * string trace = 22 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for trace. */ @@ -639,10 +601,10 @@ public interface LogEntryOrBuilder * Optional. The span ID within the trace associated with the log entry. * For Trace spans, this is the same format that the Trace API v2 uses: a * 16-character hexadecimal encoding of an 8-byte array, such as - * <code>"000000000000004a"</code>. + * `000000000000004a`. * * - * string span_id = 27; + * string span_id = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @return The spanId. */ @@ -654,10 +616,10 @@ public interface LogEntryOrBuilder * Optional. The span ID within the trace associated with the log entry. * For Trace spans, this is the same format that the Trace API v2 uses: a * 16-character hexadecimal encoding of an 8-byte array, such as - * <code>"000000000000004a"</code>. + * `000000000000004a`. * * - * string span_id = 27; + * string span_id = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for spanId. */ @@ -675,7 +637,7 @@ public interface LogEntryOrBuilder * request correlation identifier. The default is False. * * - * bool trace_sampled = 30; + * bool trace_sampled = 30 [(.google.api.field_behavior) = OPTIONAL]; * * @return The traceSampled. */ @@ -685,11 +647,12 @@ public interface LogEntryOrBuilder * * *
-   * Optional. Source code location information associated with the log entry,
-   * if any.
+   * Optional. Source code location information associated with the log entry, if any.
    * 
* - * .google.logging.v2.LogEntrySourceLocation source_location = 23; + * + * .google.logging.v2.LogEntrySourceLocation source_location = 23 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the sourceLocation field is set. */ @@ -698,11 +661,12 @@ public interface LogEntryOrBuilder * * *
-   * Optional. Source code location information associated with the log entry,
-   * if any.
+   * Optional. Source code location information associated with the log entry, if any.
    * 
* - * .google.logging.v2.LogEntrySourceLocation source_location = 23; + * + * .google.logging.v2.LogEntrySourceLocation source_location = 23 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The sourceLocation. */ @@ -711,11 +675,12 @@ public interface LogEntryOrBuilder * * *
-   * Optional. Source code location information associated with the log entry,
-   * if any.
+   * Optional. Source code location information associated with the log entry, if any.
    * 
* - * .google.logging.v2.LogEntrySourceLocation source_location = 23; + * + * .google.logging.v2.LogEntrySourceLocation source_location = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.logging.v2.LogEntrySourceLocationOrBuilder getSourceLocationOrBuilder(); diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryProto.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryProto.java index 72738471f..3f0612226 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryProto.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryProto.java @@ -53,51 +53,54 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n!google/logging/v2/log_entry.proto\022\021goo" - + "gle.logging.v2\032#google/api/monitored_res" - + "ource.proto\032\031google/api/resource.proto\032&" - + "google/logging/type/http_request.proto\032&" - + "google/logging/type/log_severity.proto\032\031" - + "google/protobuf/any.proto\032\034google/protob" - + "uf/struct.proto\032\037google/protobuf/timesta" - + "mp.proto\032\027google/rpc/status.proto\032\034googl" - + "e/api/annotations.proto\"\316\007\n\010LogEntry\022\020\n\010" - + "log_name\030\014 \001(\t\022/\n\010resource\030\010 \001(\0132\035.googl" - + "e.api.MonitoredResource\022-\n\rproto_payload" - + "\030\002 \001(\0132\024.google.protobuf.AnyH\000\022\026\n\014text_p" - + "ayload\030\003 \001(\tH\000\022/\n\014json_payload\030\006 \001(\0132\027.g" - + "oogle.protobuf.StructH\000\022-\n\ttimestamp\030\t \001" - + "(\0132\032.google.protobuf.Timestamp\0225\n\021receiv" - + "e_timestamp\030\030 \001(\0132\032.google.protobuf.Time" - + "stamp\0222\n\010severity\030\n \001(\0162 .google.logging" - + ".type.LogSeverity\022\021\n\tinsert_id\030\004 \001(\t\0226\n\014" - + "http_request\030\007 \001(\0132 .google.logging.type" - + ".HttpRequest\0227\n\006labels\030\013 \003(\0132\'.google.lo" - + "gging.v2.LogEntry.LabelsEntry\022;\n\010metadat" - + "a\030\031 \001(\0132%.google.api.MonitoredResourceMe" - + "tadataB\002\030\001\0227\n\toperation\030\017 \001(\0132$.google.l" - + "ogging.v2.LogEntryOperation\022\r\n\005trace\030\026 \001" - + "(\t\022\017\n\007span_id\030\033 \001(\t\022\025\n\rtrace_sampled\030\036 \001" - + "(\010\022B\n\017source_location\030\027 \001(\0132).google.log" - + "ging.v2.LogEntrySourceLocation\032-\n\013Labels" - + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\275\001" - + "\352A\271\001\n\032logging.googleapis.com/Log\022\035projec" - + "ts/{project}/logs/{log}\022\'organizations/{" - + "organization}/logs/{log}\022\033folders/{folde" - + "r}/logs/{log}\022,billingAccounts/{billing_" - + "account}/logs/{log}\032\010log_nameB\t\n\007payload" - + "\"N\n\021LogEntryOperation\022\n\n\002id\030\001 \001(\t\022\020\n\010pro" - + "ducer\030\002 \001(\t\022\r\n\005first\030\003 \001(\010\022\014\n\004last\030\004 \001(\010" - + "\"F\n\026LogEntrySourceLocation\022\014\n\004file\030\001 \001(\t" - + "\022\014\n\004line\030\002 \001(\003\022\020\n\010function\030\003 \001(\tB\231\001\n\025com" - + ".google.logging.v2B\rLogEntryProtoP\001Z8goo" - + "gle.golang.org/genproto/googleapis/loggi" - + "ng/v2;logging\370\001\001\252\002\027Google.Cloud.Logging." - + "V2\312\002\027Google\\Cloud\\Logging\\V2b\006proto3" + + "gle.logging.v2\032\037google/api/field_behavio" + + "r.proto\032#google/api/monitored_resource.p" + + "roto\032\031google/api/resource.proto\032&google/" + + "logging/type/http_request.proto\032&google/" + + "logging/type/log_severity.proto\032\031google/" + + "protobuf/any.proto\032\034google/protobuf/stru" + + "ct.proto\032\037google/protobuf/timestamp.prot" + + "o\032\027google/rpc/status.proto\032\034google/api/a" + + "nnotations.proto\"\322\007\n\010LogEntry\022\025\n\010log_nam" + + "e\030\014 \001(\tB\003\340A\002\0224\n\010resource\030\010 \001(\0132\035.google." + + "api.MonitoredResourceB\003\340A\002\022-\n\rproto_payl" + + "oad\030\002 \001(\0132\024.google.protobuf.AnyH\000\022\026\n\014tex" + + "t_payload\030\003 \001(\tH\000\022/\n\014json_payload\030\006 \001(\0132" + + "\027.google.protobuf.StructH\000\0222\n\ttimestamp\030" + + "\t \001(\0132\032.google.protobuf.TimestampB\003\340A\001\022:" + + "\n\021receive_timestamp\030\030 \001(\0132\032.google.proto" + + "buf.TimestampB\003\340A\003\0227\n\010severity\030\n \001(\0162 .g" + + "oogle.logging.type.LogSeverityB\003\340A\001\022\026\n\ti" + + "nsert_id\030\004 \001(\tB\003\340A\001\022;\n\014http_request\030\007 \001(" + + "\0132 .google.logging.type.HttpRequestB\003\340A\001" + + "\022<\n\006labels\030\013 \003(\0132\'.google.logging.v2.Log" + + "Entry.LabelsEntryB\003\340A\001\022<\n\toperation\030\017 \001(" + + "\0132$.google.logging.v2.LogEntryOperationB" + + "\003\340A\001\022\022\n\005trace\030\026 \001(\tB\003\340A\001\022\024\n\007span_id\030\033 \001(" + + "\tB\003\340A\001\022\032\n\rtrace_sampled\030\036 \001(\010B\003\340A\001\022G\n\017so" + + "urce_location\030\027 \001(\0132).google.logging.v2." + + "LogEntrySourceLocationB\003\340A\001\032-\n\013LabelsEnt" + + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\275\001\352A\271" + + "\001\n\032logging.googleapis.com/Log\022\035projects/" + + "{project}/logs/{log}\022\'organizations/{org" + + "anization}/logs/{log}\022\033folders/{folder}/" + + "logs/{log}\022,billingAccounts/{billing_acc" + + "ount}/logs/{log}\032\010log_nameB\t\n\007payload\"b\n" + + "\021LogEntryOperation\022\017\n\002id\030\001 \001(\tB\003\340A\001\022\025\n\010p" + + "roducer\030\002 \001(\tB\003\340A\001\022\022\n\005first\030\003 \001(\010B\003\340A\001\022\021" + + "\n\004last\030\004 \001(\010B\003\340A\001\"U\n\026LogEntrySourceLocat" + + "ion\022\021\n\004file\030\001 \001(\tB\003\340A\001\022\021\n\004line\030\002 \001(\003B\003\340A" + + "\001\022\025\n\010function\030\003 \001(\tB\003\340A\001B\231\001\n\025com.google." + + "logging.v2B\rLogEntryProtoP\001Z8google.gola" + + "ng.org/genproto/googleapis/logging/v2;lo" + + "gging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Goo" + + "gle\\Cloud\\Logging\\V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.MonitoredResourceProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.logging.type.HttpRequestProto.getDescriptor(), @@ -125,7 +128,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "InsertId", "HttpRequest", "Labels", - "Metadata", "Operation", "Trace", "SpanId", @@ -159,9 +161,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); registry.add(com.google.api.ResourceProto.resource); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.MonitoredResourceProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.logging.type.HttpRequestProto.getDescriptor(); diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntrySourceLocation.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntrySourceLocation.java index c62f17d5b..3207f93ac 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntrySourceLocation.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntrySourceLocation.java @@ -135,10 +135,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * might be a simple name or a fully-qualified name. * * - * string file = 1; + * string file = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The file. */ + @java.lang.Override public java.lang.String getFile() { java.lang.Object ref = file_; if (ref instanceof java.lang.String) { @@ -158,10 +159,11 @@ public java.lang.String getFile() { * might be a simple name or a fully-qualified name. * * - * string file = 1; + * string file = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for file. */ + @java.lang.Override public com.google.protobuf.ByteString getFileBytes() { java.lang.Object ref = file_; if (ref instanceof java.lang.String) { @@ -184,10 +186,11 @@ public com.google.protobuf.ByteString getFileBytes() { * available. * * - * int64 line = 2; + * int64 line = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The line. */ + @java.lang.Override public long getLine() { return line_; } @@ -206,10 +209,11 @@ public long getLine() { * (Python). * * - * string function = 3; + * string function = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The function. */ + @java.lang.Override public java.lang.String getFunction() { java.lang.Object ref = function_; if (ref instanceof java.lang.String) { @@ -233,10 +237,11 @@ public java.lang.String getFunction() { * (Python). * * - * string function = 3; + * string function = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for function. */ + @java.lang.Override public com.google.protobuf.ByteString getFunctionBytes() { java.lang.Object ref = function_; if (ref instanceof java.lang.String) { @@ -606,7 +611,7 @@ public Builder mergeFrom( * might be a simple name or a fully-qualified name. * * - * string file = 1; + * string file = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The file. */ @@ -629,7 +634,7 @@ public java.lang.String getFile() { * might be a simple name or a fully-qualified name. * * - * string file = 1; + * string file = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for file. */ @@ -652,7 +657,7 @@ public com.google.protobuf.ByteString getFileBytes() { * might be a simple name or a fully-qualified name. * * - * string file = 1; + * string file = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The file to set. * @return This builder for chaining. @@ -674,7 +679,7 @@ public Builder setFile(java.lang.String value) { * might be a simple name or a fully-qualified name. * * - * string file = 1; + * string file = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -692,7 +697,7 @@ public Builder clearFile() { * might be a simple name or a fully-qualified name. * * - * string file = 1; + * string file = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for file to set. * @return This builder for chaining. @@ -717,10 +722,11 @@ public Builder setFileBytes(com.google.protobuf.ByteString value) { * available. * * - * int64 line = 2; + * int64 line = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The line. */ + @java.lang.Override public long getLine() { return line_; } @@ -732,7 +738,7 @@ public long getLine() { * available. * * - * int64 line = 2; + * int64 line = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The line to set. * @return This builder for chaining. @@ -751,7 +757,7 @@ public Builder setLine(long value) { * available. * * - * int64 line = 2; + * int64 line = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -775,7 +781,7 @@ public Builder clearLine() { * (Python). * * - * string function = 3; + * string function = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The function. */ @@ -802,7 +808,7 @@ public java.lang.String getFunction() { * (Python). * * - * string function = 3; + * string function = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for function. */ @@ -829,7 +835,7 @@ public com.google.protobuf.ByteString getFunctionBytes() { * (Python). * * - * string function = 3; + * string function = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The function to set. * @return This builder for chaining. @@ -855,7 +861,7 @@ public Builder setFunction(java.lang.String value) { * (Python). * * - * string function = 3; + * string function = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -877,7 +883,7 @@ public Builder clearFunction() { * (Python). * * - * string function = 3; + * string function = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for function to set. * @return This builder for chaining. diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntrySourceLocationOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntrySourceLocationOrBuilder.java index 4d524ac00..e341dc47b 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntrySourceLocationOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntrySourceLocationOrBuilder.java @@ -31,7 +31,7 @@ public interface LogEntrySourceLocationOrBuilder * might be a simple name or a fully-qualified name. * * - * string file = 1; + * string file = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The file. */ @@ -44,7 +44,7 @@ public interface LogEntrySourceLocationOrBuilder * might be a simple name or a fully-qualified name. * * - * string file = 1; + * string file = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for file. */ @@ -58,7 +58,7 @@ public interface LogEntrySourceLocationOrBuilder * available. * * - * int64 line = 2; + * int64 line = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The line. */ @@ -76,7 +76,7 @@ public interface LogEntrySourceLocationOrBuilder * (Python). * * - * string function = 3; + * string function = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The function. */ @@ -93,7 +93,7 @@ public interface LogEntrySourceLocationOrBuilder * (Python). * * - * string function = 3; + * string function = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for function. */ diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusion.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusion.java index c59e7d551..2acdacff2 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusion.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusion.java @@ -173,16 +173,17 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. A client-assigned identifier, such as
-   * `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and
-   * can include only letters, digits, underscores, hyphens, and periods.
-   * First character has to be alphanumeric.
+   * Required. A client-assigned identifier, such as `"load-balancer-exclusion"`.
+   * Identifiers are limited to 100 characters and can include only letters,
+   * digits, underscores, hyphens, and periods. First character has to be
+   * alphanumeric.
    * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -198,16 +199,17 @@ public java.lang.String getName() { * * *
-   * Required. A client-assigned identifier, such as
-   * `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and
-   * can include only letters, digits, underscores, hyphens, and periods.
-   * First character has to be alphanumeric.
+   * Required. A client-assigned identifier, such as `"load-balancer-exclusion"`.
+   * Identifiers are limited to 100 characters and can include only letters,
+   * digits, underscores, hyphens, and periods. First character has to be
+   * alphanumeric.
    * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -229,10 +231,11 @@ public com.google.protobuf.ByteString getNameBytes() { * Optional. A description of this exclusion. * * - * string description = 2; + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The description. */ + @java.lang.Override public java.lang.String getDescription() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { @@ -251,10 +254,11 @@ public java.lang.String getDescription() { * Optional. A description of this exclusion. * * - * string description = 2; + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for description. */ + @java.lang.Override public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { @@ -273,19 +277,20 @@ public com.google.protobuf.ByteString getDescriptionBytes() { * * *
-   * Required. An [advanced logs filter](/logging/docs/view/advanced-queries)
+   * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries)
    * that matches the log entries to be excluded. By using the
-   * [sample function](/logging/docs/view/advanced-queries#sample),
+   * [sample function](https://cloud.google.com/logging/docs/view/advanced-queries#sample),
    * you can exclude less than 100% of the matching log entries.
    * For example, the following query matches 99% of low-severity log
    * entries from Google Cloud Storage buckets:
    * `"resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)"`
    * 
* - * string filter = 3; + * string filter = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The filter. */ + @java.lang.Override public java.lang.String getFilter() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { @@ -301,19 +306,20 @@ public java.lang.String getFilter() { * * *
-   * Required. An [advanced logs filter](/logging/docs/view/advanced-queries)
+   * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries)
    * that matches the log entries to be excluded. By using the
-   * [sample function](/logging/docs/view/advanced-queries#sample),
+   * [sample function](https://cloud.google.com/logging/docs/view/advanced-queries#sample),
    * you can exclude less than 100% of the matching log entries.
    * For example, the following query matches 99% of low-severity log
    * entries from Google Cloud Storage buckets:
    * `"resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)"`
    * 
* - * string filter = 3; + * string filter = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for filter. */ + @java.lang.Override public com.google.protobuf.ByteString getFilterBytes() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { @@ -338,10 +344,11 @@ public com.google.protobuf.ByteString getFilterBytes() { * value of this field. * * - * bool disabled = 4; + * bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The disabled. */ + @java.lang.Override public boolean getDisabled() { return disabled_; } @@ -356,10 +363,12 @@ public boolean getDisabled() { * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp create_time = 5; + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the createTime field is set. */ + @java.lang.Override public boolean hasCreateTime() { return createTime_ != null; } @@ -371,10 +380,12 @@ public boolean hasCreateTime() { * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp create_time = 5; + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The createTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } @@ -386,8 +397,10 @@ public com.google.protobuf.Timestamp getCreateTime() { * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp create_time = 5; + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return getCreateTime(); } @@ -402,10 +415,12 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp update_time = 6; + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the updateTime field is set. */ + @java.lang.Override public boolean hasUpdateTime() { return updateTime_ != null; } @@ -417,10 +432,12 @@ public boolean hasUpdateTime() { * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp update_time = 6; + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The updateTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getUpdateTime() { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } @@ -432,8 +449,10 @@ public com.google.protobuf.Timestamp getUpdateTime() { * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp update_time = 6; + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return getUpdateTime(); } @@ -864,13 +883,13 @@ public Builder mergeFrom( * * *
-     * Required. A client-assigned identifier, such as
-     * `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and
-     * can include only letters, digits, underscores, hyphens, and periods.
-     * First character has to be alphanumeric.
+     * Required. A client-assigned identifier, such as `"load-balancer-exclusion"`.
+     * Identifiers are limited to 100 characters and can include only letters,
+     * digits, underscores, hyphens, and periods. First character has to be
+     * alphanumeric.
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The name. */ @@ -889,13 +908,13 @@ public java.lang.String getName() { * * *
-     * Required. A client-assigned identifier, such as
-     * `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and
-     * can include only letters, digits, underscores, hyphens, and periods.
-     * First character has to be alphanumeric.
+     * Required. A client-assigned identifier, such as `"load-balancer-exclusion"`.
+     * Identifiers are limited to 100 characters and can include only letters,
+     * digits, underscores, hyphens, and periods. First character has to be
+     * alphanumeric.
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for name. */ @@ -914,13 +933,13 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. A client-assigned identifier, such as
-     * `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and
-     * can include only letters, digits, underscores, hyphens, and periods.
-     * First character has to be alphanumeric.
+     * Required. A client-assigned identifier, such as `"load-balancer-exclusion"`.
+     * Identifiers are limited to 100 characters and can include only letters,
+     * digits, underscores, hyphens, and periods. First character has to be
+     * alphanumeric.
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The name to set. * @return This builder for chaining. @@ -938,13 +957,13 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. A client-assigned identifier, such as
-     * `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and
-     * can include only letters, digits, underscores, hyphens, and periods.
-     * First character has to be alphanumeric.
+     * Required. A client-assigned identifier, such as `"load-balancer-exclusion"`.
+     * Identifiers are limited to 100 characters and can include only letters,
+     * digits, underscores, hyphens, and periods. First character has to be
+     * alphanumeric.
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ @@ -958,13 +977,13 @@ public Builder clearName() { * * *
-     * Required. A client-assigned identifier, such as
-     * `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and
-     * can include only letters, digits, underscores, hyphens, and periods.
-     * First character has to be alphanumeric.
+     * Required. A client-assigned identifier, such as `"load-balancer-exclusion"`.
+     * Identifiers are limited to 100 characters and can include only letters,
+     * digits, underscores, hyphens, and periods. First character has to be
+     * alphanumeric.
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for name to set. * @return This builder for chaining. @@ -988,7 +1007,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * Optional. A description of this exclusion. * * - * string description = 2; + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The description. */ @@ -1010,7 +1029,7 @@ public java.lang.String getDescription() { * Optional. A description of this exclusion. * * - * string description = 2; + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for description. */ @@ -1032,7 +1051,7 @@ public com.google.protobuf.ByteString getDescriptionBytes() { * Optional. A description of this exclusion. * * - * string description = 2; + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The description to set. * @return This builder for chaining. @@ -1053,7 +1072,7 @@ public Builder setDescription(java.lang.String value) { * Optional. A description of this exclusion. * * - * string description = 2; + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1070,7 +1089,7 @@ public Builder clearDescription() { * Optional. A description of this exclusion. * * - * string description = 2; + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for description to set. * @return This builder for chaining. @@ -1091,16 +1110,16 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { * * *
-     * Required. An [advanced logs filter](/logging/docs/view/advanced-queries)
+     * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries)
      * that matches the log entries to be excluded. By using the
-     * [sample function](/logging/docs/view/advanced-queries#sample),
+     * [sample function](https://cloud.google.com/logging/docs/view/advanced-queries#sample),
      * you can exclude less than 100% of the matching log entries.
      * For example, the following query matches 99% of low-severity log
      * entries from Google Cloud Storage buckets:
      * `"resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)"`
      * 
* - * string filter = 3; + * string filter = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The filter. */ @@ -1119,16 +1138,16 @@ public java.lang.String getFilter() { * * *
-     * Required. An [advanced logs filter](/logging/docs/view/advanced-queries)
+     * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries)
      * that matches the log entries to be excluded. By using the
-     * [sample function](/logging/docs/view/advanced-queries#sample),
+     * [sample function](https://cloud.google.com/logging/docs/view/advanced-queries#sample),
      * you can exclude less than 100% of the matching log entries.
      * For example, the following query matches 99% of low-severity log
      * entries from Google Cloud Storage buckets:
      * `"resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)"`
      * 
* - * string filter = 3; + * string filter = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for filter. */ @@ -1147,16 +1166,16 @@ public com.google.protobuf.ByteString getFilterBytes() { * * *
-     * Required. An [advanced logs filter](/logging/docs/view/advanced-queries)
+     * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries)
      * that matches the log entries to be excluded. By using the
-     * [sample function](/logging/docs/view/advanced-queries#sample),
+     * [sample function](https://cloud.google.com/logging/docs/view/advanced-queries#sample),
      * you can exclude less than 100% of the matching log entries.
      * For example, the following query matches 99% of low-severity log
      * entries from Google Cloud Storage buckets:
      * `"resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)"`
      * 
* - * string filter = 3; + * string filter = 3 [(.google.api.field_behavior) = REQUIRED]; * * @param value The filter to set. * @return This builder for chaining. @@ -1174,16 +1193,16 @@ public Builder setFilter(java.lang.String value) { * * *
-     * Required. An [advanced logs filter](/logging/docs/view/advanced-queries)
+     * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries)
      * that matches the log entries to be excluded. By using the
-     * [sample function](/logging/docs/view/advanced-queries#sample),
+     * [sample function](https://cloud.google.com/logging/docs/view/advanced-queries#sample),
      * you can exclude less than 100% of the matching log entries.
      * For example, the following query matches 99% of low-severity log
      * entries from Google Cloud Storage buckets:
      * `"resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)"`
      * 
* - * string filter = 3; + * string filter = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ @@ -1197,16 +1216,16 @@ public Builder clearFilter() { * * *
-     * Required. An [advanced logs filter](/logging/docs/view/advanced-queries)
+     * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries)
      * that matches the log entries to be excluded. By using the
-     * [sample function](/logging/docs/view/advanced-queries#sample),
+     * [sample function](https://cloud.google.com/logging/docs/view/advanced-queries#sample),
      * you can exclude less than 100% of the matching log entries.
      * For example, the following query matches 99% of low-severity log
      * entries from Google Cloud Storage buckets:
      * `"resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)"`
      * 
* - * string filter = 3; + * string filter = 3 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for filter to set. * @return This builder for chaining. @@ -1233,10 +1252,11 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { * value of this field. * * - * bool disabled = 4; + * bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The disabled. */ + @java.lang.Override public boolean getDisabled() { return disabled_; } @@ -1250,7 +1270,7 @@ public boolean getDisabled() { * value of this field. * * - * bool disabled = 4; + * bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The disabled to set. * @return This builder for chaining. @@ -1271,7 +1291,7 @@ public Builder setDisabled(boolean value) { * value of this field. * * - * bool disabled = 4; + * bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1296,7 +1316,9 @@ public Builder clearDisabled() { * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp create_time = 5; + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the createTime field is set. */ @@ -1311,7 +1333,9 @@ public boolean hasCreateTime() { * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp create_time = 5; + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The createTime. */ @@ -1332,7 +1356,9 @@ public com.google.protobuf.Timestamp getCreateTime() { * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp create_time = 5; + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder setCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { @@ -1355,7 +1381,9 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp create_time = 5; + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (createTimeBuilder_ == null) { @@ -1375,7 +1403,9 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp create_time = 5; + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { @@ -1400,7 +1430,9 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp create_time = 5; + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder clearCreateTime() { if (createTimeBuilder_ == null) { @@ -1421,7 +1453,9 @@ public Builder clearCreateTime() { * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp create_time = 5; + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { @@ -1436,7 +1470,9 @@ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp create_time = 5; + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { if (createTimeBuilder_ != null) { @@ -1455,7 +1491,9 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp create_time = 5; + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, @@ -1488,7 +1526,9 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp update_time = 6; + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the updateTime field is set. */ @@ -1503,7 +1543,9 @@ public boolean hasUpdateTime() { * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp update_time = 6; + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The updateTime. */ @@ -1524,7 +1566,9 @@ public com.google.protobuf.Timestamp getUpdateTime() { * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp update_time = 6; + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { @@ -1547,7 +1591,9 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp update_time = 6; + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (updateTimeBuilder_ == null) { @@ -1567,7 +1613,9 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp update_time = 6; + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { @@ -1592,7 +1640,9 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp update_time = 6; + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder clearUpdateTime() { if (updateTimeBuilder_ == null) { @@ -1613,7 +1663,9 @@ public Builder clearUpdateTime() { * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp update_time = 6; + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { @@ -1628,7 +1680,9 @@ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp update_time = 6; + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { if (updateTimeBuilder_ != null) { @@ -1647,7 +1701,9 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp update_time = 6; + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusionName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusionName.java new file mode 100644 index 000000000..df0d4fd2f --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusionName.java @@ -0,0 +1,447 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.logging.v2; + +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class LogExclusionName implements ResourceName { + + @Deprecated + protected LogExclusionName() {} + + private static final PathTemplate PROJECT_EXCLUSION_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/exclusions/{exclusion}"); + private static final PathTemplate ORGANIZATION_EXCLUSION_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("organizations/{organization}/exclusions/{exclusion}"); + private static final PathTemplate FOLDER_EXCLUSION_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("folders/{folder}/exclusions/{exclusion}"); + private static final PathTemplate BILLING_ACCOUNT_EXCLUSION_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "billingAccounts/{billing_account}/exclusions/{exclusion}"); + + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + + private String project; + private String exclusion; + private String organization; + private String folder; + private String billingAccount; + + public String getProject() { + return project; + } + + public String getExclusion() { + return exclusion; + } + + public String getOrganization() { + return organization; + } + + public String getFolder() { + return folder; + } + + public String getBillingAccount() { + return billingAccount; + } + + private LogExclusionName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + exclusion = Preconditions.checkNotNull(builder.getExclusion()); + pathTemplate = PROJECT_EXCLUSION_PATH_TEMPLATE; + } + + private LogExclusionName(OrganizationExclusionBuilder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + exclusion = Preconditions.checkNotNull(builder.getExclusion()); + pathTemplate = ORGANIZATION_EXCLUSION_PATH_TEMPLATE; + } + + private LogExclusionName(FolderExclusionBuilder builder) { + folder = Preconditions.checkNotNull(builder.getFolder()); + exclusion = Preconditions.checkNotNull(builder.getExclusion()); + pathTemplate = FOLDER_EXCLUSION_PATH_TEMPLATE; + } + + private LogExclusionName(BillingAccountExclusionBuilder builder) { + billingAccount = Preconditions.checkNotNull(builder.getBillingAccount()); + exclusion = Preconditions.checkNotNull(builder.getExclusion()); + pathTemplate = BILLING_ACCOUNT_EXCLUSION_PATH_TEMPLATE; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectExclusionBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static OrganizationExclusionBuilder newOrganizationExclusionBuilder() { + return new OrganizationExclusionBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static FolderExclusionBuilder newFolderExclusionBuilder() { + return new FolderExclusionBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static BillingAccountExclusionBuilder newBillingAccountExclusionBuilder() { + return new BillingAccountExclusionBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LogExclusionName of(String project, String exclusion) { + return newProjectExclusionBuilder().setProject(project).setExclusion(exclusion).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static LogExclusionName ofProjectExclusionName(String project, String exclusion) { + return newProjectExclusionBuilder().setProject(project).setExclusion(exclusion).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static LogExclusionName ofOrganizationExclusionName( + String organization, String exclusion) { + return newOrganizationExclusionBuilder() + .setOrganization(organization) + .setExclusion(exclusion) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static LogExclusionName ofFolderExclusionName(String folder, String exclusion) { + return newFolderExclusionBuilder().setFolder(folder).setExclusion(exclusion).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static LogExclusionName ofBillingAccountExclusionName( + String billingAccount, String exclusion) { + return newBillingAccountExclusionBuilder() + .setBillingAccount(billingAccount) + .setExclusion(exclusion) + .build(); + } + + public static String format(String project, String exclusion) { + return newBuilder().setProject(project).setExclusion(exclusion).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectExclusionName(String project, String exclusion) { + return newBuilder().setProject(project).setExclusion(exclusion).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatOrganizationExclusionName(String organization, String exclusion) { + return newOrganizationExclusionBuilder() + .setOrganization(organization) + .setExclusion(exclusion) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatFolderExclusionName(String folder, String exclusion) { + return newFolderExclusionBuilder().setFolder(folder).setExclusion(exclusion).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatBillingAccountExclusionName(String billingAccount, String exclusion) { + return newBillingAccountExclusionBuilder() + .setBillingAccount(billingAccount) + .setExclusion(exclusion) + .build() + .toString(); + } + + public static LogExclusionName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT_EXCLUSION_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = PROJECT_EXCLUSION_PATH_TEMPLATE.match(formattedString); + return ofProjectExclusionName(matchMap.get("project"), matchMap.get("exclusion")); + } else if (ORGANIZATION_EXCLUSION_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = ORGANIZATION_EXCLUSION_PATH_TEMPLATE.match(formattedString); + return ofOrganizationExclusionName(matchMap.get("organization"), matchMap.get("exclusion")); + } else if (FOLDER_EXCLUSION_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = FOLDER_EXCLUSION_PATH_TEMPLATE.match(formattedString); + return ofFolderExclusionName(matchMap.get("folder"), matchMap.get("exclusion")); + } else if (BILLING_ACCOUNT_EXCLUSION_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = BILLING_ACCOUNT_EXCLUSION_PATH_TEMPLATE.match(formattedString); + return ofBillingAccountExclusionName( + matchMap.get("billing_account"), matchMap.get("exclusion")); + } + throw new ValidationException("JobName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LogExclusionName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_EXCLUSION_PATH_TEMPLATE.matches(formattedString) + || ORGANIZATION_EXCLUSION_PATH_TEMPLATE.matches(formattedString) + || FOLDER_EXCLUSION_PATH_TEMPLATE.matches(formattedString) + || BILLING_ACCOUNT_EXCLUSION_PATH_TEMPLATE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (exclusion != null) { + fieldMapBuilder.put("exclusion", exclusion); + } + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + if (folder != null) { + fieldMapBuilder.put("folder", folder); + } + if (billingAccount != null) { + fieldMapBuilder.put("billing_account", billingAccount); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + /** Builder for projects/{project}/exclusions/{exclusion}. */ + public static class Builder { + + private String project; + private String exclusion; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getExclusion() { + return exclusion; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setExclusion(String exclusion) { + this.exclusion = exclusion; + return this; + } + + private Builder(LogExclusionName logExclusionName) { + Preconditions.checkArgument( + logExclusionName.pathTemplate == PROJECT_EXCLUSION_PATH_TEMPLATE, + "toBuilder is only supported when LogExclusionName has the pattern of " + + "projects/{project}/exclusions/{exclusion}."); + project = logExclusionName.project; + exclusion = logExclusionName.exclusion; + } + + public LogExclusionName build() { + return new LogExclusionName(this); + } + } + + /** Builder for organizations/{organization}/exclusions/{exclusion}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class OrganizationExclusionBuilder { + + private String organization; + private String exclusion; + + private OrganizationExclusionBuilder() {} + + public String getOrganization() { + return organization; + } + + public String getExclusion() { + return exclusion; + } + + public OrganizationExclusionBuilder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public OrganizationExclusionBuilder setExclusion(String exclusion) { + this.exclusion = exclusion; + return this; + } + + public LogExclusionName build() { + return new LogExclusionName(this); + } + } + + /** Builder for folders/{folder}/exclusions/{exclusion}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class FolderExclusionBuilder { + + private String folder; + private String exclusion; + + private FolderExclusionBuilder() {} + + public String getFolder() { + return folder; + } + + public String getExclusion() { + return exclusion; + } + + public FolderExclusionBuilder setFolder(String folder) { + this.folder = folder; + return this; + } + + public FolderExclusionBuilder setExclusion(String exclusion) { + this.exclusion = exclusion; + return this; + } + + public LogExclusionName build() { + return new LogExclusionName(this); + } + } + + /** Builder for billingAccounts/{billing_account}/exclusions/{exclusion}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class BillingAccountExclusionBuilder { + + private String billingAccount; + private String exclusion; + + private BillingAccountExclusionBuilder() {} + + public String getBillingAccount() { + return billingAccount; + } + + public String getExclusion() { + return exclusion; + } + + public BillingAccountExclusionBuilder setBillingAccount(String billingAccount) { + this.billingAccount = billingAccount; + return this; + } + + public BillingAccountExclusionBuilder setExclusion(String exclusion) { + this.exclusion = exclusion; + return this; + } + + public LogExclusionName build() { + return new LogExclusionName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + LogExclusionName that = (LogExclusionName) o; + return (Objects.equals(this.project, that.project)) + && (Objects.equals(this.exclusion, that.exclusion)) + && (Objects.equals(this.organization, that.organization)) + && (Objects.equals(this.folder, that.folder)) + && (Objects.equals(this.billingAccount, that.billingAccount)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(exclusion); + h *= 1000003; + h ^= Objects.hashCode(organization); + h *= 1000003; + h ^= Objects.hashCode(folder); + h *= 1000003; + h ^= Objects.hashCode(billingAccount); + return h; + } +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusionOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusionOrBuilder.java index e43e747f7..359fab67d 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusionOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusionOrBuilder.java @@ -27,13 +27,13 @@ public interface LogExclusionOrBuilder * * *
-   * Required. A client-assigned identifier, such as
-   * `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and
-   * can include only letters, digits, underscores, hyphens, and periods.
-   * First character has to be alphanumeric.
+   * Required. A client-assigned identifier, such as `"load-balancer-exclusion"`.
+   * Identifiers are limited to 100 characters and can include only letters,
+   * digits, underscores, hyphens, and periods. First character has to be
+   * alphanumeric.
    * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The name. */ @@ -42,13 +42,13 @@ public interface LogExclusionOrBuilder * * *
-   * Required. A client-assigned identifier, such as
-   * `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and
-   * can include only letters, digits, underscores, hyphens, and periods.
-   * First character has to be alphanumeric.
+   * Required. A client-assigned identifier, such as `"load-balancer-exclusion"`.
+   * Identifiers are limited to 100 characters and can include only letters,
+   * digits, underscores, hyphens, and periods. First character has to be
+   * alphanumeric.
    * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for name. */ @@ -61,7 +61,7 @@ public interface LogExclusionOrBuilder * Optional. A description of this exclusion. * * - * string description = 2; + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The description. */ @@ -73,7 +73,7 @@ public interface LogExclusionOrBuilder * Optional. A description of this exclusion. * * - * string description = 2; + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for description. */ @@ -83,16 +83,16 @@ public interface LogExclusionOrBuilder * * *
-   * Required. An [advanced logs filter](/logging/docs/view/advanced-queries)
+   * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries)
    * that matches the log entries to be excluded. By using the
-   * [sample function](/logging/docs/view/advanced-queries#sample),
+   * [sample function](https://cloud.google.com/logging/docs/view/advanced-queries#sample),
    * you can exclude less than 100% of the matching log entries.
    * For example, the following query matches 99% of low-severity log
    * entries from Google Cloud Storage buckets:
    * `"resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)"`
    * 
* - * string filter = 3; + * string filter = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The filter. */ @@ -101,16 +101,16 @@ public interface LogExclusionOrBuilder * * *
-   * Required. An [advanced logs filter](/logging/docs/view/advanced-queries)
+   * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries)
    * that matches the log entries to be excluded. By using the
-   * [sample function](/logging/docs/view/advanced-queries#sample),
+   * [sample function](https://cloud.google.com/logging/docs/view/advanced-queries#sample),
    * you can exclude less than 100% of the matching log entries.
    * For example, the following query matches 99% of low-severity log
    * entries from Google Cloud Storage buckets:
    * `"resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)"`
    * 
* - * string filter = 3; + * string filter = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for filter. */ @@ -126,7 +126,7 @@ public interface LogExclusionOrBuilder * value of this field. * * - * bool disabled = 4; + * bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The disabled. */ @@ -140,7 +140,8 @@ public interface LogExclusionOrBuilder * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp create_time = 5; + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the createTime field is set. */ @@ -153,7 +154,8 @@ public interface LogExclusionOrBuilder * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp create_time = 5; + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The createTime. */ @@ -166,7 +168,8 @@ public interface LogExclusionOrBuilder * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp create_time = 5; + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); @@ -178,7 +181,8 @@ public interface LogExclusionOrBuilder * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp update_time = 6; + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the updateTime field is set. */ @@ -191,7 +195,8 @@ public interface LogExclusionOrBuilder * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp update_time = 6; + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The updateTime. */ @@ -204,7 +209,8 @@ public interface LogExclusionOrBuilder * This field may not be present for older exclusions. * * - * .google.protobuf.Timestamp update_time = 6; + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); } diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetric.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetric.java index 1f39d8e4d..ed09058d5 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetric.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetric.java @@ -336,6 +336,10 @@ public ApiVersion findValueByNumber(int number) { }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } return getDescriptor().getValues().get(ordinal()); } @@ -387,10 +391,11 @@ private ApiVersion(int value) { * URL-encoded. Example: `"projects/my-project/metrics/nginx%2Frequests"`. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -419,10 +424,11 @@ public java.lang.String getName() { * URL-encoded. Example: `"projects/my-project/metrics/nginx%2Frequests"`. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -445,10 +451,11 @@ public com.google.protobuf.ByteString getNameBytes() { * The maximum length of the description is 8000 characters. * * - * string description = 2; + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The description. */ + @java.lang.Override public java.lang.String getDescription() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { @@ -468,10 +475,11 @@ public java.lang.String getDescription() { * The maximum length of the description is 8000 characters. * * - * string description = 2; + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for description. */ + @java.lang.Override public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { @@ -490,17 +498,18 @@ public com.google.protobuf.ByteString getDescriptionBytes() { * * *
-   * Required. An [advanced logs filter](/logging/docs/view/advanced_filters)
-   * which is used to match log entries.
+   * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters) which is
+   * used to match log entries.
    * Example:
    *     "resource.type=gae_app AND severity>=ERROR"
    * The maximum length of the filter is 20000 characters.
    * 
* - * string filter = 3; + * string filter = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The filter. */ + @java.lang.Override public java.lang.String getFilter() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { @@ -516,17 +525,18 @@ public java.lang.String getFilter() { * * *
-   * Required. An [advanced logs filter](/logging/docs/view/advanced_filters)
-   * which is used to match log entries.
+   * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters) which is
+   * used to match log entries.
    * Example:
    *     "resource.type=gae_app AND severity>=ERROR"
    * The maximum length of the filter is 20000 characters.
    * 
* - * string filter = 3; + * string filter = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for filter. */ + @java.lang.Override public com.google.protobuf.ByteString getFilterBytes() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { @@ -564,10 +574,13 @@ public com.google.protobuf.ByteString getFilterBytes() { * their description. * * - * .google.api.MetricDescriptor metric_descriptor = 5; + * + * .google.api.MetricDescriptor metric_descriptor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the metricDescriptor field is set. */ + @java.lang.Override public boolean hasMetricDescriptor() { return metricDescriptor_ != null; } @@ -594,10 +607,13 @@ public boolean hasMetricDescriptor() { * their description. * * - * .google.api.MetricDescriptor metric_descriptor = 5; + * + * .google.api.MetricDescriptor metric_descriptor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The metricDescriptor. */ + @java.lang.Override public com.google.api.MetricDescriptor getMetricDescriptor() { return metricDescriptor_ == null ? com.google.api.MetricDescriptor.getDefaultInstance() @@ -626,8 +642,11 @@ public com.google.api.MetricDescriptor getMetricDescriptor() { * their description. * * - * .google.api.MetricDescriptor metric_descriptor = 5; + * + * .google.api.MetricDescriptor metric_descriptor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ + @java.lang.Override public com.google.api.MetricDescriptorOrBuilder getMetricDescriptorOrBuilder() { return getMetricDescriptor(); } @@ -657,10 +676,11 @@ public com.google.api.MetricDescriptorOrBuilder getMetricDescriptorOrBuilder() { * Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` * * - * string value_extractor = 6; + * string value_extractor = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The valueExtractor. */ + @java.lang.Override public java.lang.String getValueExtractor() { java.lang.Object ref = valueExtractor_; if (ref instanceof java.lang.String) { @@ -695,10 +715,11 @@ public java.lang.String getValueExtractor() { * Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` * * - * string value_extractor = 6; + * string value_extractor = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for valueExtractor. */ + @java.lang.Override public com.google.protobuf.ByteString getValueExtractorBytes() { java.lang.Object ref = valueExtractor_; if (ref instanceof java.lang.String) { @@ -756,8 +777,10 @@ public int getLabelExtractorsCount() { * number of active time series that are allowed in a project. * * - * map<string, string> label_extractors = 7; + * map<string, string> label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ + @java.lang.Override public boolean containsLabelExtractors(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -765,6 +788,7 @@ public boolean containsLabelExtractors(java.lang.String key) { return internalGetLabelExtractors().getMap().containsKey(key); } /** Use {@link #getLabelExtractorsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLabelExtractors() { return getLabelExtractorsMap(); @@ -787,8 +811,10 @@ public java.util.Map getLabelExtractors() { * number of active time series that are allowed in a project. * * - * map<string, string> label_extractors = 7; + * map<string, string> label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ + @java.lang.Override public java.util.Map getLabelExtractorsMap() { return internalGetLabelExtractors().getMap(); } @@ -810,8 +836,10 @@ public java.util.Map getLabelExtractorsMap() * number of active time series that are allowed in a project. * * - * map<string, string> label_extractors = 7; + * map<string, string> label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ + @java.lang.Override public java.lang.String getLabelExtractorsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -838,8 +866,10 @@ public java.lang.String getLabelExtractorsOrDefault( * number of active time series that are allowed in a project. * * - * map<string, string> label_extractors = 7; + * map<string, string> label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ + @java.lang.Override public java.lang.String getLabelExtractorsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -862,10 +892,13 @@ public java.lang.String getLabelExtractorsOrThrow(java.lang.String key) { * used to create a histogram of the extracted values. * * - * .google.api.Distribution.BucketOptions bucket_options = 8; + * + * .google.api.Distribution.BucketOptions bucket_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the bucketOptions field is set. */ + @java.lang.Override public boolean hasBucketOptions() { return bucketOptions_ != null; } @@ -878,10 +911,13 @@ public boolean hasBucketOptions() { * used to create a histogram of the extracted values. * * - * .google.api.Distribution.BucketOptions bucket_options = 8; + * + * .google.api.Distribution.BucketOptions bucket_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The bucketOptions. */ + @java.lang.Override public com.google.api.Distribution.BucketOptions getBucketOptions() { return bucketOptions_ == null ? com.google.api.Distribution.BucketOptions.getDefaultInstance() @@ -896,8 +932,11 @@ public com.google.api.Distribution.BucketOptions getBucketOptions() { * used to create a histogram of the extracted values. * * - * .google.api.Distribution.BucketOptions bucket_options = 8; + * + * .google.api.Distribution.BucketOptions bucket_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ + @java.lang.Override public com.google.api.Distribution.BucketOptionsOrBuilder getBucketOptionsOrBuilder() { return getBucketOptions(); } @@ -912,10 +951,12 @@ public com.google.api.Distribution.BucketOptionsOrBuilder getBucketOptionsOrBuil * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp create_time = 9; + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the createTime field is set. */ + @java.lang.Override public boolean hasCreateTime() { return createTime_ != null; } @@ -927,10 +968,12 @@ public boolean hasCreateTime() { * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp create_time = 9; + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The createTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } @@ -942,8 +985,10 @@ public com.google.protobuf.Timestamp getCreateTime() { * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp create_time = 9; + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return getCreateTime(); } @@ -958,10 +1003,12 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp update_time = 10; + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the updateTime field is set. */ + @java.lang.Override public boolean hasUpdateTime() { return updateTime_ != null; } @@ -973,10 +1020,12 @@ public boolean hasUpdateTime() { * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp update_time = 10; + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The updateTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getUpdateTime() { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } @@ -988,8 +1037,10 @@ public com.google.protobuf.Timestamp getUpdateTime() { * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp update_time = 10; + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return getUpdateTime(); } @@ -1008,6 +1059,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * @return The enum numeric value on the wire for version. */ + @java.lang.Override @java.lang.Deprecated public int getVersionValue() { return version_; @@ -1024,6 +1076,7 @@ public int getVersionValue() { * * @return The version. */ + @java.lang.Override @java.lang.Deprecated public com.google.logging.v2.LogMetric.ApiVersion getVersion() { @SuppressWarnings("deprecation") @@ -1586,7 +1639,7 @@ public Builder mergeFrom( * URL-encoded. Example: `"projects/my-project/metrics/nginx%2Frequests"`. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The name. */ @@ -1618,7 +1671,7 @@ public java.lang.String getName() { * URL-encoded. Example: `"projects/my-project/metrics/nginx%2Frequests"`. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for name. */ @@ -1650,7 +1703,7 @@ public com.google.protobuf.ByteString getNameBytes() { * URL-encoded. Example: `"projects/my-project/metrics/nginx%2Frequests"`. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The name to set. * @return This builder for chaining. @@ -1681,7 +1734,7 @@ public Builder setName(java.lang.String value) { * URL-encoded. Example: `"projects/my-project/metrics/nginx%2Frequests"`. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ @@ -1708,7 +1761,7 @@ public Builder clearName() { * URL-encoded. Example: `"projects/my-project/metrics/nginx%2Frequests"`. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for name to set. * @return This builder for chaining. @@ -1733,7 +1786,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * The maximum length of the description is 8000 characters. * * - * string description = 2; + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The description. */ @@ -1756,7 +1809,7 @@ public java.lang.String getDescription() { * The maximum length of the description is 8000 characters. * * - * string description = 2; + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for description. */ @@ -1779,7 +1832,7 @@ public com.google.protobuf.ByteString getDescriptionBytes() { * The maximum length of the description is 8000 characters. * * - * string description = 2; + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The description to set. * @return This builder for chaining. @@ -1801,7 +1854,7 @@ public Builder setDescription(java.lang.String value) { * The maximum length of the description is 8000 characters. * * - * string description = 2; + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1819,7 +1872,7 @@ public Builder clearDescription() { * The maximum length of the description is 8000 characters. * * - * string description = 2; + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for description to set. * @return This builder for chaining. @@ -1840,14 +1893,14 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { * * *
-     * Required. An [advanced logs filter](/logging/docs/view/advanced_filters)
-     * which is used to match log entries.
+     * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters) which is
+     * used to match log entries.
      * Example:
      *     "resource.type=gae_app AND severity>=ERROR"
      * The maximum length of the filter is 20000 characters.
      * 
* - * string filter = 3; + * string filter = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The filter. */ @@ -1866,14 +1919,14 @@ public java.lang.String getFilter() { * * *
-     * Required. An [advanced logs filter](/logging/docs/view/advanced_filters)
-     * which is used to match log entries.
+     * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters) which is
+     * used to match log entries.
      * Example:
      *     "resource.type=gae_app AND severity>=ERROR"
      * The maximum length of the filter is 20000 characters.
      * 
* - * string filter = 3; + * string filter = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for filter. */ @@ -1892,14 +1945,14 @@ public com.google.protobuf.ByteString getFilterBytes() { * * *
-     * Required. An [advanced logs filter](/logging/docs/view/advanced_filters)
-     * which is used to match log entries.
+     * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters) which is
+     * used to match log entries.
      * Example:
      *     "resource.type=gae_app AND severity>=ERROR"
      * The maximum length of the filter is 20000 characters.
      * 
* - * string filter = 3; + * string filter = 3 [(.google.api.field_behavior) = REQUIRED]; * * @param value The filter to set. * @return This builder for chaining. @@ -1917,14 +1970,14 @@ public Builder setFilter(java.lang.String value) { * * *
-     * Required. An [advanced logs filter](/logging/docs/view/advanced_filters)
-     * which is used to match log entries.
+     * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters) which is
+     * used to match log entries.
      * Example:
      *     "resource.type=gae_app AND severity>=ERROR"
      * The maximum length of the filter is 20000 characters.
      * 
* - * string filter = 3; + * string filter = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ @@ -1938,14 +1991,14 @@ public Builder clearFilter() { * * *
-     * Required. An [advanced logs filter](/logging/docs/view/advanced_filters)
-     * which is used to match log entries.
+     * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters) which is
+     * used to match log entries.
      * Example:
      *     "resource.type=gae_app AND severity>=ERROR"
      * The maximum length of the filter is 20000 characters.
      * 
* - * string filter = 3; + * string filter = 3 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for filter to set. * @return This builder for chaining. @@ -1990,7 +2043,9 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { * their description. * * - * .google.api.MetricDescriptor metric_descriptor = 5; + * + * .google.api.MetricDescriptor metric_descriptor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the metricDescriptor field is set. */ @@ -2020,7 +2075,9 @@ public boolean hasMetricDescriptor() { * their description. * * - * .google.api.MetricDescriptor metric_descriptor = 5; + * + * .google.api.MetricDescriptor metric_descriptor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The metricDescriptor. */ @@ -2056,7 +2113,9 @@ public com.google.api.MetricDescriptor getMetricDescriptor() { * their description. * * - * .google.api.MetricDescriptor metric_descriptor = 5; + * + * .google.api.MetricDescriptor metric_descriptor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setMetricDescriptor(com.google.api.MetricDescriptor value) { if (metricDescriptorBuilder_ == null) { @@ -2094,7 +2153,9 @@ public Builder setMetricDescriptor(com.google.api.MetricDescriptor value) { * their description. * * - * .google.api.MetricDescriptor metric_descriptor = 5; + * + * .google.api.MetricDescriptor metric_descriptor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setMetricDescriptor(com.google.api.MetricDescriptor.Builder builderForValue) { if (metricDescriptorBuilder_ == null) { @@ -2129,7 +2190,9 @@ public Builder setMetricDescriptor(com.google.api.MetricDescriptor.Builder build * their description. * * - * .google.api.MetricDescriptor metric_descriptor = 5; + * + * .google.api.MetricDescriptor metric_descriptor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeMetricDescriptor(com.google.api.MetricDescriptor value) { if (metricDescriptorBuilder_ == null) { @@ -2171,7 +2234,9 @@ public Builder mergeMetricDescriptor(com.google.api.MetricDescriptor value) { * their description. * * - * .google.api.MetricDescriptor metric_descriptor = 5; + * + * .google.api.MetricDescriptor metric_descriptor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearMetricDescriptor() { if (metricDescriptorBuilder_ == null) { @@ -2207,7 +2272,9 @@ public Builder clearMetricDescriptor() { * their description. * * - * .google.api.MetricDescriptor metric_descriptor = 5; + * + * .google.api.MetricDescriptor metric_descriptor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.api.MetricDescriptor.Builder getMetricDescriptorBuilder() { @@ -2237,7 +2304,9 @@ public com.google.api.MetricDescriptor.Builder getMetricDescriptorBuilder() { * their description. * * - * .google.api.MetricDescriptor metric_descriptor = 5; + * + * .google.api.MetricDescriptor metric_descriptor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.api.MetricDescriptorOrBuilder getMetricDescriptorOrBuilder() { if (metricDescriptorBuilder_ != null) { @@ -2271,7 +2340,9 @@ public com.google.api.MetricDescriptorOrBuilder getMetricDescriptorOrBuilder() { * their description. * * - * .google.api.MetricDescriptor metric_descriptor = 5; + * + * .google.api.MetricDescriptor metric_descriptor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.api.MetricDescriptor, @@ -2314,7 +2385,7 @@ public com.google.api.MetricDescriptorOrBuilder getMetricDescriptorOrBuilder() { * Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` * * - * string value_extractor = 6; + * string value_extractor = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The valueExtractor. */ @@ -2352,7 +2423,7 @@ public java.lang.String getValueExtractor() { * Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` * * - * string value_extractor = 6; + * string value_extractor = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for valueExtractor. */ @@ -2390,7 +2461,7 @@ public com.google.protobuf.ByteString getValueExtractorBytes() { * Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` * * - * string value_extractor = 6; + * string value_extractor = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The valueExtractor to set. * @return This builder for chaining. @@ -2427,7 +2498,7 @@ public Builder setValueExtractor(java.lang.String value) { * Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` * * - * string value_extractor = 6; + * string value_extractor = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -2460,7 +2531,7 @@ public Builder clearValueExtractor() { * Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` * * - * string value_extractor = 6; + * string value_extractor = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for valueExtractor to set. * @return This builder for chaining. @@ -2523,8 +2594,11 @@ public int getLabelExtractorsCount() { * number of active time series that are allowed in a project. * * - * map<string, string> label_extractors = 7; + * + * map<string, string> label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ + @java.lang.Override public boolean containsLabelExtractors(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -2532,6 +2606,7 @@ public boolean containsLabelExtractors(java.lang.String key) { return internalGetLabelExtractors().getMap().containsKey(key); } /** Use {@link #getLabelExtractorsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLabelExtractors() { return getLabelExtractorsMap(); @@ -2554,8 +2629,11 @@ public java.util.Map getLabelExtractors() { * number of active time series that are allowed in a project. * * - * map<string, string> label_extractors = 7; + * + * map<string, string> label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ + @java.lang.Override public java.util.Map getLabelExtractorsMap() { return internalGetLabelExtractors().getMap(); } @@ -2577,8 +2655,11 @@ public java.util.Map getLabelExtractorsMap() * number of active time series that are allowed in a project. * * - * map<string, string> label_extractors = 7; + * + * map<string, string> label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ + @java.lang.Override public java.lang.String getLabelExtractorsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -2605,8 +2686,11 @@ public java.lang.String getLabelExtractorsOrDefault( * number of active time series that are allowed in a project. * * - * map<string, string> label_extractors = 7; + * + * map<string, string> label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ + @java.lang.Override public java.lang.String getLabelExtractorsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -2640,7 +2724,9 @@ public Builder clearLabelExtractors() { * number of active time series that are allowed in a project. * * - * map<string, string> label_extractors = 7; + * + * map<string, string> label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder removeLabelExtractors(java.lang.String key) { if (key == null) { @@ -2672,7 +2758,9 @@ public java.util.Map getMutableLabelExtracto * number of active time series that are allowed in a project. * * - * map<string, string> label_extractors = 7; + * + * map<string, string> label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder putLabelExtractors(java.lang.String key, java.lang.String value) { if (key == null) { @@ -2702,7 +2790,9 @@ public Builder putLabelExtractors(java.lang.String key, java.lang.String value) * number of active time series that are allowed in a project. * * - * map<string, string> label_extractors = 7; + * + * map<string, string> label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder putAllLabelExtractors(java.util.Map values) { internalGetMutableLabelExtractors().getMutableMap().putAll(values); @@ -2724,7 +2814,9 @@ public Builder putAllLabelExtractors(java.util.Map * - * .google.api.Distribution.BucketOptions bucket_options = 8; + * + * .google.api.Distribution.BucketOptions bucket_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the bucketOptions field is set. */ @@ -2740,7 +2832,9 @@ public boolean hasBucketOptions() { * used to create a histogram of the extracted values. * * - * .google.api.Distribution.BucketOptions bucket_options = 8; + * + * .google.api.Distribution.BucketOptions bucket_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The bucketOptions. */ @@ -2762,7 +2856,9 @@ public com.google.api.Distribution.BucketOptions getBucketOptions() { * used to create a histogram of the extracted values. * * - * .google.api.Distribution.BucketOptions bucket_options = 8; + * + * .google.api.Distribution.BucketOptions bucket_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setBucketOptions(com.google.api.Distribution.BucketOptions value) { if (bucketOptionsBuilder_ == null) { @@ -2786,7 +2882,9 @@ public Builder setBucketOptions(com.google.api.Distribution.BucketOptions value) * used to create a histogram of the extracted values. * * - * .google.api.Distribution.BucketOptions bucket_options = 8; + * + * .google.api.Distribution.BucketOptions bucket_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setBucketOptions( com.google.api.Distribution.BucketOptions.Builder builderForValue) { @@ -2808,7 +2906,9 @@ public Builder setBucketOptions( * used to create a histogram of the extracted values. * * - * .google.api.Distribution.BucketOptions bucket_options = 8; + * + * .google.api.Distribution.BucketOptions bucket_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeBucketOptions(com.google.api.Distribution.BucketOptions value) { if (bucketOptionsBuilder_ == null) { @@ -2836,7 +2936,9 @@ public Builder mergeBucketOptions(com.google.api.Distribution.BucketOptions valu * used to create a histogram of the extracted values. * * - * .google.api.Distribution.BucketOptions bucket_options = 8; + * + * .google.api.Distribution.BucketOptions bucket_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearBucketOptions() { if (bucketOptionsBuilder_ == null) { @@ -2858,7 +2960,9 @@ public Builder clearBucketOptions() { * used to create a histogram of the extracted values. * * - * .google.api.Distribution.BucketOptions bucket_options = 8; + * + * .google.api.Distribution.BucketOptions bucket_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.api.Distribution.BucketOptions.Builder getBucketOptionsBuilder() { @@ -2874,7 +2978,9 @@ public com.google.api.Distribution.BucketOptions.Builder getBucketOptionsBuilder * used to create a histogram of the extracted values. * * - * .google.api.Distribution.BucketOptions bucket_options = 8; + * + * .google.api.Distribution.BucketOptions bucket_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.api.Distribution.BucketOptionsOrBuilder getBucketOptionsOrBuilder() { if (bucketOptionsBuilder_ != null) { @@ -2894,7 +3000,9 @@ public com.google.api.Distribution.BucketOptionsOrBuilder getBucketOptionsOrBuil * used to create a histogram of the extracted values. * * - * .google.api.Distribution.BucketOptions bucket_options = 8; + * + * .google.api.Distribution.BucketOptions bucket_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.api.Distribution.BucketOptions, @@ -2927,7 +3035,9 @@ public com.google.api.Distribution.BucketOptionsOrBuilder getBucketOptionsOrBuil * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp create_time = 9; + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the createTime field is set. */ @@ -2942,7 +3052,9 @@ public boolean hasCreateTime() { * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp create_time = 9; + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The createTime. */ @@ -2963,7 +3075,9 @@ public com.google.protobuf.Timestamp getCreateTime() { * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp create_time = 9; + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder setCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { @@ -2986,7 +3100,9 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp create_time = 9; + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (createTimeBuilder_ == null) { @@ -3006,7 +3122,9 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp create_time = 9; + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { @@ -3031,7 +3149,9 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp create_time = 9; + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder clearCreateTime() { if (createTimeBuilder_ == null) { @@ -3052,7 +3172,9 @@ public Builder clearCreateTime() { * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp create_time = 9; + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { @@ -3067,7 +3189,9 @@ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp create_time = 9; + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { if (createTimeBuilder_ != null) { @@ -3086,7 +3210,9 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp create_time = 9; + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, @@ -3119,7 +3245,9 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp update_time = 10; + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the updateTime field is set. */ @@ -3134,7 +3262,9 @@ public boolean hasUpdateTime() { * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp update_time = 10; + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The updateTime. */ @@ -3155,7 +3285,9 @@ public com.google.protobuf.Timestamp getUpdateTime() { * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp update_time = 10; + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { @@ -3178,7 +3310,9 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp update_time = 10; + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (updateTimeBuilder_ == null) { @@ -3198,7 +3332,9 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp update_time = 10; + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { @@ -3223,7 +3359,9 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp update_time = 10; + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder clearUpdateTime() { if (updateTimeBuilder_ == null) { @@ -3244,7 +3382,9 @@ public Builder clearUpdateTime() { * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp update_time = 10; + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { @@ -3259,7 +3399,9 @@ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp update_time = 10; + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { if (updateTimeBuilder_ != null) { @@ -3278,7 +3420,9 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp update_time = 10; + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, @@ -3310,6 +3454,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * @return The enum numeric value on the wire for version. */ + @java.lang.Override @java.lang.Deprecated public int getVersionValue() { return version_; @@ -3329,6 +3474,7 @@ public int getVersionValue() { */ @java.lang.Deprecated public Builder setVersionValue(int value) { + version_ = value; onChanged(); return this; @@ -3345,6 +3491,7 @@ public Builder setVersionValue(int value) { * * @return The version. */ + @java.lang.Override @java.lang.Deprecated public com.google.logging.v2.LogMetric.ApiVersion getVersion() { @SuppressWarnings("deprecation") diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ProjectMetricName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetricName.java similarity index 80% rename from proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ProjectMetricName.java rename to proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetricName.java index 4d32e242c..1d0cd4016 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ProjectMetricName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetricName.java @@ -17,6 +17,7 @@ package com.google.logging.v2; import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; import java.util.ArrayList; @@ -25,7 +26,7 @@ /** AUTO-GENERATED DOCUMENTATION AND CLASS */ @javax.annotation.Generated("by GAPIC protoc plugin") -public class ProjectMetricName extends MetricName { +public class LogMetricName implements ResourceName { private static final PathTemplate PATH_TEMPLATE = PathTemplate.createWithoutUrlEncoding("projects/{project}/metrics/{metric}"); @@ -51,12 +52,12 @@ public Builder toBuilder() { return new Builder(this); } - private ProjectMetricName(Builder builder) { + private LogMetricName(Builder builder) { project = Preconditions.checkNotNull(builder.getProject()); metric = Preconditions.checkNotNull(builder.getMetric()); } - public static ProjectMetricName of(String project, String metric) { + public static LogMetricName of(String project, String metric) { return newBuilder().setProject(project).setMetric(metric).build(); } @@ -64,27 +65,27 @@ public static String format(String project, String metric) { return newBuilder().setProject(project).setMetric(metric).build().toString(); } - public static ProjectMetricName parse(String formattedString) { + public static LogMetricName parse(String formattedString) { if (formattedString.isEmpty()) { return null; } Map matchMap = PATH_TEMPLATE.validatedMatch( - formattedString, "ProjectMetricName.parse: formattedString not in valid format"); + formattedString, "LogMetricName.parse: formattedString not in valid format"); return of(matchMap.get("project"), matchMap.get("metric")); } - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); for (String formattedString : formattedStrings) { list.add(parse(formattedString)); } return list; } - public static List toStringList(List values) { + public static List toStringList(List values) { List list = new ArrayList(values.size()); - for (ProjectMetricName value : values) { + for (LogMetricName value : values) { if (value == null) { list.add(""); } else { @@ -121,7 +122,7 @@ public String toString() { return PATH_TEMPLATE.instantiate("project", project, "metric", metric); } - /** Builder for ProjectMetricName. */ + /** Builder for LogMetricName. */ public static class Builder { private String project; @@ -147,13 +148,13 @@ public Builder setMetric(String metric) { private Builder() {} - private Builder(ProjectMetricName projectMetricName) { - project = projectMetricName.project; - metric = projectMetricName.metric; + private Builder(LogMetricName logMetricName) { + project = logMetricName.project; + metric = logMetricName.metric; } - public ProjectMetricName build() { - return new ProjectMetricName(this); + public LogMetricName build() { + return new LogMetricName(this); } } @@ -162,8 +163,8 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o instanceof ProjectMetricName) { - ProjectMetricName that = (ProjectMetricName) o; + if (o instanceof LogMetricName) { + LogMetricName that = (LogMetricName) o; return (this.project.equals(that.project)) && (this.metric.equals(that.metric)); } return false; diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetricOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetricOrBuilder.java index df257b722..00e09ae49 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetricOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetricOrBuilder.java @@ -40,7 +40,7 @@ public interface LogMetricOrBuilder * URL-encoded. Example: `"projects/my-project/metrics/nginx%2Frequests"`. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The name. */ @@ -62,7 +62,7 @@ public interface LogMetricOrBuilder * URL-encoded. Example: `"projects/my-project/metrics/nginx%2Frequests"`. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for name. */ @@ -76,7 +76,7 @@ public interface LogMetricOrBuilder * The maximum length of the description is 8000 characters. * * - * string description = 2; + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The description. */ @@ -89,7 +89,7 @@ public interface LogMetricOrBuilder * The maximum length of the description is 8000 characters. * * - * string description = 2; + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for description. */ @@ -99,14 +99,14 @@ public interface LogMetricOrBuilder * * *
-   * Required. An [advanced logs filter](/logging/docs/view/advanced_filters)
-   * which is used to match log entries.
+   * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters) which is
+   * used to match log entries.
    * Example:
    *     "resource.type=gae_app AND severity>=ERROR"
    * The maximum length of the filter is 20000 characters.
    * 
* - * string filter = 3; + * string filter = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The filter. */ @@ -115,14 +115,14 @@ public interface LogMetricOrBuilder * * *
-   * Required. An [advanced logs filter](/logging/docs/view/advanced_filters)
-   * which is used to match log entries.
+   * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters) which is
+   * used to match log entries.
    * Example:
    *     "resource.type=gae_app AND severity>=ERROR"
    * The maximum length of the filter is 20000 characters.
    * 
* - * string filter = 3; + * string filter = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for filter. */ @@ -151,7 +151,9 @@ public interface LogMetricOrBuilder * their description. * * - * .google.api.MetricDescriptor metric_descriptor = 5; + * + * .google.api.MetricDescriptor metric_descriptor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the metricDescriptor field is set. */ @@ -179,7 +181,9 @@ public interface LogMetricOrBuilder * their description. * * - * .google.api.MetricDescriptor metric_descriptor = 5; + * + * .google.api.MetricDescriptor metric_descriptor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The metricDescriptor. */ @@ -207,7 +211,9 @@ public interface LogMetricOrBuilder * their description. * * - * .google.api.MetricDescriptor metric_descriptor = 5; + * + * .google.api.MetricDescriptor metric_descriptor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.api.MetricDescriptorOrBuilder getMetricDescriptorOrBuilder(); @@ -234,7 +240,7 @@ public interface LogMetricOrBuilder * Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` * * - * string value_extractor = 6; + * string value_extractor = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The valueExtractor. */ @@ -262,7 +268,7 @@ public interface LogMetricOrBuilder * Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` * * - * string value_extractor = 6; + * string value_extractor = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for valueExtractor. */ @@ -286,7 +292,8 @@ public interface LogMetricOrBuilder * number of active time series that are allowed in a project. * * - * map<string, string> label_extractors = 7; + * map<string, string> label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ int getLabelExtractorsCount(); /** @@ -307,7 +314,8 @@ public interface LogMetricOrBuilder * number of active time series that are allowed in a project. * * - * map<string, string> label_extractors = 7; + * map<string, string> label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ boolean containsLabelExtractors(java.lang.String key); /** Use {@link #getLabelExtractorsMap()} instead. */ @@ -331,7 +339,8 @@ public interface LogMetricOrBuilder * number of active time series that are allowed in a project. * * - * map<string, string> label_extractors = 7; + * map<string, string> label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ java.util.Map getLabelExtractorsMap(); /** @@ -352,7 +361,8 @@ public interface LogMetricOrBuilder * number of active time series that are allowed in a project. * * - * map<string, string> label_extractors = 7; + * map<string, string> label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ java.lang.String getLabelExtractorsOrDefault(java.lang.String key, java.lang.String defaultValue); /** @@ -373,7 +383,8 @@ public interface LogMetricOrBuilder * number of active time series that are allowed in a project. * * - * map<string, string> label_extractors = 7; + * map<string, string> label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ java.lang.String getLabelExtractorsOrThrow(java.lang.String key); @@ -386,7 +397,9 @@ public interface LogMetricOrBuilder * used to create a histogram of the extracted values. * * - * .google.api.Distribution.BucketOptions bucket_options = 8; + * + * .google.api.Distribution.BucketOptions bucket_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the bucketOptions field is set. */ @@ -400,7 +413,9 @@ public interface LogMetricOrBuilder * used to create a histogram of the extracted values. * * - * .google.api.Distribution.BucketOptions bucket_options = 8; + * + * .google.api.Distribution.BucketOptions bucket_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The bucketOptions. */ @@ -414,7 +429,9 @@ public interface LogMetricOrBuilder * used to create a histogram of the extracted values. * * - * .google.api.Distribution.BucketOptions bucket_options = 8; + * + * .google.api.Distribution.BucketOptions bucket_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.api.Distribution.BucketOptionsOrBuilder getBucketOptionsOrBuilder(); @@ -426,7 +443,8 @@ public interface LogMetricOrBuilder * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp create_time = 9; + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the createTime field is set. */ @@ -439,7 +457,8 @@ public interface LogMetricOrBuilder * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp create_time = 9; + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The createTime. */ @@ -452,7 +471,8 @@ public interface LogMetricOrBuilder * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp create_time = 9; + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); @@ -464,7 +484,8 @@ public interface LogMetricOrBuilder * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp update_time = 10; + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the updateTime field is set. */ @@ -477,7 +498,8 @@ public interface LogMetricOrBuilder * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp update_time = 10; + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The updateTime. */ @@ -490,7 +512,8 @@ public interface LogMetricOrBuilder * This field may not be present for older metrics. * * - * .google.protobuf.Timestamp update_time = 10; + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogName.java index 33b1abe74..7bb2d9cdc 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogName.java @@ -16,10 +16,418 @@ package com.google.logging.v2; +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; /** AUTO-GENERATED DOCUMENTATION AND CLASS */ @javax.annotation.Generated("by GAPIC protoc plugin") -public abstract class LogName implements ResourceName { +public class LogName implements ResourceName { + + @Deprecated protected LogName() {} + + private static final PathTemplate PROJECT_LOG_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/logs/{log}"); + private static final PathTemplate ORGANIZATION_LOG_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("organizations/{organization}/logs/{log}"); + private static final PathTemplate FOLDER_LOG_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("folders/{folder}/logs/{log}"); + private static final PathTemplate BILLING_ACCOUNT_LOG_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("billingAccounts/{billing_account}/logs/{log}"); + + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + + private String project; + private String log; + private String organization; + private String folder; + private String billingAccount; + + public String getProject() { + return project; + } + + public String getLog() { + return log; + } + + public String getOrganization() { + return organization; + } + + public String getFolder() { + return folder; + } + + public String getBillingAccount() { + return billingAccount; + } + + private LogName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + log = Preconditions.checkNotNull(builder.getLog()); + pathTemplate = PROJECT_LOG_PATH_TEMPLATE; + } + + private LogName(OrganizationLogBuilder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + log = Preconditions.checkNotNull(builder.getLog()); + pathTemplate = ORGANIZATION_LOG_PATH_TEMPLATE; + } + + private LogName(FolderLogBuilder builder) { + folder = Preconditions.checkNotNull(builder.getFolder()); + log = Preconditions.checkNotNull(builder.getLog()); + pathTemplate = FOLDER_LOG_PATH_TEMPLATE; + } + + private LogName(BillingAccountLogBuilder builder) { + billingAccount = Preconditions.checkNotNull(builder.getBillingAccount()); + log = Preconditions.checkNotNull(builder.getLog()); + pathTemplate = BILLING_ACCOUNT_LOG_PATH_TEMPLATE; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectLogBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static OrganizationLogBuilder newOrganizationLogBuilder() { + return new OrganizationLogBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static FolderLogBuilder newFolderLogBuilder() { + return new FolderLogBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static BillingAccountLogBuilder newBillingAccountLogBuilder() { + return new BillingAccountLogBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LogName of(String project, String log) { + return newProjectLogBuilder().setProject(project).setLog(log).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static LogName ofProjectLogName(String project, String log) { + return newProjectLogBuilder().setProject(project).setLog(log).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static LogName ofOrganizationLogName(String organization, String log) { + return newOrganizationLogBuilder().setOrganization(organization).setLog(log).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static LogName ofFolderLogName(String folder, String log) { + return newFolderLogBuilder().setFolder(folder).setLog(log).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static LogName ofBillingAccountLogName(String billingAccount, String log) { + return newBillingAccountLogBuilder().setBillingAccount(billingAccount).setLog(log).build(); + } + + public static String format(String project, String log) { + return newBuilder().setProject(project).setLog(log).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLogName(String project, String log) { + return newBuilder().setProject(project).setLog(log).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatOrganizationLogName(String organization, String log) { + return newOrganizationLogBuilder().setOrganization(organization).setLog(log).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatFolderLogName(String folder, String log) { + return newFolderLogBuilder().setFolder(folder).setLog(log).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatBillingAccountLogName(String billingAccount, String log) { + return newBillingAccountLogBuilder() + .setBillingAccount(billingAccount) + .setLog(log) + .build() + .toString(); + } + + public static LogName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT_LOG_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = PROJECT_LOG_PATH_TEMPLATE.match(formattedString); + return ofProjectLogName(matchMap.get("project"), matchMap.get("log")); + } else if (ORGANIZATION_LOG_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = ORGANIZATION_LOG_PATH_TEMPLATE.match(formattedString); + return ofOrganizationLogName(matchMap.get("organization"), matchMap.get("log")); + } else if (FOLDER_LOG_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = FOLDER_LOG_PATH_TEMPLATE.match(formattedString); + return ofFolderLogName(matchMap.get("folder"), matchMap.get("log")); + } else if (BILLING_ACCOUNT_LOG_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = BILLING_ACCOUNT_LOG_PATH_TEMPLATE.match(formattedString); + return ofBillingAccountLogName(matchMap.get("billing_account"), matchMap.get("log")); + } + throw new ValidationException("JobName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LogName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOG_PATH_TEMPLATE.matches(formattedString) + || ORGANIZATION_LOG_PATH_TEMPLATE.matches(formattedString) + || FOLDER_LOG_PATH_TEMPLATE.matches(formattedString) + || BILLING_ACCOUNT_LOG_PATH_TEMPLATE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (log != null) { + fieldMapBuilder.put("log", log); + } + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + if (folder != null) { + fieldMapBuilder.put("folder", folder); + } + if (billingAccount != null) { + fieldMapBuilder.put("billing_account", billingAccount); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + /** Builder for projects/{project}/logs/{log}. */ + public static class Builder { + + private String project; + private String log; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLog() { + return log; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLog(String log) { + this.log = log; + return this; + } + + private Builder(LogName logName) { + Preconditions.checkArgument( + logName.pathTemplate == PROJECT_LOG_PATH_TEMPLATE, + "toBuilder is only supported when LogName has the pattern of " + + "projects/{project}/logs/{log}."); + project = logName.project; + log = logName.log; + } + + public LogName build() { + return new LogName(this); + } + } + + /** Builder for organizations/{organization}/logs/{log}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class OrganizationLogBuilder { + + private String organization; + private String log; + + private OrganizationLogBuilder() {} + + public String getOrganization() { + return organization; + } + + public String getLog() { + return log; + } + + public OrganizationLogBuilder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public OrganizationLogBuilder setLog(String log) { + this.log = log; + return this; + } + + public LogName build() { + return new LogName(this); + } + } + + /** Builder for folders/{folder}/logs/{log}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class FolderLogBuilder { + + private String folder; + private String log; + + private FolderLogBuilder() {} + + public String getFolder() { + return folder; + } + + public String getLog() { + return log; + } + + public FolderLogBuilder setFolder(String folder) { + this.folder = folder; + return this; + } + + public FolderLogBuilder setLog(String log) { + this.log = log; + return this; + } + + public LogName build() { + return new LogName(this); + } + } + + /** Builder for billingAccounts/{billing_account}/logs/{log}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class BillingAccountLogBuilder { + + private String billingAccount; + private String log; + + private BillingAccountLogBuilder() {} + + public String getBillingAccount() { + return billingAccount; + } + + public String getLog() { + return log; + } + + public BillingAccountLogBuilder setBillingAccount(String billingAccount) { + this.billingAccount = billingAccount; + return this; + } + + public BillingAccountLogBuilder setLog(String log) { + this.log = log; + return this; + } + + public LogName build() { + return new LogName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + LogName that = (LogName) o; + return (Objects.equals(this.project, that.project)) + && (Objects.equals(this.log, that.log)) + && (Objects.equals(this.organization, that.organization)) + && (Objects.equals(this.folder, that.folder)) + && (Objects.equals(this.billingAccount, that.billingAccount)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(log); + h *= 1000003; + h ^= Objects.hashCode(organization); + h *= 1000003; + h ^= Objects.hashCode(folder); + h *= 1000003; + h ^= Objects.hashCode(billingAccount); + return h; + } } diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogNames.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogNames.java deleted file mode 100644 index c6ace3f40..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogNames.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.v2; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class LogNames { - private LogNames() {} - - public static LogName parse(String resourceNameString) { - if (ProjectLogName.isParsableFrom(resourceNameString)) { - return ProjectLogName.parse(resourceNameString); - } - if (OrganizationLogName.isParsableFrom(resourceNameString)) { - return OrganizationLogName.parse(resourceNameString); - } - if (FolderLogName.isParsableFrom(resourceNameString)) { - return FolderLogName.parse(resourceNameString); - } - if (BillingLogName.isParsableFrom(resourceNameString)) { - return BillingLogName.parse(resourceNameString); - } - return UntypedLogName.parse(resourceNameString); - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSink.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSink.java index e36f7b19a..faf7b338e 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSink.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSink.java @@ -117,36 +117,6 @@ private LogSink( case 72: { includeChildren_ = input.readBool(); - break; - } - case 82: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 90: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - break; } case 98: @@ -363,6 +333,10 @@ public VersionFormat findValueByNumber(int number) { }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } return getDescriptor().getValues().get(ordinal()); } @@ -445,17 +419,18 @@ public OptionsCase getOptionsCase() { * * *
-   * Required. The client-assigned sink identifier, unique within the
-   * project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are
-   * limited to 100 characters and can include only the following characters:
-   * upper and lower-case alphanumeric characters, underscores, hyphens, and
-   * periods. First character has to be alphanumeric.
+   * Required. The client-assigned sink identifier, unique within the project. Example:
+   * `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited to 100
+   * characters and can include only the following characters: upper and
+   * lower-case alphanumeric characters, underscores, hyphens, and periods.
+   * First character has to be alphanumeric.
    * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -471,17 +446,18 @@ public java.lang.String getName() { * * *
-   * Required. The client-assigned sink identifier, unique within the
-   * project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are
-   * limited to 100 characters and can include only the following characters:
-   * upper and lower-case alphanumeric characters, underscores, hyphens, and
-   * periods. First character has to be alphanumeric.
+   * Required. The client-assigned sink identifier, unique within the project. Example:
+   * `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited to 100
+   * characters and can include only the following characters: upper and
+   * lower-case alphanumeric characters, underscores, hyphens, and periods.
+   * First character has to be alphanumeric.
    * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -507,13 +483,16 @@ public com.google.protobuf.ByteString getNameBytes() { * The sink's `writer_identity`, set when the sink is created, must * have permission to write to the destination or else the log * entries are not exported. For more information, see - * [Exporting Logs with Sinks](/logging/docs/api/tasks/exporting-logs). + * [Exporting Logs with Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * * - * string destination = 3 [(.google.api.resource_reference) = { ... } + * + * string destination = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The destination. */ + @java.lang.Override public java.lang.String getDestination() { java.lang.Object ref = destination_; if (ref instanceof java.lang.String) { @@ -536,13 +515,16 @@ public java.lang.String getDestination() { * The sink's `writer_identity`, set when the sink is created, must * have permission to write to the destination or else the log * entries are not exported. For more information, see - * [Exporting Logs with Sinks](/logging/docs/api/tasks/exporting-logs). + * [Exporting Logs with Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * * - * string destination = 3 [(.google.api.resource_reference) = { ... } + * + * string destination = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for destination. */ + @java.lang.Override public com.google.protobuf.ByteString getDestinationBytes() { java.lang.Object ref = destination_; if (ref instanceof java.lang.String) { @@ -561,16 +543,17 @@ public com.google.protobuf.ByteString getDestinationBytes() { * * *
-   * Optional. An [advanced logs filter](/logging/docs/view/advanced-queries). The only
+   * Optional. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries). The only
    * exported log entries are those that are in the resource owning the sink and
    * that match the filter. For example:
    *     logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
    * 
* - * string filter = 5; + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The filter. */ + @java.lang.Override public java.lang.String getFilter() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { @@ -586,16 +569,17 @@ public java.lang.String getFilter() { * * *
-   * Optional. An [advanced logs filter](/logging/docs/view/advanced-queries). The only
+   * Optional. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries). The only
    * exported log entries are those that are in the resource owning the sink and
    * that match the filter. For example:
    *     logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
    * 
* - * string filter = 5; + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for filter. */ + @java.lang.Override public com.google.protobuf.ByteString getFilterBytes() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { @@ -618,10 +602,11 @@ public com.google.protobuf.ByteString getFilterBytes() { * The maximum length of the description is 8000 characters. * * - * string description = 18; + * string description = 18 [(.google.api.field_behavior) = OPTIONAL]; * * @return The description. */ + @java.lang.Override public java.lang.String getDescription() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { @@ -641,10 +626,11 @@ public java.lang.String getDescription() { * The maximum length of the description is 8000 characters. * * - * string description = 18; + * string description = 18 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for description. */ + @java.lang.Override public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { @@ -667,10 +653,11 @@ public com.google.protobuf.ByteString getDescriptionBytes() { * export any log entries. * * - * bool disabled = 19; + * bool disabled = 19 [(.google.api.field_behavior) = OPTIONAL]; * * @return The disabled. */ + @java.lang.Override public boolean getDisabled() { return disabled_; } @@ -690,6 +677,7 @@ public boolean getDisabled() { * * @return The enum numeric value on the wire for outputVersionFormat. */ + @java.lang.Override @java.lang.Deprecated public int getOutputVersionFormatValue() { return outputVersionFormat_; @@ -707,6 +695,7 @@ public int getOutputVersionFormatValue() { * * @return The outputVersionFormat. */ + @java.lang.Override @java.lang.Deprecated public com.google.logging.v2.LogSink.VersionFormat getOutputVersionFormat() { @SuppressWarnings("deprecation") @@ -721,17 +710,15 @@ public com.google.logging.v2.LogSink.VersionFormat getOutputVersionFormat() { * * *
-   * Output only. An IAM identity&mdash;a service account or group&mdash;under
-   * which Logging writes the exported log entries to the sink's destination.
-   * This field is set by
-   * [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink]
-   * and
-   * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink]
-   * based on the value of `unique_writer_identity` in those methods.
+   * Output only. An IAM identity–a service account or group&mdash;under which Logging
+   * writes the exported log entries to the sink's destination. This field is
+   * set by [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and
+   * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the
+   * value of `unique_writer_identity` in those methods.
    * Until you grant this identity write-access to the destination, log entry
    * exports from this sink will fail. For more information,
    * see [Granting Access for a
-   * Resource](/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
+   * Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
    * Consult the destination service's documentation to determine the
    * appropriate IAM roles to assign to the identity.
    * 
@@ -740,6 +727,7 @@ public com.google.logging.v2.LogSink.VersionFormat getOutputVersionFormat() { * * @return The writerIdentity. */ + @java.lang.Override public java.lang.String getWriterIdentity() { java.lang.Object ref = writerIdentity_; if (ref instanceof java.lang.String) { @@ -755,17 +743,15 @@ public java.lang.String getWriterIdentity() { * * *
-   * Output only. An IAM identity&mdash;a service account or group&mdash;under
-   * which Logging writes the exported log entries to the sink's destination.
-   * This field is set by
-   * [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink]
-   * and
-   * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink]
-   * based on the value of `unique_writer_identity` in those methods.
+   * Output only. An IAM identity–a service account or group&mdash;under which Logging
+   * writes the exported log entries to the sink's destination. This field is
+   * set by [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and
+   * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the
+   * value of `unique_writer_identity` in those methods.
    * Until you grant this identity write-access to the destination, log entry
    * exports from this sink will fail. For more information,
    * see [Granting Access for a
-   * Resource](/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
+   * Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
    * Consult the destination service's documentation to determine the
    * appropriate IAM roles to assign to the identity.
    * 
@@ -774,6 +760,7 @@ public java.lang.String getWriterIdentity() { * * @return The bytes for writerIdentity. */ + @java.lang.Override public com.google.protobuf.ByteString getWriterIdentityBytes() { java.lang.Object ref = writerIdentity_; if (ref instanceof java.lang.String) { @@ -806,10 +793,11 @@ public com.google.protobuf.ByteString getWriterIdentityBytes() { * resource.type=gce_instance * * - * bool include_children = 9; + * bool include_children = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The includeChildren. */ + @java.lang.Override public boolean getIncludeChildren() { return includeChildren_; } @@ -822,10 +810,13 @@ public boolean getIncludeChildren() { * Optional. Options that affect sinks exporting data to BigQuery. * * - * .google.logging.v2.BigQueryOptions bigquery_options = 12; + * + * .google.logging.v2.BigQueryOptions bigquery_options = 12 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the bigqueryOptions field is set. */ + @java.lang.Override public boolean hasBigqueryOptions() { return optionsCase_ == 12; } @@ -836,10 +827,13 @@ public boolean hasBigqueryOptions() { * Optional. Options that affect sinks exporting data to BigQuery. * * - * .google.logging.v2.BigQueryOptions bigquery_options = 12; + * + * .google.logging.v2.BigQueryOptions bigquery_options = 12 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The bigqueryOptions. */ + @java.lang.Override public com.google.logging.v2.BigQueryOptions getBigqueryOptions() { if (optionsCase_ == 12) { return (com.google.logging.v2.BigQueryOptions) options_; @@ -853,8 +847,11 @@ public com.google.logging.v2.BigQueryOptions getBigqueryOptions() { * Optional. Options that affect sinks exporting data to BigQuery. * * - * .google.logging.v2.BigQueryOptions bigquery_options = 12; + * + * .google.logging.v2.BigQueryOptions bigquery_options = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ + @java.lang.Override public com.google.logging.v2.BigQueryOptionsOrBuilder getBigqueryOptionsOrBuilder() { if (optionsCase_ == 12) { return (com.google.logging.v2.BigQueryOptions) options_; @@ -877,6 +874,7 @@ public com.google.logging.v2.BigQueryOptionsOrBuilder getBigqueryOptionsOrBuilde * * @return Whether the createTime field is set. */ + @java.lang.Override public boolean hasCreateTime() { return createTime_ != null; } @@ -893,6 +891,7 @@ public boolean hasCreateTime() { * * @return The createTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } @@ -907,6 +906,7 @@ public com.google.protobuf.Timestamp getCreateTime() { * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return getCreateTime(); } @@ -926,6 +926,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * @return Whether the updateTime field is set. */ + @java.lang.Override public boolean hasUpdateTime() { return updateTime_ != null; } @@ -942,6 +943,7 @@ public boolean hasUpdateTime() { * * @return The updateTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getUpdateTime() { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } @@ -956,102 +958,11 @@ public com.google.protobuf.Timestamp getUpdateTime() { * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return getUpdateTime(); } - public static final int START_TIME_FIELD_NUMBER = 10; - private com.google.protobuf.Timestamp startTime_; - /** - * - * - *
-   * Do not use. This field is ignored.
-   * 
- * - * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; - * - * @return Whether the startTime field is set. - */ - @java.lang.Deprecated - public boolean hasStartTime() { - return startTime_ != null; - } - /** - * - * - *
-   * Do not use. This field is ignored.
-   * 
- * - * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; - * - * @return The startTime. - */ - @java.lang.Deprecated - public com.google.protobuf.Timestamp getStartTime() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - /** - * - * - *
-   * Do not use. This field is ignored.
-   * 
- * - * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; - */ - @java.lang.Deprecated - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - return getStartTime(); - } - - public static final int END_TIME_FIELD_NUMBER = 11; - private com.google.protobuf.Timestamp endTime_; - /** - * - * - *
-   * Do not use. This field is ignored.
-   * 
- * - * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; - * - * @return Whether the endTime field is set. - */ - @java.lang.Deprecated - public boolean hasEndTime() { - return endTime_ != null; - } - /** - * - * - *
-   * Do not use. This field is ignored.
-   * 
- * - * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; - * - * @return The endTime. - */ - @java.lang.Deprecated - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - * - * - *
-   * Do not use. This field is ignored.
-   * 
- * - * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; - */ - @java.lang.Deprecated - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return getEndTime(); - } - private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1085,12 +996,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (includeChildren_ != false) { output.writeBool(9, includeChildren_); } - if (startTime_ != null) { - output.writeMessage(10, getStartTime()); - } - if (endTime_ != null) { - output.writeMessage(11, getEndTime()); - } if (optionsCase_ == 12) { output.writeMessage(12, (com.google.logging.v2.BigQueryOptions) options_); } @@ -1134,12 +1039,6 @@ public int getSerializedSize() { if (includeChildren_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, includeChildren_); } - if (startTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getStartTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getEndTime()); - } if (optionsCase_ == 12) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( @@ -1188,14 +1087,6 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateTime()) { if (!getUpdateTime().equals(other.getUpdateTime())) return false; } - if (hasStartTime() != other.hasStartTime()) return false; - if (hasStartTime()) { - if (!getStartTime().equals(other.getStartTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) return false; - } if (!getOptionsCase().equals(other.getOptionsCase())) return false; switch (optionsCase_) { case 12: @@ -1239,14 +1130,6 @@ public int hashCode() { hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getUpdateTime().hashCode(); } - if (hasStartTime()) { - hash = (37 * hash) + START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStartTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } switch (optionsCase_) { case 12: hash = (37 * hash) + BIGQUERY_OPTIONS_FIELD_NUMBER; @@ -1430,18 +1313,6 @@ public Builder clear() { updateTime_ = null; updateTimeBuilder_ = null; } - if (startTimeBuilder_ == null) { - startTime_ = null; - } else { - startTime_ = null; - startTimeBuilder_ = null; - } - if (endTimeBuilder_ == null) { - endTime_ = null; - } else { - endTime_ = null; - endTimeBuilder_ = null; - } optionsCase_ = 0; options_ = null; return this; @@ -1495,16 +1366,6 @@ public com.google.logging.v2.LogSink buildPartial() { } else { result.updateTime_ = updateTimeBuilder_.build(); } - if (startTimeBuilder_ == null) { - result.startTime_ = startTime_; - } else { - result.startTime_ = startTimeBuilder_.build(); - } - if (endTimeBuilder_ == null) { - result.endTime_ = endTime_; - } else { - result.endTime_ = endTimeBuilder_.build(); - } result.optionsCase_ = optionsCase_; onBuilt(); return result; @@ -1590,12 +1451,6 @@ public Builder mergeFrom(com.google.logging.v2.LogSink other) { if (other.hasUpdateTime()) { mergeUpdateTime(other.getUpdateTime()); } - if (other.hasStartTime()) { - mergeStartTime(other.getStartTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } switch (other.getOptionsCase()) { case BIGQUERY_OPTIONS: { @@ -1655,14 +1510,14 @@ public Builder clearOptions() { * * *
-     * Required. The client-assigned sink identifier, unique within the
-     * project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are
-     * limited to 100 characters and can include only the following characters:
-     * upper and lower-case alphanumeric characters, underscores, hyphens, and
-     * periods. First character has to be alphanumeric.
+     * Required. The client-assigned sink identifier, unique within the project. Example:
+     * `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited to 100
+     * characters and can include only the following characters: upper and
+     * lower-case alphanumeric characters, underscores, hyphens, and periods.
+     * First character has to be alphanumeric.
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The name. */ @@ -1681,14 +1536,14 @@ public java.lang.String getName() { * * *
-     * Required. The client-assigned sink identifier, unique within the
-     * project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are
-     * limited to 100 characters and can include only the following characters:
-     * upper and lower-case alphanumeric characters, underscores, hyphens, and
-     * periods. First character has to be alphanumeric.
+     * Required. The client-assigned sink identifier, unique within the project. Example:
+     * `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited to 100
+     * characters and can include only the following characters: upper and
+     * lower-case alphanumeric characters, underscores, hyphens, and periods.
+     * First character has to be alphanumeric.
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for name. */ @@ -1707,14 +1562,14 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. The client-assigned sink identifier, unique within the
-     * project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are
-     * limited to 100 characters and can include only the following characters:
-     * upper and lower-case alphanumeric characters, underscores, hyphens, and
-     * periods. First character has to be alphanumeric.
+     * Required. The client-assigned sink identifier, unique within the project. Example:
+     * `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited to 100
+     * characters and can include only the following characters: upper and
+     * lower-case alphanumeric characters, underscores, hyphens, and periods.
+     * First character has to be alphanumeric.
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The name to set. * @return This builder for chaining. @@ -1732,14 +1587,14 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. The client-assigned sink identifier, unique within the
-     * project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are
-     * limited to 100 characters and can include only the following characters:
-     * upper and lower-case alphanumeric characters, underscores, hyphens, and
-     * periods. First character has to be alphanumeric.
+     * Required. The client-assigned sink identifier, unique within the project. Example:
+     * `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited to 100
+     * characters and can include only the following characters: upper and
+     * lower-case alphanumeric characters, underscores, hyphens, and periods.
+     * First character has to be alphanumeric.
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ @@ -1753,14 +1608,14 @@ public Builder clearName() { * * *
-     * Required. The client-assigned sink identifier, unique within the
-     * project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are
-     * limited to 100 characters and can include only the following characters:
-     * upper and lower-case alphanumeric characters, underscores, hyphens, and
-     * periods. First character has to be alphanumeric.
+     * Required. The client-assigned sink identifier, unique within the project. Example:
+     * `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited to 100
+     * characters and can include only the following characters: upper and
+     * lower-case alphanumeric characters, underscores, hyphens, and periods.
+     * First character has to be alphanumeric.
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for name to set. * @return This builder for chaining. @@ -1788,10 +1643,12 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * The sink's `writer_identity`, set when the sink is created, must * have permission to write to the destination or else the log * entries are not exported. For more information, see - * [Exporting Logs with Sinks](/logging/docs/api/tasks/exporting-logs). + * [Exporting Logs with Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * * - * string destination = 3 [(.google.api.resource_reference) = { ... } + * + * string destination = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The destination. */ @@ -1817,10 +1674,12 @@ public java.lang.String getDestination() { * The sink's `writer_identity`, set when the sink is created, must * have permission to write to the destination or else the log * entries are not exported. For more information, see - * [Exporting Logs with Sinks](/logging/docs/api/tasks/exporting-logs). + * [Exporting Logs with Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * * - * string destination = 3 [(.google.api.resource_reference) = { ... } + * + * string destination = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for destination. */ @@ -1846,10 +1705,12 @@ public com.google.protobuf.ByteString getDestinationBytes() { * The sink's `writer_identity`, set when the sink is created, must * have permission to write to the destination or else the log * entries are not exported. For more information, see - * [Exporting Logs with Sinks](/logging/docs/api/tasks/exporting-logs). + * [Exporting Logs with Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * * - * string destination = 3 [(.google.api.resource_reference) = { ... } + * + * string destination = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The destination to set. * @return This builder for chaining. @@ -1874,10 +1735,12 @@ public Builder setDestination(java.lang.String value) { * The sink's `writer_identity`, set when the sink is created, must * have permission to write to the destination or else the log * entries are not exported. For more information, see - * [Exporting Logs with Sinks](/logging/docs/api/tasks/exporting-logs). + * [Exporting Logs with Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * * - * string destination = 3 [(.google.api.resource_reference) = { ... } + * + * string destination = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -1898,10 +1761,12 @@ public Builder clearDestination() { * The sink's `writer_identity`, set when the sink is created, must * have permission to write to the destination or else the log * entries are not exported. For more information, see - * [Exporting Logs with Sinks](/logging/docs/api/tasks/exporting-logs). + * [Exporting Logs with Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * * - * string destination = 3 [(.google.api.resource_reference) = { ... } + * + * string destination = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for destination to set. * @return This builder for chaining. @@ -1922,13 +1787,13 @@ public Builder setDestinationBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. An [advanced logs filter](/logging/docs/view/advanced-queries). The only
+     * Optional. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries). The only
      * exported log entries are those that are in the resource owning the sink and
      * that match the filter. For example:
      *     logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
      * 
* - * string filter = 5; + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The filter. */ @@ -1947,13 +1812,13 @@ public java.lang.String getFilter() { * * *
-     * Optional. An [advanced logs filter](/logging/docs/view/advanced-queries). The only
+     * Optional. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries). The only
      * exported log entries are those that are in the resource owning the sink and
      * that match the filter. For example:
      *     logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
      * 
* - * string filter = 5; + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for filter. */ @@ -1972,13 +1837,13 @@ public com.google.protobuf.ByteString getFilterBytes() { * * *
-     * Optional. An [advanced logs filter](/logging/docs/view/advanced-queries). The only
+     * Optional. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries). The only
      * exported log entries are those that are in the resource owning the sink and
      * that match the filter. For example:
      *     logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
      * 
* - * string filter = 5; + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The filter to set. * @return This builder for chaining. @@ -1996,13 +1861,13 @@ public Builder setFilter(java.lang.String value) { * * *
-     * Optional. An [advanced logs filter](/logging/docs/view/advanced-queries). The only
+     * Optional. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries). The only
      * exported log entries are those that are in the resource owning the sink and
      * that match the filter. For example:
      *     logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
      * 
* - * string filter = 5; + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -2016,13 +1881,13 @@ public Builder clearFilter() { * * *
-     * Optional. An [advanced logs filter](/logging/docs/view/advanced-queries). The only
+     * Optional. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries). The only
      * exported log entries are those that are in the resource owning the sink and
      * that match the filter. For example:
      *     logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
      * 
* - * string filter = 5; + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for filter to set. * @return This builder for chaining. @@ -2047,7 +1912,7 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { * The maximum length of the description is 8000 characters. * * - * string description = 18; + * string description = 18 [(.google.api.field_behavior) = OPTIONAL]; * * @return The description. */ @@ -2070,7 +1935,7 @@ public java.lang.String getDescription() { * The maximum length of the description is 8000 characters. * * - * string description = 18; + * string description = 18 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for description. */ @@ -2093,7 +1958,7 @@ public com.google.protobuf.ByteString getDescriptionBytes() { * The maximum length of the description is 8000 characters. * * - * string description = 18; + * string description = 18 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The description to set. * @return This builder for chaining. @@ -2115,7 +1980,7 @@ public Builder setDescription(java.lang.String value) { * The maximum length of the description is 8000 characters. * * - * string description = 18; + * string description = 18 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -2133,7 +1998,7 @@ public Builder clearDescription() { * The maximum length of the description is 8000 characters. * * - * string description = 18; + * string description = 18 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for description to set. * @return This builder for chaining. @@ -2158,10 +2023,11 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { * export any log entries. * * - * bool disabled = 19; + * bool disabled = 19 [(.google.api.field_behavior) = OPTIONAL]; * * @return The disabled. */ + @java.lang.Override public boolean getDisabled() { return disabled_; } @@ -2173,7 +2039,7 @@ public boolean getDisabled() { * export any log entries. * * - * bool disabled = 19; + * bool disabled = 19 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The disabled to set. * @return This builder for chaining. @@ -2192,7 +2058,7 @@ public Builder setDisabled(boolean value) { * export any log entries. * * - * bool disabled = 19; + * bool disabled = 19 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -2217,6 +2083,7 @@ public Builder clearDisabled() { * * @return The enum numeric value on the wire for outputVersionFormat. */ + @java.lang.Override @java.lang.Deprecated public int getOutputVersionFormatValue() { return outputVersionFormat_; @@ -2237,6 +2104,7 @@ public int getOutputVersionFormatValue() { */ @java.lang.Deprecated public Builder setOutputVersionFormatValue(int value) { + outputVersionFormat_ = value; onChanged(); return this; @@ -2254,6 +2122,7 @@ public Builder setOutputVersionFormatValue(int value) { * * @return The outputVersionFormat. */ + @java.lang.Override @java.lang.Deprecated public com.google.logging.v2.LogSink.VersionFormat getOutputVersionFormat() { @SuppressWarnings("deprecation") @@ -2311,17 +2180,15 @@ public Builder clearOutputVersionFormat() { * * *
-     * Output only. An IAM identity&mdash;a service account or group&mdash;under
-     * which Logging writes the exported log entries to the sink's destination.
-     * This field is set by
-     * [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink]
-     * and
-     * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink]
-     * based on the value of `unique_writer_identity` in those methods.
+     * Output only. An IAM identity–a service account or group&mdash;under which Logging
+     * writes the exported log entries to the sink's destination. This field is
+     * set by [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and
+     * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the
+     * value of `unique_writer_identity` in those methods.
      * Until you grant this identity write-access to the destination, log entry
      * exports from this sink will fail. For more information,
      * see [Granting Access for a
-     * Resource](/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
+     * Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
      * Consult the destination service's documentation to determine the
      * appropriate IAM roles to assign to the identity.
      * 
@@ -2345,17 +2212,15 @@ public java.lang.String getWriterIdentity() { * * *
-     * Output only. An IAM identity&mdash;a service account or group&mdash;under
-     * which Logging writes the exported log entries to the sink's destination.
-     * This field is set by
-     * [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink]
-     * and
-     * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink]
-     * based on the value of `unique_writer_identity` in those methods.
+     * Output only. An IAM identity–a service account or group&mdash;under which Logging
+     * writes the exported log entries to the sink's destination. This field is
+     * set by [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and
+     * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the
+     * value of `unique_writer_identity` in those methods.
      * Until you grant this identity write-access to the destination, log entry
      * exports from this sink will fail. For more information,
      * see [Granting Access for a
-     * Resource](/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
+     * Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
      * Consult the destination service's documentation to determine the
      * appropriate IAM roles to assign to the identity.
      * 
@@ -2379,17 +2244,15 @@ public com.google.protobuf.ByteString getWriterIdentityBytes() { * * *
-     * Output only. An IAM identity&mdash;a service account or group&mdash;under
-     * which Logging writes the exported log entries to the sink's destination.
-     * This field is set by
-     * [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink]
-     * and
-     * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink]
-     * based on the value of `unique_writer_identity` in those methods.
+     * Output only. An IAM identity–a service account or group&mdash;under which Logging
+     * writes the exported log entries to the sink's destination. This field is
+     * set by [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and
+     * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the
+     * value of `unique_writer_identity` in those methods.
      * Until you grant this identity write-access to the destination, log entry
      * exports from this sink will fail. For more information,
      * see [Granting Access for a
-     * Resource](/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
+     * Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
      * Consult the destination service's documentation to determine the
      * appropriate IAM roles to assign to the identity.
      * 
@@ -2412,17 +2275,15 @@ public Builder setWriterIdentity(java.lang.String value) { * * *
-     * Output only. An IAM identity&mdash;a service account or group&mdash;under
-     * which Logging writes the exported log entries to the sink's destination.
-     * This field is set by
-     * [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink]
-     * and
-     * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink]
-     * based on the value of `unique_writer_identity` in those methods.
+     * Output only. An IAM identity–a service account or group&mdash;under which Logging
+     * writes the exported log entries to the sink's destination. This field is
+     * set by [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and
+     * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the
+     * value of `unique_writer_identity` in those methods.
      * Until you grant this identity write-access to the destination, log entry
      * exports from this sink will fail. For more information,
      * see [Granting Access for a
-     * Resource](/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
+     * Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
      * Consult the destination service's documentation to determine the
      * appropriate IAM roles to assign to the identity.
      * 
@@ -2441,17 +2302,15 @@ public Builder clearWriterIdentity() { * * *
-     * Output only. An IAM identity&mdash;a service account or group&mdash;under
-     * which Logging writes the exported log entries to the sink's destination.
-     * This field is set by
-     * [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink]
-     * and
-     * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink]
-     * based on the value of `unique_writer_identity` in those methods.
+     * Output only. An IAM identity–a service account or group&mdash;under which Logging
+     * writes the exported log entries to the sink's destination. This field is
+     * set by [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and
+     * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the
+     * value of `unique_writer_identity` in those methods.
      * Until you grant this identity write-access to the destination, log entry
      * exports from this sink will fail. For more information,
      * see [Granting Access for a
-     * Resource](/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
+     * Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
      * Consult the destination service's documentation to determine the
      * appropriate IAM roles to assign to the identity.
      * 
@@ -2491,10 +2350,11 @@ public Builder setWriterIdentityBytes(com.google.protobuf.ByteString value) { * resource.type=gce_instance * * - * bool include_children = 9; + * bool include_children = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The includeChildren. */ + @java.lang.Override public boolean getIncludeChildren() { return includeChildren_; } @@ -2516,7 +2376,7 @@ public boolean getIncludeChildren() { * resource.type=gce_instance * * - * bool include_children = 9; + * bool include_children = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The includeChildren to set. * @return This builder for chaining. @@ -2545,7 +2405,7 @@ public Builder setIncludeChildren(boolean value) { * resource.type=gce_instance * * - * bool include_children = 9; + * bool include_children = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -2568,10 +2428,13 @@ public Builder clearIncludeChildren() { * Optional. Options that affect sinks exporting data to BigQuery. * * - * .google.logging.v2.BigQueryOptions bigquery_options = 12; + * + * .google.logging.v2.BigQueryOptions bigquery_options = 12 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the bigqueryOptions field is set. */ + @java.lang.Override public boolean hasBigqueryOptions() { return optionsCase_ == 12; } @@ -2582,10 +2445,13 @@ public boolean hasBigqueryOptions() { * Optional. Options that affect sinks exporting data to BigQuery. * * - * .google.logging.v2.BigQueryOptions bigquery_options = 12; + * + * .google.logging.v2.BigQueryOptions bigquery_options = 12 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The bigqueryOptions. */ + @java.lang.Override public com.google.logging.v2.BigQueryOptions getBigqueryOptions() { if (bigqueryOptionsBuilder_ == null) { if (optionsCase_ == 12) { @@ -2606,7 +2472,9 @@ public com.google.logging.v2.BigQueryOptions getBigqueryOptions() { * Optional. Options that affect sinks exporting data to BigQuery. * * - * .google.logging.v2.BigQueryOptions bigquery_options = 12; + * + * .google.logging.v2.BigQueryOptions bigquery_options = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setBigqueryOptions(com.google.logging.v2.BigQueryOptions value) { if (bigqueryOptionsBuilder_ == null) { @@ -2628,7 +2496,9 @@ public Builder setBigqueryOptions(com.google.logging.v2.BigQueryOptions value) { * Optional. Options that affect sinks exporting data to BigQuery. * * - * .google.logging.v2.BigQueryOptions bigquery_options = 12; + * + * .google.logging.v2.BigQueryOptions bigquery_options = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setBigqueryOptions( com.google.logging.v2.BigQueryOptions.Builder builderForValue) { @@ -2648,7 +2518,9 @@ public Builder setBigqueryOptions( * Optional. Options that affect sinks exporting data to BigQuery. * * - * .google.logging.v2.BigQueryOptions bigquery_options = 12; + * + * .google.logging.v2.BigQueryOptions bigquery_options = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeBigqueryOptions(com.google.logging.v2.BigQueryOptions value) { if (bigqueryOptionsBuilder_ == null) { @@ -2679,7 +2551,9 @@ public Builder mergeBigqueryOptions(com.google.logging.v2.BigQueryOptions value) * Optional. Options that affect sinks exporting data to BigQuery. * * - * .google.logging.v2.BigQueryOptions bigquery_options = 12; + * + * .google.logging.v2.BigQueryOptions bigquery_options = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearBigqueryOptions() { if (bigqueryOptionsBuilder_ == null) { @@ -2704,7 +2578,9 @@ public Builder clearBigqueryOptions() { * Optional. Options that affect sinks exporting data to BigQuery. * * - * .google.logging.v2.BigQueryOptions bigquery_options = 12; + * + * .google.logging.v2.BigQueryOptions bigquery_options = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.logging.v2.BigQueryOptions.Builder getBigqueryOptionsBuilder() { return getBigqueryOptionsFieldBuilder().getBuilder(); @@ -2716,8 +2592,11 @@ public com.google.logging.v2.BigQueryOptions.Builder getBigqueryOptionsBuilder() * Optional. Options that affect sinks exporting data to BigQuery. * * - * .google.logging.v2.BigQueryOptions bigquery_options = 12; + * + * .google.logging.v2.BigQueryOptions bigquery_options = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ + @java.lang.Override public com.google.logging.v2.BigQueryOptionsOrBuilder getBigqueryOptionsOrBuilder() { if ((optionsCase_ == 12) && (bigqueryOptionsBuilder_ != null)) { return bigqueryOptionsBuilder_.getMessageOrBuilder(); @@ -2735,7 +2614,9 @@ public com.google.logging.v2.BigQueryOptionsOrBuilder getBigqueryOptionsOrBuilde * Optional. Options that affect sinks exporting data to BigQuery. * * - * .google.logging.v2.BigQueryOptions bigquery_options = 12; + * + * .google.logging.v2.BigQueryOptions bigquery_options = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.logging.v2.BigQueryOptions, @@ -3182,380 +3063,6 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return updateTimeBuilder_; } - private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - startTimeBuilder_; - /** - * - * - *
-     * Do not use. This field is ignored.
-     * 
- * - * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; - * - * @return Whether the startTime field is set. - */ - @java.lang.Deprecated - public boolean hasStartTime() { - return startTimeBuilder_ != null || startTime_ != null; - } - /** - * - * - *
-     * Do not use. This field is ignored.
-     * 
- * - * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; - * - * @return The startTime. - */ - @java.lang.Deprecated - public com.google.protobuf.Timestamp getStartTime() { - if (startTimeBuilder_ == null) { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } else { - return startTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Do not use. This field is ignored.
-     * 
- * - * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; - */ - @java.lang.Deprecated - public Builder setStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTime_ = value; - onChanged(); - } else { - startTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Do not use. This field is ignored.
-     * 
- * - * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; - */ - @java.lang.Deprecated - public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (startTimeBuilder_ == null) { - startTime_ = builderForValue.build(); - onChanged(); - } else { - startTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Do not use. This field is ignored.
-     * 
- * - * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; - */ - @java.lang.Deprecated - public Builder mergeStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (startTime_ != null) { - startTime_ = - com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); - } else { - startTime_ = value; - } - onChanged(); - } else { - startTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Do not use. This field is ignored.
-     * 
- * - * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; - */ - @java.lang.Deprecated - public Builder clearStartTime() { - if (startTimeBuilder_ == null) { - startTime_ = null; - onChanged(); - } else { - startTime_ = null; - startTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Do not use. This field is ignored.
-     * 
- * - * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; - */ - @java.lang.Deprecated - public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - - onChanged(); - return getStartTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Do not use. This field is ignored.
-     * 
- * - * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; - */ - @java.lang.Deprecated - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - if (startTimeBuilder_ != null) { - return startTimeBuilder_.getMessageOrBuilder(); - } else { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - } - /** - * - * - *
-     * Do not use. This field is ignored.
-     * 
- * - * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { - if (startTimeBuilder_ == null) { - startTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getStartTime(), getParentForChildren(), isClean()); - startTime_ = null; - } - return startTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; - /** - * - * - *
-     * Do not use. This field is ignored.
-     * 
- * - * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; - * - * @return Whether the endTime field is set. - */ - @java.lang.Deprecated - public boolean hasEndTime() { - return endTimeBuilder_ != null || endTime_ != null; - } - /** - * - * - *
-     * Do not use. This field is ignored.
-     * 
- * - * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; - * - * @return The endTime. - */ - @java.lang.Deprecated - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Do not use. This field is ignored.
-     * 
- * - * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; - */ - @java.lang.Deprecated - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - onChanged(); - } else { - endTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Do not use. This field is ignored.
-     * 
- * - * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; - */ - @java.lang.Deprecated - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - onChanged(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Do not use. This field is ignored.
-     * 
- * - * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; - */ - @java.lang.Deprecated - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (endTime_ != null) { - endTime_ = - com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); - } else { - endTime_ = value; - } - onChanged(); - } else { - endTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Do not use. This field is ignored.
-     * 
- * - * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; - */ - @java.lang.Deprecated - public Builder clearEndTime() { - if (endTimeBuilder_ == null) { - endTime_ = null; - onChanged(); - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Do not use. This field is ignored.
-     * 
- * - * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; - */ - @java.lang.Deprecated - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Do not use. This field is ignored.
-     * 
- * - * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; - */ - @java.lang.Deprecated - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - * - * - *
-     * Do not use. This field is ignored.
-     * 
- * - * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEndTime(), getParentForChildren(), isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSinkName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSinkName.java new file mode 100644 index 000000000..e02374939 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSinkName.java @@ -0,0 +1,437 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.logging.v2; + +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class LogSinkName implements ResourceName { + + @Deprecated + protected LogSinkName() {} + + private static final PathTemplate PROJECT_SINK_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/sinks/{sink}"); + private static final PathTemplate ORGANIZATION_SINK_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("organizations/{organization}/sinks/{sink}"); + private static final PathTemplate FOLDER_SINK_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("folders/{folder}/sinks/{sink}"); + private static final PathTemplate BILLING_ACCOUNT_SINK_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("billingAccounts/{billing_account}/sinks/{sink}"); + + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + + private String project; + private String sink; + private String organization; + private String folder; + private String billingAccount; + + public String getProject() { + return project; + } + + public String getSink() { + return sink; + } + + public String getOrganization() { + return organization; + } + + public String getFolder() { + return folder; + } + + public String getBillingAccount() { + return billingAccount; + } + + private LogSinkName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + sink = Preconditions.checkNotNull(builder.getSink()); + pathTemplate = PROJECT_SINK_PATH_TEMPLATE; + } + + private LogSinkName(OrganizationSinkBuilder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + sink = Preconditions.checkNotNull(builder.getSink()); + pathTemplate = ORGANIZATION_SINK_PATH_TEMPLATE; + } + + private LogSinkName(FolderSinkBuilder builder) { + folder = Preconditions.checkNotNull(builder.getFolder()); + sink = Preconditions.checkNotNull(builder.getSink()); + pathTemplate = FOLDER_SINK_PATH_TEMPLATE; + } + + private LogSinkName(BillingAccountSinkBuilder builder) { + billingAccount = Preconditions.checkNotNull(builder.getBillingAccount()); + sink = Preconditions.checkNotNull(builder.getSink()); + pathTemplate = BILLING_ACCOUNT_SINK_PATH_TEMPLATE; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectSinkBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static OrganizationSinkBuilder newOrganizationSinkBuilder() { + return new OrganizationSinkBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static FolderSinkBuilder newFolderSinkBuilder() { + return new FolderSinkBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static BillingAccountSinkBuilder newBillingAccountSinkBuilder() { + return new BillingAccountSinkBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LogSinkName of(String project, String sink) { + return newProjectSinkBuilder().setProject(project).setSink(sink).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static LogSinkName ofProjectSinkName(String project, String sink) { + return newProjectSinkBuilder().setProject(project).setSink(sink).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static LogSinkName ofOrganizationSinkName(String organization, String sink) { + return newOrganizationSinkBuilder().setOrganization(organization).setSink(sink).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static LogSinkName ofFolderSinkName(String folder, String sink) { + return newFolderSinkBuilder().setFolder(folder).setSink(sink).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static LogSinkName ofBillingAccountSinkName(String billingAccount, String sink) { + return newBillingAccountSinkBuilder().setBillingAccount(billingAccount).setSink(sink).build(); + } + + public static String format(String project, String sink) { + return newBuilder().setProject(project).setSink(sink).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectSinkName(String project, String sink) { + return newBuilder().setProject(project).setSink(sink).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatOrganizationSinkName(String organization, String sink) { + return newOrganizationSinkBuilder() + .setOrganization(organization) + .setSink(sink) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatFolderSinkName(String folder, String sink) { + return newFolderSinkBuilder().setFolder(folder).setSink(sink).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatBillingAccountSinkName(String billingAccount, String sink) { + return newBillingAccountSinkBuilder() + .setBillingAccount(billingAccount) + .setSink(sink) + .build() + .toString(); + } + + public static LogSinkName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT_SINK_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = PROJECT_SINK_PATH_TEMPLATE.match(formattedString); + return ofProjectSinkName(matchMap.get("project"), matchMap.get("sink")); + } else if (ORGANIZATION_SINK_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = ORGANIZATION_SINK_PATH_TEMPLATE.match(formattedString); + return ofOrganizationSinkName(matchMap.get("organization"), matchMap.get("sink")); + } else if (FOLDER_SINK_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = FOLDER_SINK_PATH_TEMPLATE.match(formattedString); + return ofFolderSinkName(matchMap.get("folder"), matchMap.get("sink")); + } else if (BILLING_ACCOUNT_SINK_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = BILLING_ACCOUNT_SINK_PATH_TEMPLATE.match(formattedString); + return ofBillingAccountSinkName(matchMap.get("billing_account"), matchMap.get("sink")); + } + throw new ValidationException("JobName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LogSinkName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_SINK_PATH_TEMPLATE.matches(formattedString) + || ORGANIZATION_SINK_PATH_TEMPLATE.matches(formattedString) + || FOLDER_SINK_PATH_TEMPLATE.matches(formattedString) + || BILLING_ACCOUNT_SINK_PATH_TEMPLATE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (sink != null) { + fieldMapBuilder.put("sink", sink); + } + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + if (folder != null) { + fieldMapBuilder.put("folder", folder); + } + if (billingAccount != null) { + fieldMapBuilder.put("billing_account", billingAccount); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + /** Builder for projects/{project}/sinks/{sink}. */ + public static class Builder { + + private String project; + private String sink; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getSink() { + return sink; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setSink(String sink) { + this.sink = sink; + return this; + } + + private Builder(LogSinkName logSinkName) { + Preconditions.checkArgument( + logSinkName.pathTemplate == PROJECT_SINK_PATH_TEMPLATE, + "toBuilder is only supported when LogSinkName has the pattern of " + + "projects/{project}/sinks/{sink}."); + project = logSinkName.project; + sink = logSinkName.sink; + } + + public LogSinkName build() { + return new LogSinkName(this); + } + } + + /** Builder for organizations/{organization}/sinks/{sink}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class OrganizationSinkBuilder { + + private String organization; + private String sink; + + private OrganizationSinkBuilder() {} + + public String getOrganization() { + return organization; + } + + public String getSink() { + return sink; + } + + public OrganizationSinkBuilder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public OrganizationSinkBuilder setSink(String sink) { + this.sink = sink; + return this; + } + + public LogSinkName build() { + return new LogSinkName(this); + } + } + + /** Builder for folders/{folder}/sinks/{sink}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class FolderSinkBuilder { + + private String folder; + private String sink; + + private FolderSinkBuilder() {} + + public String getFolder() { + return folder; + } + + public String getSink() { + return sink; + } + + public FolderSinkBuilder setFolder(String folder) { + this.folder = folder; + return this; + } + + public FolderSinkBuilder setSink(String sink) { + this.sink = sink; + return this; + } + + public LogSinkName build() { + return new LogSinkName(this); + } + } + + /** Builder for billingAccounts/{billing_account}/sinks/{sink}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class BillingAccountSinkBuilder { + + private String billingAccount; + private String sink; + + private BillingAccountSinkBuilder() {} + + public String getBillingAccount() { + return billingAccount; + } + + public String getSink() { + return sink; + } + + public BillingAccountSinkBuilder setBillingAccount(String billingAccount) { + this.billingAccount = billingAccount; + return this; + } + + public BillingAccountSinkBuilder setSink(String sink) { + this.sink = sink; + return this; + } + + public LogSinkName build() { + return new LogSinkName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + LogSinkName that = (LogSinkName) o; + return (Objects.equals(this.project, that.project)) + && (Objects.equals(this.sink, that.sink)) + && (Objects.equals(this.organization, that.organization)) + && (Objects.equals(this.folder, that.folder)) + && (Objects.equals(this.billingAccount, that.billingAccount)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(sink); + h *= 1000003; + h ^= Objects.hashCode(organization); + h *= 1000003; + h ^= Objects.hashCode(folder); + h *= 1000003; + h ^= Objects.hashCode(billingAccount); + return h; + } +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSinkOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSinkOrBuilder.java index 775d3cba8..db8984417 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSinkOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSinkOrBuilder.java @@ -27,14 +27,14 @@ public interface LogSinkOrBuilder * * *
-   * Required. The client-assigned sink identifier, unique within the
-   * project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are
-   * limited to 100 characters and can include only the following characters:
-   * upper and lower-case alphanumeric characters, underscores, hyphens, and
-   * periods. First character has to be alphanumeric.
+   * Required. The client-assigned sink identifier, unique within the project. Example:
+   * `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited to 100
+   * characters and can include only the following characters: upper and
+   * lower-case alphanumeric characters, underscores, hyphens, and periods.
+   * First character has to be alphanumeric.
    * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The name. */ @@ -43,14 +43,14 @@ public interface LogSinkOrBuilder * * *
-   * Required. The client-assigned sink identifier, unique within the
-   * project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are
-   * limited to 100 characters and can include only the following characters:
-   * upper and lower-case alphanumeric characters, underscores, hyphens, and
-   * periods. First character has to be alphanumeric.
+   * Required. The client-assigned sink identifier, unique within the project. Example:
+   * `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited to 100
+   * characters and can include only the following characters: upper and
+   * lower-case alphanumeric characters, underscores, hyphens, and periods.
+   * First character has to be alphanumeric.
    * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for name. */ @@ -67,10 +67,12 @@ public interface LogSinkOrBuilder * The sink's `writer_identity`, set when the sink is created, must * have permission to write to the destination or else the log * entries are not exported. For more information, see - * [Exporting Logs with Sinks](/logging/docs/api/tasks/exporting-logs). + * [Exporting Logs with Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * * - * string destination = 3 [(.google.api.resource_reference) = { ... } + * + * string destination = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The destination. */ @@ -86,10 +88,12 @@ public interface LogSinkOrBuilder * The sink's `writer_identity`, set when the sink is created, must * have permission to write to the destination or else the log * entries are not exported. For more information, see - * [Exporting Logs with Sinks](/logging/docs/api/tasks/exporting-logs). + * [Exporting Logs with Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * * - * string destination = 3 [(.google.api.resource_reference) = { ... } + * + * string destination = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for destination. */ @@ -99,13 +103,13 @@ public interface LogSinkOrBuilder * * *
-   * Optional. An [advanced logs filter](/logging/docs/view/advanced-queries). The only
+   * Optional. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries). The only
    * exported log entries are those that are in the resource owning the sink and
    * that match the filter. For example:
    *     logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
    * 
* - * string filter = 5; + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The filter. */ @@ -114,13 +118,13 @@ public interface LogSinkOrBuilder * * *
-   * Optional. An [advanced logs filter](/logging/docs/view/advanced-queries). The only
+   * Optional. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries). The only
    * exported log entries are those that are in the resource owning the sink and
    * that match the filter. For example:
    *     logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
    * 
* - * string filter = 5; + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for filter. */ @@ -134,7 +138,7 @@ public interface LogSinkOrBuilder * The maximum length of the description is 8000 characters. * * - * string description = 18; + * string description = 18 [(.google.api.field_behavior) = OPTIONAL]; * * @return The description. */ @@ -147,7 +151,7 @@ public interface LogSinkOrBuilder * The maximum length of the description is 8000 characters. * * - * string description = 18; + * string description = 18 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for description. */ @@ -161,7 +165,7 @@ public interface LogSinkOrBuilder * export any log entries. * * - * bool disabled = 19; + * bool disabled = 19 [(.google.api.field_behavior) = OPTIONAL]; * * @return The disabled. */ @@ -202,17 +206,15 @@ public interface LogSinkOrBuilder * * *
-   * Output only. An IAM identity&mdash;a service account or group&mdash;under
-   * which Logging writes the exported log entries to the sink's destination.
-   * This field is set by
-   * [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink]
-   * and
-   * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink]
-   * based on the value of `unique_writer_identity` in those methods.
+   * Output only. An IAM identity–a service account or group&mdash;under which Logging
+   * writes the exported log entries to the sink's destination. This field is
+   * set by [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and
+   * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the
+   * value of `unique_writer_identity` in those methods.
    * Until you grant this identity write-access to the destination, log entry
    * exports from this sink will fail. For more information,
    * see [Granting Access for a
-   * Resource](/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
+   * Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
    * Consult the destination service's documentation to determine the
    * appropriate IAM roles to assign to the identity.
    * 
@@ -226,17 +228,15 @@ public interface LogSinkOrBuilder * * *
-   * Output only. An IAM identity&mdash;a service account or group&mdash;under
-   * which Logging writes the exported log entries to the sink's destination.
-   * This field is set by
-   * [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink]
-   * and
-   * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink]
-   * based on the value of `unique_writer_identity` in those methods.
+   * Output only. An IAM identity–a service account or group&mdash;under which Logging
+   * writes the exported log entries to the sink's destination. This field is
+   * set by [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and
+   * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the
+   * value of `unique_writer_identity` in those methods.
    * Until you grant this identity write-access to the destination, log entry
    * exports from this sink will fail. For more information,
    * see [Granting Access for a
-   * Resource](/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
+   * Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
    * Consult the destination service's documentation to determine the
    * appropriate IAM roles to assign to the identity.
    * 
@@ -265,7 +265,7 @@ public interface LogSinkOrBuilder * resource.type=gce_instance * * - * bool include_children = 9; + * bool include_children = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The includeChildren. */ @@ -278,7 +278,9 @@ public interface LogSinkOrBuilder * Optional. Options that affect sinks exporting data to BigQuery. * * - * .google.logging.v2.BigQueryOptions bigquery_options = 12; + * + * .google.logging.v2.BigQueryOptions bigquery_options = 12 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the bigqueryOptions field is set. */ @@ -290,7 +292,9 @@ public interface LogSinkOrBuilder * Optional. Options that affect sinks exporting data to BigQuery. * * - * .google.logging.v2.BigQueryOptions bigquery_options = 12; + * + * .google.logging.v2.BigQueryOptions bigquery_options = 12 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The bigqueryOptions. */ @@ -302,7 +306,9 @@ public interface LogSinkOrBuilder * Optional. Options that affect sinks exporting data to BigQuery. * * - * .google.logging.v2.BigQueryOptions bigquery_options = 12; + * + * .google.logging.v2.BigQueryOptions bigquery_options = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.logging.v2.BigQueryOptionsOrBuilder getBigqueryOptionsOrBuilder(); @@ -388,81 +394,5 @@ public interface LogSinkOrBuilder */ com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - /** - * - * - *
-   * Do not use. This field is ignored.
-   * 
- * - * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; - * - * @return Whether the startTime field is set. - */ - @java.lang.Deprecated - boolean hasStartTime(); - /** - * - * - *
-   * Do not use. This field is ignored.
-   * 
- * - * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; - * - * @return The startTime. - */ - @java.lang.Deprecated - com.google.protobuf.Timestamp getStartTime(); - /** - * - * - *
-   * Do not use. This field is ignored.
-   * 
- * - * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; - */ - @java.lang.Deprecated - com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); - - /** - * - * - *
-   * Do not use. This field is ignored.
-   * 
- * - * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; - * - * @return Whether the endTime field is set. - */ - @java.lang.Deprecated - boolean hasEndTime(); - /** - * - * - *
-   * Do not use. This field is ignored.
-   * 
- * - * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; - * - * @return The endTime. - */ - @java.lang.Deprecated - com.google.protobuf.Timestamp getEndTime(); - /** - * - * - *
-   * Do not use. This field is ignored.
-   * 
- * - * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; - */ - @java.lang.Deprecated - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - public com.google.logging.v2.LogSink.OptionsCase getOptionsCase(); } diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingConfigProto.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingConfigProto.java index c6770e573..72cf2c4d6 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingConfigProto.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingConfigProto.java @@ -27,6 +27,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_logging_v2_LogBucket_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_logging_v2_LogBucket_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_logging_v2_LogSink_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -35,6 +39,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_logging_v2_BigQueryOptions_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_logging_v2_BigQueryOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_logging_v2_ListBucketsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_logging_v2_ListBucketsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_logging_v2_ListBucketsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_logging_v2_ListBucketsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_logging_v2_UpdateBucketRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_logging_v2_UpdateBucketRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_logging_v2_GetBucketRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_logging_v2_GetBucketRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_logging_v2_ListSinksRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -115,186 +135,255 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "f/duration.proto\032\033google/protobuf/empty." + "proto\032 google/protobuf/field_mask.proto\032" + "\037google/protobuf/timestamp.proto\032\034google" - + "/api/annotations.proto\"\215\006\n\007LogSink\022\014\n\004na" - + "me\030\001 \001(\t\022\033\n\013destination\030\003 \001(\tB\006\372A\003\n\001*\022\016\n" - + "\006filter\030\005 \001(\t\022\023\n\013description\030\022 \001(\t\022\020\n\010di" - + "sabled\030\023 \001(\010\022K\n\025output_version_format\030\006 " - + "\001(\0162(.google.logging.v2.LogSink.VersionF" - + "ormatB\002\030\001\022\034\n\017writer_identity\030\010 \001(\tB\003\340A\003\022" - + "\030\n\020include_children\030\t \001(\010\022>\n\020bigquery_op" - + "tions\030\014 \001(\0132\".google.logging.v2.BigQuery" - + "OptionsH\000\0224\n\013create_time\030\r \001(\0132\032.google." - + "protobuf.TimestampB\003\340A\003\0224\n\013update_time\030\016" - + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0222\n" - + "\nstart_time\030\n \001(\0132\032.google.protobuf.Time" - + "stampB\002\030\001\0220\n\010end_time\030\013 \001(\0132\032.google.pro" - + "tobuf.TimestampB\002\030\001\"?\n\rVersionFormat\022\036\n\032" - + "VERSION_FORMAT_UNSPECIFIED\020\000\022\006\n\002V2\020\001\022\006\n\002" - + "V1\020\002:\274\001\352A\270\001\n\033logging.googleapis.com/Sink" - + "\022\037projects/{project}/sinks/{sink}\022)organ" - + "izations/{organization}/sinks/{sink}\022\035fo" - + "lders/{folder}/sinks/{sink}\022.billingAcco" - + "unts/{billing_account}/sinks/{sink}B\t\n\007o" - + "ptions\"b\n\017BigQueryOptions\022\036\n\026use_partiti" - + "oned_tables\030\001 \001(\010\022/\n\"uses_timestamp_colu" - + "mn_partitioning\030\003 \001(\010B\003\340A\003\"n\n\020ListSinksR" - + "equest\0223\n\006parent\030\001 \001(\tB#\340A\002\372A\035\022\033logging." - + "googleapis.com/Sink\022\022\n\npage_token\030\002 \001(\t\022" - + "\021\n\tpage_size\030\003 \001(\005\"W\n\021ListSinksResponse\022" - + ")\n\005sinks\030\001 \003(\0132\032.google.logging.v2.LogSi" - + "nk\022\027\n\017next_page_token\030\002 \001(\t\"H\n\016GetSinkRe" - + "quest\0226\n\tsink_name\030\001 \001(\tB#\340A\002\372A\035\n\033loggin" - + "g.googleapis.com/Sink\"\227\001\n\021CreateSinkRequ" - + "est\0223\n\006parent\030\001 \001(\tB#\340A\002\372A\035\022\033logging.goo" - + "gleapis.com/Sink\022-\n\004sink\030\002 \001(\0132\032.google." - + "logging.v2.LogSinkB\003\340A\002\022\036\n\026unique_writer" - + "_identity\030\003 \001(\010\"\313\001\n\021UpdateSinkRequest\0226\n" - + "\tsink_name\030\001 \001(\tB#\340A\002\372A\035\n\033logging.google" - + "apis.com/Sink\022-\n\004sink\030\002 \001(\0132\032.google.log" - + "ging.v2.LogSinkB\003\340A\002\022\036\n\026unique_writer_id" - + "entity\030\003 \001(\010\022/\n\013update_mask\030\004 \001(\0132\032.goog" - + "le.protobuf.FieldMask\"K\n\021DeleteSinkReque" - + "st\0226\n\tsink_name\030\001 \001(\tB#\340A\002\372A\035\n\033logging.g" - + "oogleapis.com/Sink\"\241\003\n\014LogExclusion\022\014\n\004n" - + "ame\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022\016\n\006filter" - + "\030\003 \001(\t\022\020\n\010disabled\030\004 \001(\010\022/\n\013create_time\030" - + "\005 \001(\0132\032.google.protobuf.Timestamp\022/\n\013upd" - + "ate_time\030\006 \001(\0132\032.google.protobuf.Timesta" - + "mp:\351\001\352A\345\001\n logging.googleapis.com/Exclus" - + "ion\022)projects/{project}/exclusions/{excl" - + "usion}\0223organizations/{organization}/exc" - + "lusions/{exclusion}\022\'folders/{folder}/ex" - + "clusions/{exclusion}\0228billingAccounts/{b" - + "illing_account}/exclusions/{exclusion}\"x" - + "\n\025ListExclusionsRequest\0228\n\006parent\030\001 \001(\tB" - + "(\340A\002\372A\"\022 logging.googleapis.com/Exclusio" - + "n\022\022\n\npage_token\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005" - + "\"f\n\026ListExclusionsResponse\0223\n\nexclusions" - + "\030\001 \003(\0132\037.google.logging.v2.LogExclusion\022" - + "\027\n\017next_page_token\030\002 \001(\t\"M\n\023GetExclusion" - + "Request\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n logging.g" - + "oogleapis.com/Exclusion\"\206\001\n\026CreateExclus" - + "ionRequest\0228\n\006parent\030\001 \001(\tB(\340A\002\372A\"\022 logg" - + "ing.googleapis.com/Exclusion\0222\n\texclusio" - + "n\030\002 \001(\0132\037.google.logging.v2.LogExclusion" - + "\"\277\001\n\026UpdateExclusionRequest\0226\n\004name\030\001 \001(" - + "\tB(\340A\002\372A\"\n logging.googleapis.com/Exclus" - + "ion\0227\n\texclusion\030\002 \001(\0132\037.google.logging." - + "v2.LogExclusionB\003\340A\002\0224\n\013update_mask\030\003 \001(" - + "\0132\032.google.protobuf.FieldMaskB\003\340A\002\"P\n\026De" - + "leteExclusionRequest\0226\n\004name\030\001 \001(\tB(\340A\002\372" - + "A\"\n logging.googleapis.com/Exclusion\"&\n\026" - + "GetCmekSettingsRequest\022\014\n\004name\030\001 \001(\t\"\222\001\n" - + "\031UpdateCmekSettingsRequest\022\014\n\004name\030\001 \001(\t" - + "\0226\n\rcmek_settings\030\002 \001(\0132\037.google.logging" - + ".v2.CmekSettings\022/\n\013update_mask\030\003 \001(\0132\032." - + "google.protobuf.FieldMask\"N\n\014CmekSetting" - + "s\022\014\n\004name\030\001 \001(\t\022\024\n\014kms_key_name\030\002 \001(\t\022\032\n" - + "\022service_account_id\030\003 \001(\t2\236\037\n\017ConfigServ" - + "iceV2\022\220\002\n\tListSinks\022#.google.logging.v2." - + "ListSinksRequest\032$.google.logging.v2.Lis" - + "tSinksResponse\"\267\001\202\323\344\223\002\247\001\022\026/v2/{parent=*/" - + "*}/sinksZ\037\022\035/v2/{parent=projects/*}/sink" - + "sZ$\022\"/v2/{parent=organizations/*}/sinksZ" - + "\036\022\034/v2/{parent=folders/*}/sinksZ&\022$/v2/{" - + "parent=billingAccounts/*}/sinks\332A\006parent" - + "\022\236\002\n\007GetSink\022!.google.logging.v2.GetSink" - + "Request\032\032.google.logging.v2.LogSink\"\323\001\202\323" - + "\344\223\002\300\001\022\033/v2/{sink_name=*/*/sinks/*}Z$\022\"/v" - + "2/{sink_name=projects/*/sinks/*}Z)\022\'/v2/" - + "{sink_name=organizations/*/sinks/*}Z#\022!/" - + "v2/{sink_name=folders/*/sinks/*}Z+\022)/v2/" - + "{sink_name=billingAccounts/*/sinks/*}\332A\t" - + "sink_name\022\253\002\n\nCreateSink\022$.google.loggin" - + "g.v2.CreateSinkRequest\032\032.google.logging." - + "v2.LogSink\"\332\001\202\323\344\223\002\305\001\"\026/v2/{parent=*/*}/s" - + "inks:\004sinkZ%\"\035/v2/{parent=projects/*}/si" - + "nks:\004sinkZ*\"\"/v2/{parent=organizations/*" - + "}/sinks:\004sinkZ$\"\034/v2/{parent=folders/*}/" - + "sinks:\004sinkZ,\"$/v2/{parent=billingAccoun" - + "ts/*}/sinks:\004sink\332A\013parent,sink\022\237\004\n\nUpda" - + "teSink\022$.google.logging.v2.UpdateSinkReq" - + "uest\032\032.google.logging.v2.LogSink\"\316\003\202\323\344\223\002" - + "\231\003\032\033/v2/{sink_name=*/*/sinks/*}:\004sinkZ*\032" - + "\"/v2/{sink_name=projects/*/sinks/*}:\004sin" - + "kZ/\032\'/v2/{sink_name=organizations/*/sink" - + "s/*}:\004sinkZ)\032!/v2/{sink_name=folders/*/s" - + "inks/*}:\004sinkZ1\032)/v2/{sink_name=billingA" - + "ccounts/*/sinks/*}:\004sinkZ*2\"/v2/{sink_na" - + "me=projects/*/sinks/*}:\004sinkZ/2\'/v2/{sin" - + "k_name=organizations/*/sinks/*}:\004sinkZ)2" - + "!/v2/{sink_name=folders/*/sinks/*}:\004sink" - + "Z12)/v2/{sink_name=billingAccounts/*/sin" - + "ks/*}:\004sink\332A\032sink_name,sink,update_mask" - + "\332A\016sink_name,sink\022\240\002\n\nDeleteSink\022$.googl" - + "e.logging.v2.DeleteSinkRequest\032\026.google." - + "protobuf.Empty\"\323\001\202\323\344\223\002\300\001*\033/v2/{sink_name" - + "=*/*/sinks/*}Z$*\"/v2/{sink_name=projects" - + "/*/sinks/*}Z)*\'/v2/{sink_name=organizati" - + "ons/*/sinks/*}Z#*!/v2/{sink_name=folders" - + "/*/sinks/*}Z+*)/v2/{sink_name=billingAcc" - + "ounts/*/sinks/*}\332A\tsink_name\022\270\002\n\016ListExc" - + "lusions\022(.google.logging.v2.ListExclusio" - + "nsRequest\032).google.logging.v2.ListExclus" - + "ionsResponse\"\320\001\202\323\344\223\002\300\001\022\033/v2/{parent=*/*}" - + "/exclusionsZ$\022\"/v2/{parent=projects/*}/e" - + "xclusionsZ)\022\'/v2/{parent=organizations/*" - + "}/exclusionsZ#\022!/v2/{parent=folders/*}/e" - + "xclusionsZ+\022)/v2/{parent=billingAccounts" - + "/*}/exclusions\332A\006parent\022\250\002\n\014GetExclusion" - + "\022&.google.logging.v2.GetExclusionRequest" - + "\032\037.google.logging.v2.LogExclusion\"\316\001\202\323\344\223" - + "\002\300\001\022\033/v2/{name=*/*/exclusions/*}Z$\022\"/v2/" - + "{name=projects/*/exclusions/*}Z)\022\'/v2/{n" - + "ame=organizations/*/exclusions/*}Z#\022!/v2" - + "/{name=folders/*/exclusions/*}Z+\022)/v2/{n" - + "ame=billingAccounts/*/exclusions/*}\332A\004na" - + "me\022\361\002\n\017CreateExclusion\022).google.logging." - + "v2.CreateExclusionRequest\032\037.google.loggi" - + "ng.v2.LogExclusion\"\221\002\202\323\344\223\002\367\001\"\033/v2/{paren" - + "t=*/*}/exclusions:\texclusionZ/\"\"/v2/{par" - + "ent=projects/*}/exclusions:\texclusionZ4\"" - + "\'/v2/{parent=organizations/*}/exclusions" - + ":\texclusionZ.\"!/v2/{parent=folders/*}/ex" - + "clusions:\texclusionZ6\")/v2/{parent=billi" - + "ngAccounts/*}/exclusions:\texclusion\332A\020pa" - + "rent,exclusion\022\373\002\n\017UpdateExclusion\022).goo" - + "gle.logging.v2.UpdateExclusionRequest\032\037." - + "google.logging.v2.LogExclusion\"\233\002\202\323\344\223\002\367\001" - + "2\033/v2/{name=*/*/exclusions/*}:\texclusion" - + "Z/2\"/v2/{name=projects/*/exclusions/*}:\t" - + "exclusionZ42\'/v2/{name=organizations/*/e" - + "xclusions/*}:\texclusionZ.2!/v2/{name=fol" - + "ders/*/exclusions/*}:\texclusionZ62)/v2/{" - + "name=billingAccounts/*/exclusions/*}:\tex" - + "clusion\332A\032name,exclusion,update_mask\022\245\002\n" - + "\017DeleteExclusion\022).google.logging.v2.Del" - + "eteExclusionRequest\032\026.google.protobuf.Em" - + "pty\"\316\001\202\323\344\223\002\300\001*\033/v2/{name=*/*/exclusions/" - + "*}Z$*\"/v2/{name=projects/*/exclusions/*}" - + "Z)*\'/v2/{name=organizations/*/exclusions" - + "/*}Z#*!/v2/{name=folders/*/exclusions/*}" - + "Z+*)/v2/{name=billingAccounts/*/exclusio" - + "ns/*}\332A\004name\022\255\001\n\017GetCmekSettings\022).googl" - + "e.logging.v2.GetCmekSettingsRequest\032\037.go" - + "ogle.logging.v2.CmekSettings\"N\202\323\344\223\002H\022\033/v" - + "2/{name=*/*}/cmekSettingsZ)\022\'/v2/{name=o" - + "rganizations/*}/cmekSettings\022\321\001\n\022UpdateC" - + "mekSettings\022,.google.logging.v2.UpdateCm" - + "ekSettingsRequest\032\037.google.logging.v2.Cm" - + "ekSettings\"l\202\323\344\223\002f2\033/v2/{name=*/*}/cmekS" - + "ettings:\rcmek_settingsZ82\'/v2/{name=orga" - + "nizations/*}/cmekSettings:\rcmek_settings" - + "\032\337\001\312A\026logging.googleapis.com\322A\302\001https://" - + "www.googleapis.com/auth/cloud-platform,h" - + "ttps://www.googleapis.com/auth/cloud-pla" - + "tform.read-only,https://www.googleapis.c" - + "om/auth/logging.admin,https://www.google" - + "apis.com/auth/logging.readB\236\001\n\025com.googl" - + "e.logging.v2B\022LoggingConfigProtoP\001Z8goog" - + "le.golang.org/genproto/googleapis/loggin" - + "g/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V" - + "2\312\002\027Google\\Cloud\\Logging\\V2b\006proto3" + + "/api/annotations.proto\"\233\004\n\tLogBucket\022\014\n\004" + + "name\030\001 \001(\t\022\023\n\013description\030\003 \001(\t\0224\n\013creat" + + "e_time\030\004 \001(\0132\032.google.protobuf.Timestamp" + + "B\003\340A\003\0224\n\013update_time\030\005 \001(\0132\032.google.prot" + + "obuf.TimestampB\003\340A\003\022\026\n\016retention_days\030\013 " + + "\001(\005\022?\n\017lifecycle_state\030\014 \001(\0162!.google.lo" + + "gging.v2.LifecycleStateB\003\340A\003:\245\002\352A\241\002\n log" + + "ging.googleapis.com/LogBucket\0228projects/" + + "{project}/locations/{location}/buckets/{" + + "bucket}\022Borganizations/{organization}/lo" + + "cations/{location}/buckets/{bucket}\0226fol" + + "ders/{folder}/locations/{location}/bucke" + + "ts/{bucket}\022GbillingAccounts/{billing_ac" + + "count}/locations/{location}/buckets/{buc" + + "ket}\"\313\005\n\007LogSink\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\036\n\013d" + + "estination\030\003 \001(\tB\t\340A\002\372A\003\n\001*\022\023\n\006filter\030\005 " + + "\001(\tB\003\340A\001\022\030\n\013description\030\022 \001(\tB\003\340A\001\022\025\n\010di" + + "sabled\030\023 \001(\010B\003\340A\001\022K\n\025output_version_form" + + "at\030\006 \001(\0162(.google.logging.v2.LogSink.Ver" + + "sionFormatB\002\030\001\022\034\n\017writer_identity\030\010 \001(\tB" + + "\003\340A\003\022\035\n\020include_children\030\t \001(\010B\003\340A\001\022C\n\020b" + + "igquery_options\030\014 \001(\0132\".google.logging.v" + + "2.BigQueryOptionsB\003\340A\001H\000\0224\n\013create_time\030" + + "\r \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224" + + "\n\013update_time\030\016 \001(\0132\032.google.protobuf.Ti" + + "mestampB\003\340A\003\"?\n\rVersionFormat\022\036\n\032VERSION" + + "_FORMAT_UNSPECIFIED\020\000\022\006\n\002V2\020\001\022\006\n\002V1\020\002:\277\001" + + "\352A\273\001\n\036logging.googleapis.com/LogSink\022\037pr" + + "ojects/{project}/sinks/{sink}\022)organizat" + + "ions/{organization}/sinks/{sink}\022\035folder" + + "s/{folder}/sinks/{sink}\022.billingAccounts" + + "/{billing_account}/sinks/{sink}B\t\n\007optio" + + "ns\"g\n\017BigQueryOptions\022#\n\026use_partitioned" + + "_tables\030\001 \001(\010B\003\340A\001\022/\n\"uses_timestamp_col" + + "umn_partitioning\030\003 \001(\010B\003\340A\003\"\177\n\022ListBucke" + + "tsRequest\0228\n\006parent\030\001 \001(\tB(\340A\002\372A\"\022 loggi" + + "ng.googleapis.com/LogBucket\022\027\n\npage_toke" + + "n\030\002 \001(\tB\003\340A\001\022\026\n\tpage_size\030\003 \001(\005B\003\340A\001\"]\n\023" + + "ListBucketsResponse\022-\n\007buckets\030\001 \003(\0132\034.g" + + "oogle.logging.v2.LogBucket\022\027\n\017next_page_" + + "token\030\002 \001(\t\"\266\001\n\023UpdateBucketRequest\0226\n\004n" + + "ame\030\001 \001(\tB(\340A\002\372A\"\n logging.googleapis.co" + + "m/LogBucket\0221\n\006bucket\030\002 \001(\0132\034.google.log" + + "ging.v2.LogBucketB\003\340A\002\0224\n\013update_mask\030\004 " + + "\001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"J\n\020" + + "GetBucketRequest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n " + + "logging.googleapis.com/LogBucket\"{\n\020List" + + "SinksRequest\0226\n\006parent\030\001 \001(\tB&\340A\002\372A \022\036lo" + + "gging.googleapis.com/LogSink\022\027\n\npage_tok" + + "en\030\002 \001(\tB\003\340A\001\022\026\n\tpage_size\030\003 \001(\005B\003\340A\001\"W\n" + + "\021ListSinksResponse\022)\n\005sinks\030\001 \003(\0132\032.goog" + + "le.logging.v2.LogSink\022\027\n\017next_page_token" + + "\030\002 \001(\t\"K\n\016GetSinkRequest\0229\n\tsink_name\030\001 " + + "\001(\tB&\340A\002\372A \n\036logging.googleapis.com/LogS" + + "ink\"\237\001\n\021CreateSinkRequest\0226\n\006parent\030\001 \001(" + + "\tB&\340A\002\372A \022\036logging.googleapis.com/LogSin" + + "k\022-\n\004sink\030\002 \001(\0132\032.google.logging.v2.LogS" + + "inkB\003\340A\002\022#\n\026unique_writer_identity\030\003 \001(\010" + + "B\003\340A\001\"\330\001\n\021UpdateSinkRequest\0229\n\tsink_name" + + "\030\001 \001(\tB&\340A\002\372A \n\036logging.googleapis.com/L" + + "ogSink\022-\n\004sink\030\002 \001(\0132\032.google.logging.v2" + + ".LogSinkB\003\340A\002\022#\n\026unique_writer_identity\030" + + "\003 \001(\010B\003\340A\001\0224\n\013update_mask\030\004 \001(\0132\032.google" + + ".protobuf.FieldMaskB\003\340A\001\"N\n\021DeleteSinkRe" + + "quest\0229\n\tsink_name\030\001 \001(\tB&\340A\002\372A \n\036loggin" + + "g.googleapis.com/LogSink\"\302\003\n\014LogExclusio" + + "n\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\030\n\013description\030\002 \001(" + + "\tB\003\340A\001\022\023\n\006filter\030\003 \001(\tB\003\340A\002\022\025\n\010disabled\030" + + "\004 \001(\010B\003\340A\001\0224\n\013create_time\030\005 \001(\0132\032.google" + + ".protobuf.TimestampB\003\340A\003\0224\n\013update_time\030" + + "\006 \001(\0132\032.google.protobuf.TimestampB\003\340A\003:\354" + + "\001\352A\350\001\n#logging.googleapis.com/LogExclusi" + + "on\022)projects/{project}/exclusions/{exclu" + + "sion}\0223organizations/{organization}/excl" + + "usions/{exclusion}\022\'folders/{folder}/exc" + + "lusions/{exclusion}\0228billingAccounts/{bi" + + "lling_account}/exclusions/{exclusion}\"\205\001" + + "\n\025ListExclusionsRequest\022;\n\006parent\030\001 \001(\tB" + + "+\340A\002\372A%\022#logging.googleapis.com/LogExclu" + + "sion\022\027\n\npage_token\030\002 \001(\tB\003\340A\001\022\026\n\tpage_si" + + "ze\030\003 \001(\005B\003\340A\001\"f\n\026ListExclusionsResponse\022" + + "3\n\nexclusions\030\001 \003(\0132\037.google.logging.v2." + + "LogExclusion\022\027\n\017next_page_token\030\002 \001(\t\"P\n" + + "\023GetExclusionRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372" + + "A%\n#logging.googleapis.com/LogExclusion\"" + + "\216\001\n\026CreateExclusionRequest\022;\n\006parent\030\001 \001" + + "(\tB+\340A\002\372A%\022#logging.googleapis.com/LogEx" + + "clusion\0227\n\texclusion\030\002 \001(\0132\037.google.logg" + + "ing.v2.LogExclusionB\003\340A\002\"\302\001\n\026UpdateExclu" + + "sionRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#loggi" + + "ng.googleapis.com/LogExclusion\0227\n\texclus" + + "ion\030\002 \001(\0132\037.google.logging.v2.LogExclusi" + + "onB\003\340A\002\0224\n\013update_mask\030\003 \001(\0132\032.google.pr" + + "otobuf.FieldMaskB\003\340A\002\"S\n\026DeleteExclusion" + + "Request\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#logging.g" + + "oogleapis.com/LogExclusion\"S\n\026GetCmekSet" + + "tingsRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#logg" + + "ing.googleapis.com/CmekSettings\"\241\001\n\031Upda" + + "teCmekSettingsRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002" + + "\022;\n\rcmek_settings\030\002 \001(\0132\037.google.logging" + + ".v2.CmekSettingsB\003\340A\002\0224\n\013update_mask\030\003 \001" + + "(\0132\032.google.protobuf.FieldMaskB\003\340A\001\"\237\002\n\014" + + "CmekSettings\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\024\n\014kms_k" + + "ey_name\030\002 \001(\t\022\037\n\022service_account_id\030\003 \001(" + + "\tB\003\340A\003:\304\001\352A\300\001\n#logging.googleapis.com/Cm" + + "ekSettings\022\037projects/{project}/cmekSetti" + + "ngs\022)organizations/{organization}/cmekSe" + + "ttings\022\035folders/{folder}/cmekSettings\022.b" + + "illingAccounts/{billing_account}/cmekSet" + + "tings*S\n\016LifecycleState\022\037\n\033LIFECYCLE_STA" + + "TE_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\024\n\020DELETE_R" + + "EQUESTED\020\0022\257\'\n\017ConfigServiceV2\022\334\002\n\013ListB" + + "uckets\022%.google.logging.v2.ListBucketsRe" + + "quest\032&.google.logging.v2.ListBucketsRes" + + "ponse\"\375\001\202\323\344\223\002\355\001\022$/v2/{parent=*/*/locatio" + + "ns/*}/bucketsZ-\022+/v2/{parent=projects/*/" + + "locations/*}/bucketsZ2\0220/v2/{parent=orga" + + "nizations/*/locations/*}/bucketsZ,\022*/v2/" + + "{parent=folders/*/locations/*}/bucketsZ4" + + "\0222/v2/{parent=billingAccounts/*/location" + + "s/*}/buckets\332A\006parent\022\271\002\n\tGetBucket\022#.go" + + "ogle.logging.v2.GetBucketRequest\032\034.googl" + + "e.logging.v2.LogBucket\"\350\001\202\323\344\223\002\341\001\022$/v2/{n" + + "ame=*/*/locations/*/buckets/*}Z-\022+/v2/{n" + + "ame=projects/*/locations/*/buckets/*}Z2\022" + + "0/v2/{name=organizations/*/locations/*/b" + + "uckets/*}Z,\022*/v2/{name=folders/*/locatio" + + "ns/*/buckets/*}Z(\022&/v2/{name=billingAcco" + + "unts/*/buckets/*}\022\363\002\n\014UpdateBucket\022&.goo" + + "gle.logging.v2.UpdateBucketRequest\032\034.goo" + + "gle.logging.v2.LogBucket\"\234\002\202\323\344\223\002\225\0022$/v2/" + + "{name=*/*/locations/*/buckets/*}:\006bucket" + + "Z52+/v2/{name=projects/*/locations/*/buc" + + "kets/*}:\006bucketZ:20/v2/{name=organizatio" + + "ns/*/locations/*/buckets/*}:\006bucketZ42*/" + + "v2/{name=folders/*/locations/*/buckets/*" + + "}:\006bucketZ<22/v2/{name=billingAccounts/*" + + "/locations/*/buckets/*}:\006bucket\022\220\002\n\tList" + + "Sinks\022#.google.logging.v2.ListSinksReque" + + "st\032$.google.logging.v2.ListSinksResponse" + + "\"\267\001\202\323\344\223\002\247\001\022\026/v2/{parent=*/*}/sinksZ\037\022\035/v" + + "2/{parent=projects/*}/sinksZ$\022\"/v2/{pare" + + "nt=organizations/*}/sinksZ\036\022\034/v2/{parent" + + "=folders/*}/sinksZ&\022$/v2/{parent=billing" + + "Accounts/*}/sinks\332A\006parent\022\236\002\n\007GetSink\022!" + + ".google.logging.v2.GetSinkRequest\032\032.goog" + + "le.logging.v2.LogSink\"\323\001\202\323\344\223\002\300\001\022\033/v2/{si" + + "nk_name=*/*/sinks/*}Z$\022\"/v2/{sink_name=p" + + "rojects/*/sinks/*}Z)\022\'/v2/{sink_name=org" + + "anizations/*/sinks/*}Z#\022!/v2/{sink_name=" + + "folders/*/sinks/*}Z+\022)/v2/{sink_name=bil" + + "lingAccounts/*/sinks/*}\332A\tsink_name\022\253\002\n\n" + + "CreateSink\022$.google.logging.v2.CreateSin" + + "kRequest\032\032.google.logging.v2.LogSink\"\332\001\202" + + "\323\344\223\002\305\001\"\026/v2/{parent=*/*}/sinks:\004sinkZ%\"\035" + + "/v2/{parent=projects/*}/sinks:\004sinkZ*\"\"/" + + "v2/{parent=organizations/*}/sinks:\004sinkZ" + + "$\"\034/v2/{parent=folders/*}/sinks:\004sinkZ,\"" + + "$/v2/{parent=billingAccounts/*}/sinks:\004s" + + "ink\332A\013parent,sink\022\237\004\n\nUpdateSink\022$.googl" + + "e.logging.v2.UpdateSinkRequest\032\032.google." + + "logging.v2.LogSink\"\316\003\202\323\344\223\002\231\003\032\033/v2/{sink_" + + "name=*/*/sinks/*}:\004sinkZ*\032\"/v2/{sink_nam" + + "e=projects/*/sinks/*}:\004sinkZ/\032\'/v2/{sink" + + "_name=organizations/*/sinks/*}:\004sinkZ)\032!" + + "/v2/{sink_name=folders/*/sinks/*}:\004sinkZ" + + "1\032)/v2/{sink_name=billingAccounts/*/sink" + + "s/*}:\004sinkZ*2\"/v2/{sink_name=projects/*/" + + "sinks/*}:\004sinkZ/2\'/v2/{sink_name=organiz" + + "ations/*/sinks/*}:\004sinkZ)2!/v2/{sink_nam" + + "e=folders/*/sinks/*}:\004sinkZ12)/v2/{sink_" + + "name=billingAccounts/*/sinks/*}:\004sink\332A\032" + + "sink_name,sink,update_mask\332A\016sink_name,s" + + "ink\022\240\002\n\nDeleteSink\022$.google.logging.v2.D" + + "eleteSinkRequest\032\026.google.protobuf.Empty" + + "\"\323\001\202\323\344\223\002\300\001*\033/v2/{sink_name=*/*/sinks/*}Z" + + "$*\"/v2/{sink_name=projects/*/sinks/*}Z)*" + + "\'/v2/{sink_name=organizations/*/sinks/*}" + + "Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*" + + ")/v2/{sink_name=billingAccounts/*/sinks/" + + "*}\332A\tsink_name\022\270\002\n\016ListExclusions\022(.goog" + + "le.logging.v2.ListExclusionsRequest\032).go" + + "ogle.logging.v2.ListExclusionsResponse\"\320" + + "\001\202\323\344\223\002\300\001\022\033/v2/{parent=*/*}/exclusionsZ$\022" + + "\"/v2/{parent=projects/*}/exclusionsZ)\022\'/" + + "v2/{parent=organizations/*}/exclusionsZ#" + + "\022!/v2/{parent=folders/*}/exclusionsZ+\022)/" + + "v2/{parent=billingAccounts/*}/exclusions" + + "\332A\006parent\022\250\002\n\014GetExclusion\022&.google.logg" + + "ing.v2.GetExclusionRequest\032\037.google.logg" + + "ing.v2.LogExclusion\"\316\001\202\323\344\223\002\300\001\022\033/v2/{name" + + "=*/*/exclusions/*}Z$\022\"/v2/{name=projects" + + "/*/exclusions/*}Z)\022\'/v2/{name=organizati" + + "ons/*/exclusions/*}Z#\022!/v2/{name=folders" + + "/*/exclusions/*}Z+\022)/v2/{name=billingAcc" + + "ounts/*/exclusions/*}\332A\004name\022\361\002\n\017CreateE" + + "xclusion\022).google.logging.v2.CreateExclu" + + "sionRequest\032\037.google.logging.v2.LogExclu" + + "sion\"\221\002\202\323\344\223\002\367\001\"\033/v2/{parent=*/*}/exclusi" + + "ons:\texclusionZ/\"\"/v2/{parent=projects/*" + + "}/exclusions:\texclusionZ4\"\'/v2/{parent=o" + + "rganizations/*}/exclusions:\texclusionZ.\"" + + "!/v2/{parent=folders/*}/exclusions:\texcl" + + "usionZ6\")/v2/{parent=billingAccounts/*}/" + + "exclusions:\texclusion\332A\020parent,exclusion" + + "\022\373\002\n\017UpdateExclusion\022).google.logging.v2" + + ".UpdateExclusionRequest\032\037.google.logging" + + ".v2.LogExclusion\"\233\002\202\323\344\223\002\367\0012\033/v2/{name=*/" + + "*/exclusions/*}:\texclusionZ/2\"/v2/{name=" + + "projects/*/exclusions/*}:\texclusionZ42\'/" + + "v2/{name=organizations/*/exclusions/*}:\t" + + "exclusionZ.2!/v2/{name=folders/*/exclusi" + + "ons/*}:\texclusionZ62)/v2/{name=billingAc" + + "counts/*/exclusions/*}:\texclusion\332A\032name" + + ",exclusion,update_mask\022\245\002\n\017DeleteExclusi" + + "on\022).google.logging.v2.DeleteExclusionRe" + + "quest\032\026.google.protobuf.Empty\"\316\001\202\323\344\223\002\300\001*" + + "\033/v2/{name=*/*/exclusions/*}Z$*\"/v2/{nam" + + "e=projects/*/exclusions/*}Z)*\'/v2/{name=" + + "organizations/*/exclusions/*}Z#*!/v2/{na" + + "me=folders/*/exclusions/*}Z+*)/v2/{name=" + + "billingAccounts/*/exclusions/*}\332A\004name\022\255" + + "\001\n\017GetCmekSettings\022).google.logging.v2.G" + + "etCmekSettingsRequest\032\037.google.logging.v" + + "2.CmekSettings\"N\202\323\344\223\002H\022\033/v2/{name=*/*}/c" + + "mekSettingsZ)\022\'/v2/{name=organizations/*" + + "}/cmekSettings\022\321\001\n\022UpdateCmekSettings\022,." + + "google.logging.v2.UpdateCmekSettingsRequ" + + "est\032\037.google.logging.v2.CmekSettings\"l\202\323" + + "\344\223\002f2\033/v2/{name=*/*}/cmekSettings:\rcmek_" + + "settingsZ82\'/v2/{name=organizations/*}/c" + + "mekSettings:\rcmek_settings\032\337\001\312A\026logging." + + "googleapis.com\322A\302\001https://www.googleapis" + + ".com/auth/cloud-platform,https://www.goo" + + "gleapis.com/auth/cloud-platform.read-onl" + + "y,https://www.googleapis.com/auth/loggin" + + "g.admin,https://www.googleapis.com/auth/" + + "logging.readB\274\003\n\025com.google.logging.v2B\022" + + "LoggingConfigProtoP\001Z8google.golang.org/" + + "genproto/googleapis/logging/v2;logging\370\001" + + "\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Clo" + + "ud\\Logging\\V2\352A`\n+logging.googleapis.com" + + "/OrganizationLocation\0221organizations/{or" + + "ganization}/locations/{location}\352AN\n%log" + + "ging.googleapis.com/FolderLocation\022%fold" + + "ers/{folder}/locations/{location}\352Ag\n-lo" + + "gging.googleapis.com/BillingAccountLocat" + + "ion\0226billingAccounts/{billing_account}/l" + + "ocations/{location}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -309,7 +398,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.TimestampProto.getDescriptor(), com.google.api.AnnotationsProto.getDescriptor(), }); - internal_static_google_logging_v2_LogSink_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_logging_v2_LogBucket_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_logging_v2_LogBucket_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_logging_v2_LogBucket_descriptor, + new java.lang.String[] { + "Name", "Description", "CreateTime", "UpdateTime", "RetentionDays", "LifecycleState", + }); + internal_static_google_logging_v2_LogSink_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_google_logging_v2_LogSink_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_LogSink_descriptor, @@ -325,20 +422,50 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "BigqueryOptions", "CreateTime", "UpdateTime", - "StartTime", - "EndTime", "Options", }); internal_static_google_logging_v2_BigQueryOptions_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageTypes().get(2); internal_static_google_logging_v2_BigQueryOptions_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_BigQueryOptions_descriptor, new java.lang.String[] { "UsePartitionedTables", "UsesTimestampColumnPartitioning", }); + internal_static_google_logging_v2_ListBucketsRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_logging_v2_ListBucketsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_logging_v2_ListBucketsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageToken", "PageSize", + }); + internal_static_google_logging_v2_ListBucketsResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_logging_v2_ListBucketsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_logging_v2_ListBucketsResponse_descriptor, + new java.lang.String[] { + "Buckets", "NextPageToken", + }); + internal_static_google_logging_v2_UpdateBucketRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_logging_v2_UpdateBucketRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_logging_v2_UpdateBucketRequest_descriptor, + new java.lang.String[] { + "Name", "Bucket", "UpdateMask", + }); + internal_static_google_logging_v2_GetBucketRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_logging_v2_GetBucketRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_logging_v2_GetBucketRequest_descriptor, + new java.lang.String[] { + "Name", + }); internal_static_google_logging_v2_ListSinksRequest_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(7); internal_static_google_logging_v2_ListSinksRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_ListSinksRequest_descriptor, @@ -346,7 +473,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageToken", "PageSize", }); internal_static_google_logging_v2_ListSinksResponse_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(8); internal_static_google_logging_v2_ListSinksResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_ListSinksResponse_descriptor, @@ -354,7 +481,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Sinks", "NextPageToken", }); internal_static_google_logging_v2_GetSinkRequest_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(9); internal_static_google_logging_v2_GetSinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_GetSinkRequest_descriptor, @@ -362,7 +489,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SinkName", }); internal_static_google_logging_v2_CreateSinkRequest_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(10); internal_static_google_logging_v2_CreateSinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_CreateSinkRequest_descriptor, @@ -370,7 +497,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Sink", "UniqueWriterIdentity", }); internal_static_google_logging_v2_UpdateSinkRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(11); internal_static_google_logging_v2_UpdateSinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_UpdateSinkRequest_descriptor, @@ -378,7 +505,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SinkName", "Sink", "UniqueWriterIdentity", "UpdateMask", }); internal_static_google_logging_v2_DeleteSinkRequest_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(12); internal_static_google_logging_v2_DeleteSinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_DeleteSinkRequest_descriptor, @@ -386,7 +513,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SinkName", }); internal_static_google_logging_v2_LogExclusion_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(13); internal_static_google_logging_v2_LogExclusion_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_LogExclusion_descriptor, @@ -394,7 +521,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Description", "Filter", "Disabled", "CreateTime", "UpdateTime", }); internal_static_google_logging_v2_ListExclusionsRequest_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(14); internal_static_google_logging_v2_ListExclusionsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_ListExclusionsRequest_descriptor, @@ -402,7 +529,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageToken", "PageSize", }); internal_static_google_logging_v2_ListExclusionsResponse_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(15); internal_static_google_logging_v2_ListExclusionsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_ListExclusionsResponse_descriptor, @@ -410,7 +537,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Exclusions", "NextPageToken", }); internal_static_google_logging_v2_GetExclusionRequest_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(16); internal_static_google_logging_v2_GetExclusionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_GetExclusionRequest_descriptor, @@ -418,7 +545,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_logging_v2_CreateExclusionRequest_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(17); internal_static_google_logging_v2_CreateExclusionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_CreateExclusionRequest_descriptor, @@ -426,7 +553,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Exclusion", }); internal_static_google_logging_v2_UpdateExclusionRequest_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(18); internal_static_google_logging_v2_UpdateExclusionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_UpdateExclusionRequest_descriptor, @@ -434,7 +561,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Exclusion", "UpdateMask", }); internal_static_google_logging_v2_DeleteExclusionRequest_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(19); internal_static_google_logging_v2_DeleteExclusionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_DeleteExclusionRequest_descriptor, @@ -442,7 +569,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_logging_v2_GetCmekSettingsRequest_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(20); internal_static_google_logging_v2_GetCmekSettingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_GetCmekSettingsRequest_descriptor, @@ -450,7 +577,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_logging_v2_UpdateCmekSettingsRequest_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(21); internal_static_google_logging_v2_UpdateCmekSettingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_UpdateCmekSettingsRequest_descriptor, @@ -458,7 +585,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "CmekSettings", "UpdateMask", }); internal_static_google_logging_v2_CmekSettings_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(22); internal_static_google_logging_v2_CmekSettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_CmekSettings_descriptor, @@ -473,6 +600,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ClientProto.methodSignature); registry.add(com.google.api.ClientProto.oauthScopes); registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceDefinition); registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingMetricsProto.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingMetricsProto.java index 75211a542..816264c08 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingMetricsProto.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingMetricsProto.java @@ -77,70 +77,71 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "e/protobuf/empty.proto\032 google/protobuf/" + "field_mask.proto\032\037google/protobuf/timest" + "amp.proto\032\034google/api/annotations.proto\"" - + "\334\004\n\tLogMetric\022\014\n\004name\030\001 \001(\t\022\023\n\013descripti" - + "on\030\002 \001(\t\022\016\n\006filter\030\003 \001(\t\0227\n\021metric_descr" - + "iptor\030\005 \001(\0132\034.google.api.MetricDescripto" - + "r\022\027\n\017value_extractor\030\006 \001(\t\022K\n\020label_extr" - + "actors\030\007 \003(\01321.google.logging.v2.LogMetr" - + "ic.LabelExtractorsEntry\022>\n\016bucket_option" - + "s\030\010 \001(\0132&.google.api.Distribution.Bucket" - + "Options\022/\n\013create_time\030\t \001(\0132\032.google.pr" - + "otobuf.Timestamp\022/\n\013update_time\030\n \001(\0132\032." - + "google.protobuf.Timestamp\022<\n\007version\030\004 \001" - + "(\0162\'.google.logging.v2.LogMetric.ApiVers" - + "ionB\002\030\001\0326\n\024LabelExtractorsEntry\022\013\n\003key\030\001" - + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\034\n\nApiVersion\022\006\n" - + "\002V2\020\000\022\006\n\002V1\020\001:G\352AD\n\035logging.googleapis.c" - + "om/Metric\022#projects/{project}/metrics/{m" - + "etric}\"\203\001\n\025ListLogMetricsRequest\022C\n\006pare" - + "nt\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcemanager.g" - + "oogleapis.com/Project\022\022\n\npage_token\030\002 \001(" - + "\t\022\021\n\tpage_size\030\003 \001(\005\"`\n\026ListLogMetricsRe" - + "sponse\022-\n\007metrics\030\001 \003(\0132\034.google.logging" - + ".v2.LogMetric\022\027\n\017next_page_token\030\002 \001(\t\"Q" - + "\n\023GetLogMetricRequest\022:\n\013metric_name\030\001 \001" - + "(\tB%\340A\002\372A\037\n\035logging.googleapis.com/Metri" - + "c\"\202\001\n\026CreateLogMetricRequest\0225\n\006parent\030\001" - + " \001(\tB%\340A\002\372A\037\n\035logging.googleapis.com/Met" - + "ric\0221\n\006metric\030\002 \001(\0132\034.google.logging.v2." - + "LogMetricB\003\340A\002\"\207\001\n\026UpdateLogMetricReques" - + "t\022:\n\013metric_name\030\001 \001(\tB%\340A\002\372A\037\n\035logging." - + "googleapis.com/Metric\0221\n\006metric\030\002 \001(\0132\034." - + "google.logging.v2.LogMetricB\003\340A\002\"T\n\026Dele" - + "teLogMetricRequest\022:\n\013metric_name\030\001 \001(\tB" - + "%\340A\002\372A\037\n\035logging.googleapis.com/Metric2\256" - + "\010\n\020MetricsServiceV2\022\227\001\n\016ListLogMetrics\022(" - + ".google.logging.v2.ListLogMetricsRequest" - + "\032).google.logging.v2.ListLogMetricsRespo" - + "nse\"0\202\323\344\223\002!\022\037/v2/{parent=projects/*}/met" - + "rics\332A\006parent\022\222\001\n\014GetLogMetric\022&.google." - + "logging.v2.GetLogMetricRequest\032\034.google." - + "logging.v2.LogMetric\"<\202\323\344\223\002(\022&/v2/{metri" - + "c_name=projects/*/metrics/*}\332A\013metric_na" - + "me\022\233\001\n\017CreateLogMetric\022).google.logging." - + "v2.CreateLogMetricRequest\032\034.google.loggi" - + "ng.v2.LogMetric\"?\202\323\344\223\002)\"\037/v2/{parent=pro" - + "jects/*}/metrics:\006metric\332A\rparent,metric" - + "\022\247\001\n\017UpdateLogMetric\022).google.logging.v2" - + ".UpdateLogMetricRequest\032\034.google.logging" - + ".v2.LogMetric\"K\202\323\344\223\0020\032&/v2/{metric_name=" - + "projects/*/metrics/*}:\006metric\332A\022metric_n" - + "ame,metric\022\222\001\n\017DeleteLogMetric\022).google." - + "logging.v2.DeleteLogMetricRequest\032\026.goog" - + "le.protobuf.Empty\"<\202\323\344\223\002(*&/v2/{metric_n" - + "ame=projects/*/metrics/*}\332A\013metric_name\032" - + "\215\002\312A\026logging.googleapis.com\322A\360\001https://w" - + "ww.googleapis.com/auth/cloud-platform,ht" - + "tps://www.googleapis.com/auth/cloud-plat" - + "form.read-only,https://www.googleapis.co" - + "m/auth/logging.admin,https://www.googlea" - + "pis.com/auth/logging.read,https://www.go" - + "ogleapis.com/auth/logging.writeB\237\001\n\025com." - + "google.logging.v2B\023LoggingMetricsProtoP\001" - + "Z8google.golang.org/genproto/googleapis/" - + "logging/v2;logging\370\001\001\252\002\027Google.Cloud.Log" - + "ging.V2\312\002\027Google\\Cloud\\Logging\\V2b\006proto" - + "3" + + "\214\005\n\tLogMetric\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\030\n\013desc" + + "ription\030\002 \001(\tB\003\340A\001\022\023\n\006filter\030\003 \001(\tB\003\340A\002\022" + + "<\n\021metric_descriptor\030\005 \001(\0132\034.google.api." + + "MetricDescriptorB\003\340A\001\022\034\n\017value_extractor" + + "\030\006 \001(\tB\003\340A\001\022P\n\020label_extractors\030\007 \003(\01321." + + "google.logging.v2.LogMetric.LabelExtract" + + "orsEntryB\003\340A\001\022C\n\016bucket_options\030\010 \001(\0132&." + + "google.api.Distribution.BucketOptionsB\003\340" + + "A\001\0224\n\013create_time\030\t \001(\0132\032.google.protobu" + + "f.TimestampB\003\340A\003\0224\n\013update_time\030\n \001(\0132\032." + + "google.protobuf.TimestampB\003\340A\003\022<\n\007versio" + + "n\030\004 \001(\0162\'.google.logging.v2.LogMetric.Ap" + + "iVersionB\002\030\001\0326\n\024LabelExtractorsEntry\022\013\n\003" + + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\034\n\nApiVersi" + + "on\022\006\n\002V2\020\000\022\006\n\002V1\020\001:J\352AG\n logging.googlea" + + "pis.com/LogMetric\022#projects/{project}/me" + + "trics/{metric}\"\215\001\n\025ListLogMetricsRequest" + + "\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcem" + + "anager.googleapis.com/Project\022\027\n\npage_to" + + "ken\030\002 \001(\tB\003\340A\001\022\026\n\tpage_size\030\003 \001(\005B\003\340A\001\"`" + + "\n\026ListLogMetricsResponse\022-\n\007metrics\030\001 \003(" + + "\0132\034.google.logging.v2.LogMetric\022\027\n\017next_" + + "page_token\030\002 \001(\t\"T\n\023GetLogMetricRequest\022" + + "=\n\013metric_name\030\001 \001(\tB(\340A\002\372A\"\n logging.go" + + "ogleapis.com/LogMetric\"\205\001\n\026CreateLogMetr" + + "icRequest\0228\n\006parent\030\001 \001(\tB(\340A\002\372A\"\022 loggi" + + "ng.googleapis.com/LogMetric\0221\n\006metric\030\002 " + + "\001(\0132\034.google.logging.v2.LogMetricB\003\340A\002\"\212" + + "\001\n\026UpdateLogMetricRequest\022=\n\013metric_name" + + "\030\001 \001(\tB(\340A\002\372A\"\n logging.googleapis.com/L" + + "ogMetric\0221\n\006metric\030\002 \001(\0132\034.google.loggin" + + "g.v2.LogMetricB\003\340A\002\"W\n\026DeleteLogMetricRe" + + "quest\022=\n\013metric_name\030\001 \001(\tB(\340A\002\372A\"\n logg" + + "ing.googleapis.com/LogMetric2\256\010\n\020Metrics" + + "ServiceV2\022\227\001\n\016ListLogMetrics\022(.google.lo" + + "gging.v2.ListLogMetricsRequest\032).google." + + "logging.v2.ListLogMetricsResponse\"0\202\323\344\223\002" + + "!\022\037/v2/{parent=projects/*}/metrics\332A\006par" + + "ent\022\222\001\n\014GetLogMetric\022&.google.logging.v2" + + ".GetLogMetricRequest\032\034.google.logging.v2" + + ".LogMetric\"<\202\323\344\223\002(\022&/v2/{metric_name=pro" + + "jects/*/metrics/*}\332A\013metric_name\022\233\001\n\017Cre" + + "ateLogMetric\022).google.logging.v2.CreateL" + + "ogMetricRequest\032\034.google.logging.v2.LogM" + + "etric\"?\202\323\344\223\002)\"\037/v2/{parent=projects/*}/m" + + "etrics:\006metric\332A\rparent,metric\022\247\001\n\017Updat" + + "eLogMetric\022).google.logging.v2.UpdateLog" + + "MetricRequest\032\034.google.logging.v2.LogMet" + + "ric\"K\202\323\344\223\0020\032&/v2/{metric_name=projects/*" + + "/metrics/*}:\006metric\332A\022metric_name,metric" + + "\022\222\001\n\017DeleteLogMetric\022).google.logging.v2" + + ".DeleteLogMetricRequest\032\026.google.protobu" + + "f.Empty\"<\202\323\344\223\002(*&/v2/{metric_name=projec" + + "ts/*/metrics/*}\332A\013metric_name\032\215\002\312A\026loggi" + + "ng.googleapis.com\322A\360\001https://www.googlea" + + "pis.com/auth/cloud-platform,https://www." + + "googleapis.com/auth/cloud-platform.read-" + + "only,https://www.googleapis.com/auth/log" + + "ging.admin,https://www.googleapis.com/au" + + "th/logging.read,https://www.googleapis.c" + + "om/auth/logging.writeB\237\001\n\025com.google.log" + + "ging.v2B\023LoggingMetricsProtoP\001Z8google.g" + + "olang.org/genproto/googleapis/logging/v2" + + ";logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027" + + "Google\\Cloud\\Logging\\V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingProto.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingProto.java index 79dc71528..2d5dc770d 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingProto.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingProto.java @@ -85,93 +85,93 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n\037google/logging/v2/logging.proto\022\021googl" - + "e.logging.v2\032\034google/api/annotations.pro" - + "to\032\027google/api/client.proto\032\037google/api/" - + "field_behavior.proto\032#google/api/monitor" - + "ed_resource.proto\032\031google/api/resource.p" - + "roto\032!google/logging/v2/log_entry.proto\032" - + "&google/logging/v2/logging_config.proto\032" - + "\036google/protobuf/duration.proto\032\033google/" - + "protobuf/empty.proto\032\037google/protobuf/ti" - + "mestamp.proto\032\027google/rpc/status.proto\"H" + + "e.logging.v2\032\027google/api/client.proto\032\037g" + + "oogle/api/field_behavior.proto\032#google/a" + + "pi/monitored_resource.proto\032\031google/api/" + + "resource.proto\032!google/logging/v2/log_en" + + "try.proto\032&google/logging/v2/logging_con" + + "fig.proto\032\036google/protobuf/duration.prot" + + "o\032\033google/protobuf/empty.proto\032\037google/p" + + "rotobuf/timestamp.proto\032\027google/rpc/stat" + + "us.proto\032\034google/api/annotations.proto\"H" + "\n\020DeleteLogRequest\0224\n\010log_name\030\001 \001(\tB\"\340A" - + "\002\372A\034\022\032logging.googleapis.com/Log\"\317\002\n\026Wri" - + "teLogEntriesRequest\0221\n\010log_name\030\001 \001(\tB\037\372" - + "A\034\n\032logging.googleapis.com/Log\022/\n\010resour" - + "ce\030\002 \001(\0132\035.google.api.MonitoredResource\022" - + "E\n\006labels\030\003 \003(\01325.google.logging.v2.Writ" - + "eLogEntriesRequest.LabelsEntry\0221\n\007entrie" - + "s\030\004 \003(\0132\033.google.logging.v2.LogEntryB\003\340A" - + "\002\022\027\n\017partial_success\030\005 \001(\010\022\017\n\007dry_run\030\006 " - + "\001(\010\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" - + "\030\002 \001(\t:\0028\001\"\031\n\027WriteLogEntriesResponse\"\310\001" - + "\n\034WriteLogEntriesPartialErrors\022]\n\020log_en" - + "try_errors\030\001 \003(\0132C.google.logging.v2.Wri" - + "teLogEntriesPartialErrors.LogEntryErrors" - + "Entry\032I\n\023LogEntryErrorsEntry\022\013\n\003key\030\001 \001(" - + "\005\022!\n\005value\030\002 \001(\0132\022.google.rpc.Status:\0028\001" - + "\"\265\001\n\025ListLogEntriesRequest\022\027\n\013project_id" - + "s\030\001 \003(\tB\002\030\001\022:\n\016resource_names\030\010 \003(\tB\"\340A\002" - + "\372A\034\022\032logging.googleapis.com/Log\022\016\n\006filte" - + "r\030\002 \001(\t\022\020\n\010order_by\030\003 \001(\t\022\021\n\tpage_size\030\004" - + " \001(\005\022\022\n\npage_token\030\005 \001(\t\"_\n\026ListLogEntri" - + "esResponse\022,\n\007entries\030\001 \003(\0132\033.google.log" - + "ging.v2.LogEntry\022\027\n\017next_page_token\030\002 \001(" - + "\t\"P\n\'ListMonitoredResourceDescriptorsReq" - + "uest\022\021\n\tpage_size\030\001 \001(\005\022\022\n\npage_token\030\002 " - + "\001(\t\"\212\001\n(ListMonitoredResourceDescriptors" - + "Response\022E\n\024resource_descriptors\030\001 \003(\0132\'" - + ".google.api.MonitoredResourceDescriptor\022" - + "\027\n\017next_page_token\030\002 \001(\t\"i\n\017ListLogsRequ" - + "est\022/\n\006parent\030\001 \001(\tB\037\372A\034\022\032logging.google" - + "apis.com/Log\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_" - + "token\030\003 \001(\t\">\n\020ListLogsResponse\022\021\n\tlog_n" - + "ames\030\003 \003(\t\022\027\n\017next_page_token\030\002 \001(\t2\335\n\n\020" - + "LoggingServiceV2\022\223\002\n\tDeleteLog\022#.google." - + "logging.v2.DeleteLogRequest\032\026.google.pro" - + "tobuf.Empty\"\310\001\202\323\344\223\002\266\001* /v2/{log_name=pro" - + "jects/*/logs/*}Z\033*\031/v2/{log_name=*/*/log" - + "s/*}Z\'*%/v2/{log_name=organizations/*/lo" - + "gs/*}Z!*\037/v2/{log_name=folders/*/logs/*}" - + "Z)*\'/v2/{log_name=billingAccounts/*/logs" - + "/*}\332A\010log_name\022\251\001\n\017WriteLogEntries\022).goo" - + "gle.logging.v2.WriteLogEntriesRequest\032*." - + "google.logging.v2.WriteLogEntriesRespons" - + "e\"?\202\323\344\223\002\026\"\021/v2/entries:write:\001*\332A log_na" - + "me,resource,labels,entries\022\243\001\n\016ListLogEn" - + "tries\022(.google.logging.v2.ListLogEntries" - + "Request\032).google.logging.v2.ListLogEntri" - + "esResponse\"<\202\323\344\223\002\025\"\020/v2/entries:list:\001*\332" - + "A\036resource_names,filter,order_by\022\305\001\n Lis" - + "tMonitoredResourceDescriptors\022:.google.l" - + "ogging.v2.ListMonitoredResourceDescripto" - + "rsRequest\032;.google.logging.v2.ListMonito" - + "redResourceDescriptorsResponse\"(\202\323\344\223\002\"\022 " - + "/v2/monitoredResourceDescriptors\022\210\002\n\010Lis" - + "tLogs\022\".google.logging.v2.ListLogsReques" - + "t\032#.google.logging.v2.ListLogsResponse\"\262" - + "\001\202\323\344\223\002\242\001\022\025/v2/{parent=*/*}/logsZ\036\022\034/v2/{" - + "parent=projects/*}/logsZ#\022!/v2/{parent=o" - + "rganizations/*}/logsZ\035\022\033/v2/{parent=fold" - + "ers/*}/logsZ%\022#/v2/{parent=billingAccoun" - + "ts/*}/logs\332A\006parent\032\215\002\312A\026logging.googlea" - + "pis.com\322A\360\001https://www.googleapis.com/au" - + "th/cloud-platform,https://www.googleapis" - + ".com/auth/cloud-platform.read-only,https" - + "://www.googleapis.com/auth/logging.admin" - + ",https://www.googleapis.com/auth/logging" - + ".read,https://www.googleapis.com/auth/lo" - + "gging.writeB\230\001\n\025com.google.logging.v2B\014L" - + "oggingProtoP\001Z8google.golang.org/genprot" - + "o/googleapis/logging/v2;logging\370\001\001\252\002\027Goo" - + "gle.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logg" - + "ing\\V2b\006proto3" + + "\002\372A\034\n\032logging.googleapis.com/Log\"\346\002\n\026Wri" + + "teLogEntriesRequest\0224\n\010log_name\030\001 \001(\tB\"\340" + + "A\001\372A\034\n\032logging.googleapis.com/Log\0224\n\010res" + + "ource\030\002 \001(\0132\035.google.api.MonitoredResour" + + "ceB\003\340A\001\022J\n\006labels\030\003 \003(\01325.google.logging" + + ".v2.WriteLogEntriesRequest.LabelsEntryB\003" + + "\340A\001\0221\n\007entries\030\004 \003(\0132\033.google.logging.v2" + + ".LogEntryB\003\340A\002\022\034\n\017partial_success\030\005 \001(\010B" + + "\003\340A\001\022\024\n\007dry_run\030\006 \001(\010B\003\340A\001\032-\n\013LabelsEntr" + + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\031\n\027Wri" + + "teLogEntriesResponse\"\310\001\n\034WriteLogEntries" + + "PartialErrors\022]\n\020log_entry_errors\030\001 \003(\0132" + + "C.google.logging.v2.WriteLogEntriesParti" + + "alErrors.LogEntryErrorsEntry\032I\n\023LogEntry" + + "ErrorsEntry\022\013\n\003key\030\001 \001(\005\022!\n\005value\030\002 \001(\0132" + + "\022.google.rpc.Status:\0028\001\"\260\001\n\025ListLogEntri" + + "esRequest\022:\n\016resource_names\030\010 \003(\tB\"\340A\002\372A" + + "\034\022\032logging.googleapis.com/Log\022\023\n\006filter\030" + + "\002 \001(\tB\003\340A\001\022\025\n\010order_by\030\003 \001(\tB\003\340A\001\022\026\n\tpag" + + "e_size\030\004 \001(\005B\003\340A\001\022\027\n\npage_token\030\005 \001(\tB\003\340" + + "A\001\"_\n\026ListLogEntriesResponse\022,\n\007entries\030" + + "\001 \003(\0132\033.google.logging.v2.LogEntry\022\027\n\017ne" + + "xt_page_token\030\002 \001(\t\"Z\n\'ListMonitoredReso" + + "urceDescriptorsRequest\022\026\n\tpage_size\030\001 \001(" + + "\005B\003\340A\001\022\027\n\npage_token\030\002 \001(\tB\003\340A\001\"\212\001\n(List" + + "MonitoredResourceDescriptorsResponse\022E\n\024" + + "resource_descriptors\030\001 \003(\0132\'.google.api." + + "MonitoredResourceDescriptor\022\027\n\017next_page" + + "_token\030\002 \001(\t\"v\n\017ListLogsRequest\0222\n\006paren" + + "t\030\001 \001(\tB\"\340A\002\372A\034\022\032logging.googleapis.com/" + + "Log\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_toke" + + "n\030\003 \001(\tB\003\340A\001\">\n\020ListLogsResponse\022\021\n\tlog_" + + "names\030\003 \003(\t\022\027\n\017next_page_token\030\002 \001(\t2\335\n\n" + + "\020LoggingServiceV2\022\223\002\n\tDeleteLog\022#.google" + + ".logging.v2.DeleteLogRequest\032\026.google.pr" + + "otobuf.Empty\"\310\001\202\323\344\223\002\266\001* /v2/{log_name=pr" + + "ojects/*/logs/*}Z\033*\031/v2/{log_name=*/*/lo" + + "gs/*}Z\'*%/v2/{log_name=organizations/*/l" + + "ogs/*}Z!*\037/v2/{log_name=folders/*/logs/*" + + "}Z)*\'/v2/{log_name=billingAccounts/*/log" + + "s/*}\332A\010log_name\022\251\001\n\017WriteLogEntries\022).go" + + "ogle.logging.v2.WriteLogEntriesRequest\032*" + + ".google.logging.v2.WriteLogEntriesRespon" + + "se\"?\202\323\344\223\002\026\"\021/v2/entries:write:\001*\332A log_n" + + "ame,resource,labels,entries\022\243\001\n\016ListLogE" + + "ntries\022(.google.logging.v2.ListLogEntrie" + + "sRequest\032).google.logging.v2.ListLogEntr" + + "iesResponse\"<\202\323\344\223\002\025\"\020/v2/entries:list:\001*" + + "\332A\036resource_names,filter,order_by\022\305\001\n Li" + + "stMonitoredResourceDescriptors\022:.google." + + "logging.v2.ListMonitoredResourceDescript" + + "orsRequest\032;.google.logging.v2.ListMonit" + + "oredResourceDescriptorsResponse\"(\202\323\344\223\002\"\022" + + " /v2/monitoredResourceDescriptors\022\210\002\n\010Li" + + "stLogs\022\".google.logging.v2.ListLogsReque" + + "st\032#.google.logging.v2.ListLogsResponse\"" + + "\262\001\202\323\344\223\002\242\001\022\025/v2/{parent=*/*}/logsZ\036\022\034/v2/" + + "{parent=projects/*}/logsZ#\022!/v2/{parent=" + + "organizations/*}/logsZ\035\022\033/v2/{parent=fol" + + "ders/*}/logsZ%\022#/v2/{parent=billingAccou" + + "nts/*}/logs\332A\006parent\032\215\002\312A\026logging.google" + + "apis.com\322A\360\001https://www.googleapis.com/a" + + "uth/cloud-platform,https://www.googleapi" + + "s.com/auth/cloud-platform.read-only,http" + + "s://www.googleapis.com/auth/logging.admi" + + "n,https://www.googleapis.com/auth/loggin" + + "g.read,https://www.googleapis.com/auth/l" + + "ogging.writeB\230\001\n\025com.google.logging.v2B\014" + + "LoggingProtoP\001Z8google.golang.org/genpro" + + "to/googleapis/logging/v2;logging\370\001\001\252\002\027Go" + + "ogle.Cloud.Logging.V2\312\002\027Google\\Cloud\\Log" + + "ging\\V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.MonitoredResourceProto.getDescriptor(), @@ -182,6 +182,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), com.google.rpc.StatusProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), }); internal_static_google_logging_v2_DeleteLogRequest_descriptor = getDescriptor().getMessageTypes().get(0); @@ -237,7 +238,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_ListLogEntriesRequest_descriptor, new java.lang.String[] { - "ProjectIds", "ResourceNames", "Filter", "OrderBy", "PageSize", "PageToken", + "ResourceNames", "Filter", "OrderBy", "PageSize", "PageToken", }); internal_static_google_logging_v2_ListLogEntriesResponse_descriptor = getDescriptor().getMessageTypes().get(5); @@ -289,7 +290,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.MonitoredResourceProto.getDescriptor(); @@ -300,6 +300,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.rpc.StatusProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/MetricName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/MetricName.java deleted file mode 100644 index b7f5438c3..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/MetricName.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.v2; - -import com.google.api.resourcenames.ResourceName; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public abstract class MetricName implements ResourceName { - protected MetricName() {} -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/MetricNames.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/MetricNames.java deleted file mode 100644 index 014bb724d..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/MetricNames.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.v2; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class MetricNames { - private MetricNames() {} - - public static MetricName parse(String resourceNameString) { - if (ProjectMetricName.isParsableFrom(resourceNameString)) { - return ProjectMetricName.parse(resourceNameString); - } - return UntypedMetricName.parse(resourceNameString); - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationExclusionName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationExclusionName.java deleted file mode 100644 index bdd8e43da..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationExclusionName.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.v2; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class OrganizationExclusionName extends ExclusionName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("organizations/{organization}/exclusions/{exclusion}"); - - private volatile Map fieldValuesMap; - - private final String organization; - private final String exclusion; - - public String getOrganization() { - return organization; - } - - public String getExclusion() { - return exclusion; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private OrganizationExclusionName(Builder builder) { - organization = Preconditions.checkNotNull(builder.getOrganization()); - exclusion = Preconditions.checkNotNull(builder.getExclusion()); - } - - public static OrganizationExclusionName of(String organization, String exclusion) { - return newBuilder().setOrganization(organization).setExclusion(exclusion).build(); - } - - public static String format(String organization, String exclusion) { - return newBuilder().setOrganization(organization).setExclusion(exclusion).build().toString(); - } - - public static OrganizationExclusionName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, - "OrganizationExclusionName.parse: formattedString not in valid format"); - return of(matchMap.get("organization"), matchMap.get("exclusion")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (OrganizationExclusionName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("organization", organization); - fieldMapBuilder.put("exclusion", exclusion); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("organization", organization, "exclusion", exclusion); - } - - /** Builder for OrganizationExclusionName. */ - public static class Builder { - - private String organization; - private String exclusion; - - public String getOrganization() { - return organization; - } - - public String getExclusion() { - return exclusion; - } - - public Builder setOrganization(String organization) { - this.organization = organization; - return this; - } - - public Builder setExclusion(String exclusion) { - this.exclusion = exclusion; - return this; - } - - private Builder() {} - - private Builder(OrganizationExclusionName organizationExclusionName) { - organization = organizationExclusionName.organization; - exclusion = organizationExclusionName.exclusion; - } - - public OrganizationExclusionName build() { - return new OrganizationExclusionName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof OrganizationExclusionName) { - OrganizationExclusionName that = (OrganizationExclusionName) o; - return (this.organization.equals(that.organization)) - && (this.exclusion.equals(that.exclusion)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= organization.hashCode(); - h *= 1000003; - h ^= exclusion.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationLogName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationLocationName.java similarity index 62% rename from proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationLogName.java rename to proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationLocationName.java index ef10833bd..c24a63f7a 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationLogName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationLocationName.java @@ -17,6 +17,7 @@ package com.google.logging.v2; import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; import java.util.ArrayList; @@ -25,22 +26,22 @@ /** AUTO-GENERATED DOCUMENTATION AND CLASS */ @javax.annotation.Generated("by GAPIC protoc plugin") -public class OrganizationLogName extends LogName { +public class OrganizationLocationName implements ResourceName { private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("organizations/{organization}/logs/{log}"); + PathTemplate.createWithoutUrlEncoding("organizations/{organization}/locations/{location}"); private volatile Map fieldValuesMap; private final String organization; - private final String log; + private final String location; public String getOrganization() { return organization; } - public String getLog() { - return log; + public String getLocation() { + return location; } public static Builder newBuilder() { @@ -51,40 +52,40 @@ public Builder toBuilder() { return new Builder(this); } - private OrganizationLogName(Builder builder) { + private OrganizationLocationName(Builder builder) { organization = Preconditions.checkNotNull(builder.getOrganization()); - log = Preconditions.checkNotNull(builder.getLog()); + location = Preconditions.checkNotNull(builder.getLocation()); } - public static OrganizationLogName of(String organization, String log) { - return newBuilder().setOrganization(organization).setLog(log).build(); + public static OrganizationLocationName of(String organization, String location) { + return newBuilder().setOrganization(organization).setLocation(location).build(); } - public static String format(String organization, String log) { - return newBuilder().setOrganization(organization).setLog(log).build().toString(); + public static String format(String organization, String location) { + return newBuilder().setOrganization(organization).setLocation(location).build().toString(); } - public static OrganizationLogName parse(String formattedString) { + public static OrganizationLocationName parse(String formattedString) { if (formattedString.isEmpty()) { return null; } Map matchMap = PATH_TEMPLATE.validatedMatch( - formattedString, "OrganizationLogName.parse: formattedString not in valid format"); - return of(matchMap.get("organization"), matchMap.get("log")); + formattedString, "OrganizationLocationName.parse: formattedString not in valid format"); + return of(matchMap.get("organization"), matchMap.get("location")); } - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); for (String formattedString : formattedStrings) { list.add(parse(formattedString)); } return list; } - public static List toStringList(List values) { + public static List toStringList(List values) { List list = new ArrayList(values.size()); - for (OrganizationLogName value : values) { + for (OrganizationLocationName value : values) { if (value == null) { list.add(""); } else { @@ -104,7 +105,7 @@ public Map getFieldValuesMap() { if (fieldValuesMap == null) { ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); fieldMapBuilder.put("organization", organization); - fieldMapBuilder.put("log", log); + fieldMapBuilder.put("location", location); fieldValuesMap = fieldMapBuilder.build(); } } @@ -118,21 +119,21 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate("organization", organization, "log", log); + return PATH_TEMPLATE.instantiate("organization", organization, "location", location); } - /** Builder for OrganizationLogName. */ + /** Builder for OrganizationLocationName. */ public static class Builder { private String organization; - private String log; + private String location; public String getOrganization() { return organization; } - public String getLog() { - return log; + public String getLocation() { + return location; } public Builder setOrganization(String organization) { @@ -140,20 +141,20 @@ public Builder setOrganization(String organization) { return this; } - public Builder setLog(String log) { - this.log = log; + public Builder setLocation(String location) { + this.location = location; return this; } private Builder() {} - private Builder(OrganizationLogName organizationLogName) { - organization = organizationLogName.organization; - log = organizationLogName.log; + private Builder(OrganizationLocationName organizationLocationName) { + organization = organizationLocationName.organization; + location = organizationLocationName.location; } - public OrganizationLogName build() { - return new OrganizationLogName(this); + public OrganizationLocationName build() { + return new OrganizationLocationName(this); } } @@ -162,9 +163,9 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o instanceof OrganizationLogName) { - OrganizationLogName that = (OrganizationLogName) o; - return (this.organization.equals(that.organization)) && (this.log.equals(that.log)); + if (o instanceof OrganizationLocationName) { + OrganizationLocationName that = (OrganizationLocationName) o; + return (this.organization.equals(that.organization)) && (this.location.equals(that.location)); } return false; } @@ -175,7 +176,7 @@ public int hashCode() { h *= 1000003; h ^= organization.hashCode(); h *= 1000003; - h ^= log.hashCode(); + h ^= location.hashCode(); return h; } } diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationName.java index ef9c7f3dc..224340f75 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationName.java @@ -17,6 +17,7 @@ package com.google.logging.v2; import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; import java.util.ArrayList; @@ -25,7 +26,7 @@ /** AUTO-GENERATED DOCUMENTATION AND CLASS */ @javax.annotation.Generated("by GAPIC protoc plugin") -public class OrganizationName extends ParentName { +public class OrganizationName implements ResourceName { private static final PathTemplate PATH_TEMPLATE = PathTemplate.createWithoutUrlEncoding("organizations/{organization}"); diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationSinkName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationSinkName.java deleted file mode 100644 index ed0fa5808..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationSinkName.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.v2; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class OrganizationSinkName extends SinkName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("organizations/{organization}/sinks/{sink}"); - - private volatile Map fieldValuesMap; - - private final String organization; - private final String sink; - - public String getOrganization() { - return organization; - } - - public String getSink() { - return sink; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private OrganizationSinkName(Builder builder) { - organization = Preconditions.checkNotNull(builder.getOrganization()); - sink = Preconditions.checkNotNull(builder.getSink()); - } - - public static OrganizationSinkName of(String organization, String sink) { - return newBuilder().setOrganization(organization).setSink(sink).build(); - } - - public static String format(String organization, String sink) { - return newBuilder().setOrganization(organization).setSink(sink).build().toString(); - } - - public static OrganizationSinkName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "OrganizationSinkName.parse: formattedString not in valid format"); - return of(matchMap.get("organization"), matchMap.get("sink")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (OrganizationSinkName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("organization", organization); - fieldMapBuilder.put("sink", sink); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("organization", organization, "sink", sink); - } - - /** Builder for OrganizationSinkName. */ - public static class Builder { - - private String organization; - private String sink; - - public String getOrganization() { - return organization; - } - - public String getSink() { - return sink; - } - - public Builder setOrganization(String organization) { - this.organization = organization; - return this; - } - - public Builder setSink(String sink) { - this.sink = sink; - return this; - } - - private Builder() {} - - private Builder(OrganizationSinkName organizationSinkName) { - organization = organizationSinkName.organization; - sink = organizationSinkName.sink; - } - - public OrganizationSinkName build() { - return new OrganizationSinkName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof OrganizationSinkName) { - OrganizationSinkName that = (OrganizationSinkName) o; - return (this.organization.equals(that.organization)) && (this.sink.equals(that.sink)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= organization.hashCode(); - h *= 1000003; - h ^= sink.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ParentName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ParentName.java deleted file mode 100644 index cbe7686de..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ParentName.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.v2; - -import com.google.api.resourcenames.ResourceName; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public abstract class ParentName implements ResourceName { - protected ParentName() {} -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ParentNames.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ParentNames.java deleted file mode 100644 index 078e5c5ab..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ParentNames.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.v2; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class ParentNames { - private ParentNames() {} - - public static ParentName parse(String resourceNameString) { - if (ProjectName.isParsableFrom(resourceNameString)) { - return ProjectName.parse(resourceNameString); - } - if (OrganizationName.isParsableFrom(resourceNameString)) { - return OrganizationName.parse(resourceNameString); - } - if (FolderName.isParsableFrom(resourceNameString)) { - return FolderName.parse(resourceNameString); - } - if (BillingName.isParsableFrom(resourceNameString)) { - return BillingName.parse(resourceNameString); - } - return UntypedParentName.parse(resourceNameString); - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ProjectExclusionName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ProjectExclusionName.java deleted file mode 100644 index f74e6a58e..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ProjectExclusionName.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.v2; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class ProjectExclusionName extends ExclusionName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/exclusions/{exclusion}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String exclusion; - - public String getProject() { - return project; - } - - public String getExclusion() { - return exclusion; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private ProjectExclusionName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - exclusion = Preconditions.checkNotNull(builder.getExclusion()); - } - - public static ProjectExclusionName of(String project, String exclusion) { - return newBuilder().setProject(project).setExclusion(exclusion).build(); - } - - public static String format(String project, String exclusion) { - return newBuilder().setProject(project).setExclusion(exclusion).build().toString(); - } - - public static ProjectExclusionName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "ProjectExclusionName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("exclusion")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (ProjectExclusionName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("exclusion", exclusion); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "exclusion", exclusion); - } - - /** Builder for ProjectExclusionName. */ - public static class Builder { - - private String project; - private String exclusion; - - public String getProject() { - return project; - } - - public String getExclusion() { - return exclusion; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setExclusion(String exclusion) { - this.exclusion = exclusion; - return this; - } - - private Builder() {} - - private Builder(ProjectExclusionName projectExclusionName) { - project = projectExclusionName.project; - exclusion = projectExclusionName.exclusion; - } - - public ProjectExclusionName build() { - return new ProjectExclusionName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof ProjectExclusionName) { - ProjectExclusionName that = (ProjectExclusionName) o; - return (this.project.equals(that.project)) && (this.exclusion.equals(that.exclusion)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= exclusion.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ProjectName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ProjectName.java index 101cb3b1d..b3bc846fb 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ProjectName.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ProjectName.java @@ -17,6 +17,7 @@ package com.google.logging.v2; import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; import java.util.ArrayList; @@ -25,7 +26,7 @@ /** AUTO-GENERATED DOCUMENTATION AND CLASS */ @javax.annotation.Generated("by GAPIC protoc plugin") -public class ProjectName extends ParentName { +public class ProjectName implements ResourceName { private static final PathTemplate PATH_TEMPLATE = PathTemplate.createWithoutUrlEncoding("projects/{project}"); diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ProjectSinkName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ProjectSinkName.java deleted file mode 100644 index d367b2b22..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ProjectSinkName.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.v2; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class ProjectSinkName extends SinkName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/sinks/{sink}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String sink; - - public String getProject() { - return project; - } - - public String getSink() { - return sink; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private ProjectSinkName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - sink = Preconditions.checkNotNull(builder.getSink()); - } - - public static ProjectSinkName of(String project, String sink) { - return newBuilder().setProject(project).setSink(sink).build(); - } - - public static String format(String project, String sink) { - return newBuilder().setProject(project).setSink(sink).build().toString(); - } - - public static ProjectSinkName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "ProjectSinkName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("sink")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (ProjectSinkName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("sink", sink); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "sink", sink); - } - - /** Builder for ProjectSinkName. */ - public static class Builder { - - private String project; - private String sink; - - public String getProject() { - return project; - } - - public String getSink() { - return sink; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setSink(String sink) { - this.sink = sink; - return this; - } - - private Builder() {} - - private Builder(ProjectSinkName projectSinkName) { - project = projectSinkName.project; - sink = projectSinkName.sink; - } - - public ProjectSinkName build() { - return new ProjectSinkName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof ProjectSinkName) { - ProjectSinkName that = (ProjectSinkName) o; - return (this.project.equals(that.project)) && (this.sink.equals(that.sink)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= sink.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/SinkName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/SinkName.java deleted file mode 100644 index 3b0b81463..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/SinkName.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.v2; - -import com.google.api.resourcenames.ResourceName; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public abstract class SinkName implements ResourceName { - protected SinkName() {} -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/SinkNames.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/SinkNames.java deleted file mode 100644 index 690b65274..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/SinkNames.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.v2; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class SinkNames { - private SinkNames() {} - - public static SinkName parse(String resourceNameString) { - if (ProjectSinkName.isParsableFrom(resourceNameString)) { - return ProjectSinkName.parse(resourceNameString); - } - if (OrganizationSinkName.isParsableFrom(resourceNameString)) { - return OrganizationSinkName.parse(resourceNameString); - } - if (FolderSinkName.isParsableFrom(resourceNameString)) { - return FolderSinkName.parse(resourceNameString); - } - if (BillingSinkName.isParsableFrom(resourceNameString)) { - return BillingSinkName.parse(resourceNameString); - } - return UntypedSinkName.parse(resourceNameString); - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UntypedExclusionName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UntypedExclusionName.java deleted file mode 100644 index eab4e1f62..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UntypedExclusionName.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.v2; - -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class UntypedExclusionName extends ExclusionName { - - private final String rawValue; - private Map valueMap; - - private UntypedExclusionName(String rawValue) { - this.rawValue = Preconditions.checkNotNull(rawValue); - this.valueMap = ImmutableMap.of("", rawValue); - } - - public static UntypedExclusionName from(ResourceName resourceName) { - return new UntypedExclusionName(resourceName.toString()); - } - - public static UntypedExclusionName parse(String formattedString) { - return new UntypedExclusionName(formattedString); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (UntypedExclusionName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return true; - } - - /** Return a map with a single value rawValue keyed on an empty String "". */ - public Map getFieldValuesMap() { - return valueMap; - } - - /** Return the initial rawValue if @param fieldName is an empty String, else return null. */ - public String getFieldValue(String fieldName) { - return valueMap.get(fieldName); - } - - @Override - public String toString() { - return rawValue; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof UntypedExclusionName) { - UntypedExclusionName that = (UntypedExclusionName) o; - return this.rawValue.equals(that.rawValue); - } - return false; - } - - @Override - public int hashCode() { - return rawValue.hashCode(); - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UntypedLogName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UntypedLogName.java deleted file mode 100644 index 0eb11bcf7..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UntypedLogName.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.v2; - -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class UntypedLogName extends LogName { - - private final String rawValue; - private Map valueMap; - - private UntypedLogName(String rawValue) { - this.rawValue = Preconditions.checkNotNull(rawValue); - this.valueMap = ImmutableMap.of("", rawValue); - } - - public static UntypedLogName from(ResourceName resourceName) { - return new UntypedLogName(resourceName.toString()); - } - - public static UntypedLogName parse(String formattedString) { - return new UntypedLogName(formattedString); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (UntypedLogName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return true; - } - - /** Return a map with a single value rawValue keyed on an empty String "". */ - public Map getFieldValuesMap() { - return valueMap; - } - - /** Return the initial rawValue if @param fieldName is an empty String, else return null. */ - public String getFieldValue(String fieldName) { - return valueMap.get(fieldName); - } - - @Override - public String toString() { - return rawValue; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof UntypedLogName) { - UntypedLogName that = (UntypedLogName) o; - return this.rawValue.equals(that.rawValue); - } - return false; - } - - @Override - public int hashCode() { - return rawValue.hashCode(); - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UntypedMetricName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UntypedMetricName.java deleted file mode 100644 index c93e19d4f..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UntypedMetricName.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.v2; - -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class UntypedMetricName extends MetricName { - - private final String rawValue; - private Map valueMap; - - private UntypedMetricName(String rawValue) { - this.rawValue = Preconditions.checkNotNull(rawValue); - this.valueMap = ImmutableMap.of("", rawValue); - } - - public static UntypedMetricName from(ResourceName resourceName) { - return new UntypedMetricName(resourceName.toString()); - } - - public static UntypedMetricName parse(String formattedString) { - return new UntypedMetricName(formattedString); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (UntypedMetricName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return true; - } - - /** Return a map with a single value rawValue keyed on an empty String "". */ - public Map getFieldValuesMap() { - return valueMap; - } - - /** Return the initial rawValue if @param fieldName is an empty String, else return null. */ - public String getFieldValue(String fieldName) { - return valueMap.get(fieldName); - } - - @Override - public String toString() { - return rawValue; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof UntypedMetricName) { - UntypedMetricName that = (UntypedMetricName) o; - return this.rawValue.equals(that.rawValue); - } - return false; - } - - @Override - public int hashCode() { - return rawValue.hashCode(); - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UntypedParentName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UntypedParentName.java deleted file mode 100644 index 6e42aa5f1..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UntypedParentName.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.v2; - -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class UntypedParentName extends ParentName { - - private final String rawValue; - private Map valueMap; - - private UntypedParentName(String rawValue) { - this.rawValue = Preconditions.checkNotNull(rawValue); - this.valueMap = ImmutableMap.of("", rawValue); - } - - public static UntypedParentName from(ResourceName resourceName) { - return new UntypedParentName(resourceName.toString()); - } - - public static UntypedParentName parse(String formattedString) { - return new UntypedParentName(formattedString); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (UntypedParentName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return true; - } - - /** Return a map with a single value rawValue keyed on an empty String "". */ - public Map getFieldValuesMap() { - return valueMap; - } - - /** Return the initial rawValue if @param fieldName is an empty String, else return null. */ - public String getFieldValue(String fieldName) { - return valueMap.get(fieldName); - } - - @Override - public String toString() { - return rawValue; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof UntypedParentName) { - UntypedParentName that = (UntypedParentName) o; - return this.rawValue.equals(that.rawValue); - } - return false; - } - - @Override - public int hashCode() { - return rawValue.hashCode(); - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UntypedSinkName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UntypedSinkName.java deleted file mode 100644 index e40c689a9..000000000 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UntypedSinkName.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.logging.v2; - -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class UntypedSinkName extends SinkName { - - private final String rawValue; - private Map valueMap; - - private UntypedSinkName(String rawValue) { - this.rawValue = Preconditions.checkNotNull(rawValue); - this.valueMap = ImmutableMap.of("", rawValue); - } - - public static UntypedSinkName from(ResourceName resourceName) { - return new UntypedSinkName(resourceName.toString()); - } - - public static UntypedSinkName parse(String formattedString) { - return new UntypedSinkName(formattedString); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (UntypedSinkName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return true; - } - - /** Return a map with a single value rawValue keyed on an empty String "". */ - public Map getFieldValuesMap() { - return valueMap; - } - - /** Return the initial rawValue if @param fieldName is an empty String, else return null. */ - public String getFieldValue(String fieldName) { - return valueMap.get(fieldName); - } - - @Override - public String toString() { - return rawValue; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof UntypedSinkName) { - UntypedSinkName that = (UntypedSinkName) o; - return this.rawValue.equals(that.rawValue); - } - return false; - } - - @Override - public int hashCode() { - return rawValue.hashCode(); - } -} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateBucketRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateBucketRequest.java new file mode 100644 index 000000000..0b76053fa --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateBucketRequest.java @@ -0,0 +1,1325 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/logging/v2/logging_config.proto + +package com.google.logging.v2; + +/** + * + * + *
+ * The parameters to `UpdateBucket` (Beta).
+ * 
+ * + * Protobuf type {@code google.logging.v2.UpdateBucketRequest} + */ +public final class UpdateBucketRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.logging.v2.UpdateBucketRequest) + UpdateBucketRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateBucketRequest.newBuilder() to construct. + private UpdateBucketRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateBucketRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateBucketRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateBucketRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.logging.v2.LogBucket.Builder subBuilder = null; + if (bucket_ != null) { + subBuilder = bucket_.toBuilder(); + } + bucket_ = + input.readMessage(com.google.logging.v2.LogBucket.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(bucket_); + bucket_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_UpdateBucketRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_UpdateBucketRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.UpdateBucketRequest.class, + com.google.logging.v2.UpdateBucketRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The full resource name of the bucket to update.
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   * Example:
+   * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also
+   * requires permission "resourcemanager.projects.updateLiens" to set the
+   * locked property
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The full resource name of the bucket to update.
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   * Example:
+   * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also
+   * requires permission "resourcemanager.projects.updateLiens" to set the
+   * locked property
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUCKET_FIELD_NUMBER = 2; + private com.google.logging.v2.LogBucket bucket_; + /** + * + * + *
+   * Required. The updated bucket.
+   * 
+ * + * .google.logging.v2.LogBucket bucket = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the bucket field is set. + */ + @java.lang.Override + public boolean hasBucket() { + return bucket_ != null; + } + /** + * + * + *
+   * Required. The updated bucket.
+   * 
+ * + * .google.logging.v2.LogBucket bucket = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bucket. + */ + @java.lang.Override + public com.google.logging.v2.LogBucket getBucket() { + return bucket_ == null ? com.google.logging.v2.LogBucket.getDefaultInstance() : bucket_; + } + /** + * + * + *
+   * Required. The updated bucket.
+   * 
+ * + * .google.logging.v2.LogBucket bucket = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.logging.v2.LogBucketOrBuilder getBucketOrBuilder() { + return getBucket(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 4; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Field mask that specifies the fields in `bucket` that need an update. A
+   * bucket field will be overwritten if, and only if, it is in the update
+   * mask. `name` and output only fields cannot be updated.
+   * For a detailed `FieldMask` definition, see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
+   * Example: `updateMask=retention_days`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Field mask that specifies the fields in `bucket` that need an update. A
+   * bucket field will be overwritten if, and only if, it is in the update
+   * mask. `name` and output only fields cannot be updated.
+   * For a detailed `FieldMask` definition, see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
+   * Example: `updateMask=retention_days`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Field mask that specifies the fields in `bucket` that need an update. A
+   * bucket field will be overwritten if, and only if, it is in the update
+   * mask. `name` and output only fields cannot be updated.
+   * For a detailed `FieldMask` definition, see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
+   * Example: `updateMask=retention_days`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (bucket_ != null) { + output.writeMessage(2, getBucket()); + } + if (updateMask_ != null) { + output.writeMessage(4, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (bucket_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getBucket()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.logging.v2.UpdateBucketRequest)) { + return super.equals(obj); + } + com.google.logging.v2.UpdateBucketRequest other = + (com.google.logging.v2.UpdateBucketRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasBucket() != other.hasBucket()) return false; + if (hasBucket()) { + if (!getBucket().equals(other.getBucket())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasBucket()) { + hash = (37 * hash) + BUCKET_FIELD_NUMBER; + hash = (53 * hash) + getBucket().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.logging.v2.UpdateBucketRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.UpdateBucketRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.logging.v2.UpdateBucketRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.UpdateBucketRequest 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.logging.v2.UpdateBucketRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.UpdateBucketRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.logging.v2.UpdateBucketRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.UpdateBucketRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.logging.v2.UpdateBucketRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.logging.v2.UpdateBucketRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.logging.v2.UpdateBucketRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.UpdateBucketRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.logging.v2.UpdateBucketRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The parameters to `UpdateBucket` (Beta).
+   * 
+ * + * Protobuf type {@code google.logging.v2.UpdateBucketRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.logging.v2.UpdateBucketRequest) + com.google.logging.v2.UpdateBucketRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_UpdateBucketRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_UpdateBucketRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.UpdateBucketRequest.class, + com.google.logging.v2.UpdateBucketRequest.Builder.class); + } + + // Construct using com.google.logging.v2.UpdateBucketRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (bucketBuilder_ == null) { + bucket_ = null; + } else { + bucket_ = null; + bucketBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_UpdateBucketRequest_descriptor; + } + + @java.lang.Override + public com.google.logging.v2.UpdateBucketRequest getDefaultInstanceForType() { + return com.google.logging.v2.UpdateBucketRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.logging.v2.UpdateBucketRequest build() { + com.google.logging.v2.UpdateBucketRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.logging.v2.UpdateBucketRequest buildPartial() { + com.google.logging.v2.UpdateBucketRequest result = + new com.google.logging.v2.UpdateBucketRequest(this); + result.name_ = name_; + if (bucketBuilder_ == null) { + result.bucket_ = bucket_; + } else { + result.bucket_ = bucketBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.logging.v2.UpdateBucketRequest) { + return mergeFrom((com.google.logging.v2.UpdateBucketRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.logging.v2.UpdateBucketRequest other) { + if (other == com.google.logging.v2.UpdateBucketRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasBucket()) { + mergeBucket(other.getBucket()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.logging.v2.UpdateBucketRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.logging.v2.UpdateBucketRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The full resource name of the bucket to update.
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     * Example:
+     * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also
+     * requires permission "resourcemanager.projects.updateLiens" to set the
+     * locked property
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The full resource name of the bucket to update.
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     * Example:
+     * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also
+     * requires permission "resourcemanager.projects.updateLiens" to set the
+     * locked property
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The full resource name of the bucket to update.
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     * Example:
+     * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also
+     * requires permission "resourcemanager.projects.updateLiens" to set the
+     * locked property
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The full resource name of the bucket to update.
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     * Example:
+     * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also
+     * requires permission "resourcemanager.projects.updateLiens" to set the
+     * locked property
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The full resource name of the bucket to update.
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     * Example:
+     * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also
+     * requires permission "resourcemanager.projects.updateLiens" to set the
+     * locked property
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.logging.v2.LogBucket bucket_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.logging.v2.LogBucket, + com.google.logging.v2.LogBucket.Builder, + com.google.logging.v2.LogBucketOrBuilder> + bucketBuilder_; + /** + * + * + *
+     * Required. The updated bucket.
+     * 
+ * + * .google.logging.v2.LogBucket bucket = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the bucket field is set. + */ + public boolean hasBucket() { + return bucketBuilder_ != null || bucket_ != null; + } + /** + * + * + *
+     * Required. The updated bucket.
+     * 
+ * + * .google.logging.v2.LogBucket bucket = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bucket. + */ + public com.google.logging.v2.LogBucket getBucket() { + if (bucketBuilder_ == null) { + return bucket_ == null ? com.google.logging.v2.LogBucket.getDefaultInstance() : bucket_; + } else { + return bucketBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The updated bucket.
+     * 
+ * + * .google.logging.v2.LogBucket bucket = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBucket(com.google.logging.v2.LogBucket value) { + if (bucketBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bucket_ = value; + onChanged(); + } else { + bucketBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The updated bucket.
+     * 
+ * + * .google.logging.v2.LogBucket bucket = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBucket(com.google.logging.v2.LogBucket.Builder builderForValue) { + if (bucketBuilder_ == null) { + bucket_ = builderForValue.build(); + onChanged(); + } else { + bucketBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The updated bucket.
+     * 
+ * + * .google.logging.v2.LogBucket bucket = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeBucket(com.google.logging.v2.LogBucket value) { + if (bucketBuilder_ == null) { + if (bucket_ != null) { + bucket_ = + com.google.logging.v2.LogBucket.newBuilder(bucket_).mergeFrom(value).buildPartial(); + } else { + bucket_ = value; + } + onChanged(); + } else { + bucketBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The updated bucket.
+     * 
+ * + * .google.logging.v2.LogBucket bucket = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearBucket() { + if (bucketBuilder_ == null) { + bucket_ = null; + onChanged(); + } else { + bucket_ = null; + bucketBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The updated bucket.
+     * 
+ * + * .google.logging.v2.LogBucket bucket = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.logging.v2.LogBucket.Builder getBucketBuilder() { + + onChanged(); + return getBucketFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The updated bucket.
+     * 
+ * + * .google.logging.v2.LogBucket bucket = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.logging.v2.LogBucketOrBuilder getBucketOrBuilder() { + if (bucketBuilder_ != null) { + return bucketBuilder_.getMessageOrBuilder(); + } else { + return bucket_ == null ? com.google.logging.v2.LogBucket.getDefaultInstance() : bucket_; + } + } + /** + * + * + *
+     * Required. The updated bucket.
+     * 
+ * + * .google.logging.v2.LogBucket bucket = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.logging.v2.LogBucket, + com.google.logging.v2.LogBucket.Builder, + com.google.logging.v2.LogBucketOrBuilder> + getBucketFieldBuilder() { + if (bucketBuilder_ == null) { + bucketBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.logging.v2.LogBucket, + com.google.logging.v2.LogBucket.Builder, + com.google.logging.v2.LogBucketOrBuilder>( + getBucket(), getParentForChildren(), isClean()); + bucket_ = null; + } + return bucketBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. Field mask that specifies the fields in `bucket` that need an update. A
+     * bucket field will be overwritten if, and only if, it is in the update
+     * mask. `name` and output only fields cannot be updated.
+     * For a detailed `FieldMask` definition, see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
+     * Example: `updateMask=retention_days`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. Field mask that specifies the fields in `bucket` that need an update. A
+     * bucket field will be overwritten if, and only if, it is in the update
+     * mask. `name` and output only fields cannot be updated.
+     * For a detailed `FieldMask` definition, see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
+     * Example: `updateMask=retention_days`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Field mask that specifies the fields in `bucket` that need an update. A
+     * bucket field will be overwritten if, and only if, it is in the update
+     * mask. `name` and output only fields cannot be updated.
+     * For a detailed `FieldMask` definition, see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
+     * Example: `updateMask=retention_days`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Field mask that specifies the fields in `bucket` that need an update. A
+     * bucket field will be overwritten if, and only if, it is in the update
+     * mask. `name` and output only fields cannot be updated.
+     * For a detailed `FieldMask` definition, see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
+     * Example: `updateMask=retention_days`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Field mask that specifies the fields in `bucket` that need an update. A
+     * bucket field will be overwritten if, and only if, it is in the update
+     * mask. `name` and output only fields cannot be updated.
+     * For a detailed `FieldMask` definition, see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
+     * Example: `updateMask=retention_days`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Field mask that specifies the fields in `bucket` that need an update. A
+     * bucket field will be overwritten if, and only if, it is in the update
+     * mask. `name` and output only fields cannot be updated.
+     * For a detailed `FieldMask` definition, see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
+     * Example: `updateMask=retention_days`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Field mask that specifies the fields in `bucket` that need an update. A
+     * bucket field will be overwritten if, and only if, it is in the update
+     * mask. `name` and output only fields cannot be updated.
+     * For a detailed `FieldMask` definition, see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
+     * Example: `updateMask=retention_days`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Field mask that specifies the fields in `bucket` that need an update. A
+     * bucket field will be overwritten if, and only if, it is in the update
+     * mask. `name` and output only fields cannot be updated.
+     * For a detailed `FieldMask` definition, see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
+     * Example: `updateMask=retention_days`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Field mask that specifies the fields in `bucket` that need an update. A
+     * bucket field will be overwritten if, and only if, it is in the update
+     * mask. `name` and output only fields cannot be updated.
+     * For a detailed `FieldMask` definition, see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
+     * Example: `updateMask=retention_days`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.logging.v2.UpdateBucketRequest) + } + + // @@protoc_insertion_point(class_scope:google.logging.v2.UpdateBucketRequest) + private static final com.google.logging.v2.UpdateBucketRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.logging.v2.UpdateBucketRequest(); + } + + public static com.google.logging.v2.UpdateBucketRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateBucketRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateBucketRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.logging.v2.UpdateBucketRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateBucketRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateBucketRequestOrBuilder.java new file mode 100644 index 000000000..93d5e2344 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateBucketRequestOrBuilder.java @@ -0,0 +1,158 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/logging/v2/logging_config.proto + +package com.google.logging.v2; + +public interface UpdateBucketRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.logging.v2.UpdateBucketRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The full resource name of the bucket to update.
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   * Example:
+   * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also
+   * requires permission "resourcemanager.projects.updateLiens" to set the
+   * locked property
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The full resource name of the bucket to update.
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   *     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   *     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   *     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   * Example:
+   * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also
+   * requires permission "resourcemanager.projects.updateLiens" to set the
+   * locked property
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The updated bucket.
+   * 
+ * + * .google.logging.v2.LogBucket bucket = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the bucket field is set. + */ + boolean hasBucket(); + /** + * + * + *
+   * Required. The updated bucket.
+   * 
+ * + * .google.logging.v2.LogBucket bucket = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bucket. + */ + com.google.logging.v2.LogBucket getBucket(); + /** + * + * + *
+   * Required. The updated bucket.
+   * 
+ * + * .google.logging.v2.LogBucket bucket = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.logging.v2.LogBucketOrBuilder getBucketOrBuilder(); + + /** + * + * + *
+   * Required. Field mask that specifies the fields in `bucket` that need an update. A
+   * bucket field will be overwritten if, and only if, it is in the update
+   * mask. `name` and output only fields cannot be updated.
+   * For a detailed `FieldMask` definition, see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
+   * Example: `updateMask=retention_days`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Field mask that specifies the fields in `bucket` that need an update. A
+   * bucket field will be overwritten if, and only if, it is in the update
+   * mask. `name` and output only fields cannot be updated.
+   * For a detailed `FieldMask` definition, see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
+   * Example: `updateMask=retention_days`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Field mask that specifies the fields in `bucket` that need an update. A
+   * bucket field will be overwritten if, and only if, it is in the update
+   * mask. `name` and output only fields cannot be updated.
+   * For a detailed `FieldMask` definition, see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
+   * Example: `updateMask=retention_days`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateCmekSettingsRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateCmekSettingsRequest.java index 16dc3014d..8511d6994 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateCmekSettingsRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateCmekSettingsRequest.java @@ -24,7 +24,7 @@ *
  * The parameters to
  * [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings].
- * See [Enabling CMEK for Logs Router](/logging/docs/routing/managed-encryption)
+ * See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
  * for more information.
  * 
* @@ -161,10 +161,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * the GCP organization. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -191,10 +192,11 @@ public java.lang.String getName() { * the GCP organization. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -215,13 +217,16 @@ public com.google.protobuf.ByteString getNameBytes() { *
    * Required. The CMEK settings to update.
    * See [Enabling CMEK for Logs
-   * Router](/logging/docs/routing/managed-encryption) for more information.
+   * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
    * 
* - * .google.logging.v2.CmekSettings cmek_settings = 2; + * + * .google.logging.v2.CmekSettings cmek_settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the cmekSettings field is set. */ + @java.lang.Override public boolean hasCmekSettings() { return cmekSettings_ != null; } @@ -231,13 +236,16 @@ public boolean hasCmekSettings() { *
    * Required. The CMEK settings to update.
    * See [Enabling CMEK for Logs
-   * Router](/logging/docs/routing/managed-encryption) for more information.
+   * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
    * 
* - * .google.logging.v2.CmekSettings cmek_settings = 2; + * + * .google.logging.v2.CmekSettings cmek_settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The cmekSettings. */ + @java.lang.Override public com.google.logging.v2.CmekSettings getCmekSettings() { return cmekSettings_ == null ? com.google.logging.v2.CmekSettings.getDefaultInstance() @@ -249,11 +257,14 @@ public com.google.logging.v2.CmekSettings getCmekSettings() { *
    * Required. The CMEK settings to update.
    * See [Enabling CMEK for Logs
-   * Router](/logging/docs/routing/managed-encryption) for more information.
+   * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
    * 
* - * .google.logging.v2.CmekSettings cmek_settings = 2; + * + * .google.logging.v2.CmekSettings cmek_settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ + @java.lang.Override public com.google.logging.v2.CmekSettingsOrBuilder getCmekSettingsOrBuilder() { return getCmekSettings(); } @@ -271,10 +282,12 @@ public com.google.logging.v2.CmekSettingsOrBuilder getCmekSettingsOrBuilder() { * Example: `"updateMask=kmsKeyName"` * * - * .google.protobuf.FieldMask update_mask = 3; + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the updateMask field is set. */ + @java.lang.Override public boolean hasUpdateMask() { return updateMask_ != null; } @@ -289,10 +302,12 @@ public boolean hasUpdateMask() { * Example: `"updateMask=kmsKeyName"` * * - * .google.protobuf.FieldMask update_mask = 3; + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The updateMask. */ + @java.lang.Override public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } @@ -307,8 +322,10 @@ public com.google.protobuf.FieldMask getUpdateMask() { * Example: `"updateMask=kmsKeyName"` * * - * .google.protobuf.FieldMask update_mask = 3; + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ + @java.lang.Override public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { return getUpdateMask(); } @@ -506,7 +523,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
    * The parameters to
    * [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings].
-   * See [Enabling CMEK for Logs Router](/logging/docs/routing/managed-encryption)
+   * See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
    * for more information.
    * 
* @@ -705,7 +722,7 @@ public Builder mergeFrom( * the GCP organization. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The name. */ @@ -735,7 +752,7 @@ public java.lang.String getName() { * the GCP organization. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for name. */ @@ -765,7 +782,7 @@ public com.google.protobuf.ByteString getNameBytes() { * the GCP organization. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The name to set. * @return This builder for chaining. @@ -794,7 +811,7 @@ public Builder setName(java.lang.String value) { * the GCP organization. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ @@ -819,7 +836,7 @@ public Builder clearName() { * the GCP organization. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for name to set. * @return This builder for chaining. @@ -847,10 +864,12 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { *
      * Required. The CMEK settings to update.
      * See [Enabling CMEK for Logs
-     * Router](/logging/docs/routing/managed-encryption) for more information.
+     * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
      * 
* - * .google.logging.v2.CmekSettings cmek_settings = 2; + * + * .google.logging.v2.CmekSettings cmek_settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the cmekSettings field is set. */ @@ -863,10 +882,12 @@ public boolean hasCmekSettings() { *
      * Required. The CMEK settings to update.
      * See [Enabling CMEK for Logs
-     * Router](/logging/docs/routing/managed-encryption) for more information.
+     * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
      * 
* - * .google.logging.v2.CmekSettings cmek_settings = 2; + * + * .google.logging.v2.CmekSettings cmek_settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The cmekSettings. */ @@ -885,10 +906,12 @@ public com.google.logging.v2.CmekSettings getCmekSettings() { *
      * Required. The CMEK settings to update.
      * See [Enabling CMEK for Logs
-     * Router](/logging/docs/routing/managed-encryption) for more information.
+     * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
      * 
* - * .google.logging.v2.CmekSettings cmek_settings = 2; + * + * .google.logging.v2.CmekSettings cmek_settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setCmekSettings(com.google.logging.v2.CmekSettings value) { if (cmekSettingsBuilder_ == null) { @@ -909,10 +932,12 @@ public Builder setCmekSettings(com.google.logging.v2.CmekSettings value) { *
      * Required. The CMEK settings to update.
      * See [Enabling CMEK for Logs
-     * Router](/logging/docs/routing/managed-encryption) for more information.
+     * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
      * 
* - * .google.logging.v2.CmekSettings cmek_settings = 2; + * + * .google.logging.v2.CmekSettings cmek_settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setCmekSettings(com.google.logging.v2.CmekSettings.Builder builderForValue) { if (cmekSettingsBuilder_ == null) { @@ -930,10 +955,12 @@ public Builder setCmekSettings(com.google.logging.v2.CmekSettings.Builder builde *
      * Required. The CMEK settings to update.
      * See [Enabling CMEK for Logs
-     * Router](/logging/docs/routing/managed-encryption) for more information.
+     * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
      * 
* - * .google.logging.v2.CmekSettings cmek_settings = 2; + * + * .google.logging.v2.CmekSettings cmek_settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder mergeCmekSettings(com.google.logging.v2.CmekSettings value) { if (cmekSettingsBuilder_ == null) { @@ -958,10 +985,12 @@ public Builder mergeCmekSettings(com.google.logging.v2.CmekSettings value) { *
      * Required. The CMEK settings to update.
      * See [Enabling CMEK for Logs
-     * Router](/logging/docs/routing/managed-encryption) for more information.
+     * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
      * 
* - * .google.logging.v2.CmekSettings cmek_settings = 2; + * + * .google.logging.v2.CmekSettings cmek_settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder clearCmekSettings() { if (cmekSettingsBuilder_ == null) { @@ -980,10 +1009,12 @@ public Builder clearCmekSettings() { *
      * Required. The CMEK settings to update.
      * See [Enabling CMEK for Logs
-     * Router](/logging/docs/routing/managed-encryption) for more information.
+     * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
      * 
* - * .google.logging.v2.CmekSettings cmek_settings = 2; + * + * .google.logging.v2.CmekSettings cmek_settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.logging.v2.CmekSettings.Builder getCmekSettingsBuilder() { @@ -996,10 +1027,12 @@ public com.google.logging.v2.CmekSettings.Builder getCmekSettingsBuilder() { *
      * Required. The CMEK settings to update.
      * See [Enabling CMEK for Logs
-     * Router](/logging/docs/routing/managed-encryption) for more information.
+     * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
      * 
* - * .google.logging.v2.CmekSettings cmek_settings = 2; + * + * .google.logging.v2.CmekSettings cmek_settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.logging.v2.CmekSettingsOrBuilder getCmekSettingsOrBuilder() { if (cmekSettingsBuilder_ != null) { @@ -1016,10 +1049,12 @@ public com.google.logging.v2.CmekSettingsOrBuilder getCmekSettingsOrBuilder() { *
      * Required. The CMEK settings to update.
      * See [Enabling CMEK for Logs
-     * Router](/logging/docs/routing/managed-encryption) for more information.
+     * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
      * 
* - * .google.logging.v2.CmekSettings cmek_settings = 2; + * + * .google.logging.v2.CmekSettings cmek_settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.logging.v2.CmekSettings, @@ -1055,7 +1090,8 @@ public com.google.logging.v2.CmekSettingsOrBuilder getCmekSettingsOrBuilder() { * Example: `"updateMask=kmsKeyName"` * * - * .google.protobuf.FieldMask update_mask = 3; + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the updateMask field is set. */ @@ -1073,7 +1109,8 @@ public boolean hasUpdateMask() { * Example: `"updateMask=kmsKeyName"` * * - * .google.protobuf.FieldMask update_mask = 3; + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The updateMask. */ @@ -1097,7 +1134,8 @@ public com.google.protobuf.FieldMask getUpdateMask() { * Example: `"updateMask=kmsKeyName"` * * - * .google.protobuf.FieldMask update_mask = 3; + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { if (updateMaskBuilder_ == null) { @@ -1123,7 +1161,8 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { * Example: `"updateMask=kmsKeyName"` * * - * .google.protobuf.FieldMask update_mask = 3; + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { if (updateMaskBuilder_ == null) { @@ -1146,7 +1185,8 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal * Example: `"updateMask=kmsKeyName"` * * - * .google.protobuf.FieldMask update_mask = 3; + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { if (updateMaskBuilder_ == null) { @@ -1174,7 +1214,8 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { * Example: `"updateMask=kmsKeyName"` * * - * .google.protobuf.FieldMask update_mask = 3; + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearUpdateMask() { if (updateMaskBuilder_ == null) { @@ -1198,7 +1239,8 @@ public Builder clearUpdateMask() { * Example: `"updateMask=kmsKeyName"` * * - * .google.protobuf.FieldMask update_mask = 3; + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { @@ -1216,7 +1258,8 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { * Example: `"updateMask=kmsKeyName"` * * - * .google.protobuf.FieldMask update_mask = 3; + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { if (updateMaskBuilder_ != null) { @@ -1238,7 +1281,8 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * Example: `"updateMask=kmsKeyName"` * * - * .google.protobuf.FieldMask update_mask = 3; + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.FieldMask, diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateCmekSettingsRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateCmekSettingsRequestOrBuilder.java index e591e670b..e1443bbe3 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateCmekSettingsRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateCmekSettingsRequestOrBuilder.java @@ -38,7 +38,7 @@ public interface UpdateCmekSettingsRequestOrBuilder * the GCP organization. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The name. */ @@ -58,7 +58,7 @@ public interface UpdateCmekSettingsRequestOrBuilder * the GCP organization. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for name. */ @@ -70,10 +70,12 @@ public interface UpdateCmekSettingsRequestOrBuilder *
    * Required. The CMEK settings to update.
    * See [Enabling CMEK for Logs
-   * Router](/logging/docs/routing/managed-encryption) for more information.
+   * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
    * 
* - * .google.logging.v2.CmekSettings cmek_settings = 2; + * + * .google.logging.v2.CmekSettings cmek_settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the cmekSettings field is set. */ @@ -84,10 +86,12 @@ public interface UpdateCmekSettingsRequestOrBuilder *
    * Required. The CMEK settings to update.
    * See [Enabling CMEK for Logs
-   * Router](/logging/docs/routing/managed-encryption) for more information.
+   * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
    * 
* - * .google.logging.v2.CmekSettings cmek_settings = 2; + * + * .google.logging.v2.CmekSettings cmek_settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The cmekSettings. */ @@ -98,10 +102,12 @@ public interface UpdateCmekSettingsRequestOrBuilder *
    * Required. The CMEK settings to update.
    * See [Enabling CMEK for Logs
-   * Router](/logging/docs/routing/managed-encryption) for more information.
+   * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
    * 
* - * .google.logging.v2.CmekSettings cmek_settings = 2; + * + * .google.logging.v2.CmekSettings cmek_settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ com.google.logging.v2.CmekSettingsOrBuilder getCmekSettingsOrBuilder(); @@ -116,7 +122,8 @@ public interface UpdateCmekSettingsRequestOrBuilder * Example: `"updateMask=kmsKeyName"` * * - * .google.protobuf.FieldMask update_mask = 3; + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the updateMask field is set. */ @@ -132,7 +139,8 @@ public interface UpdateCmekSettingsRequestOrBuilder * Example: `"updateMask=kmsKeyName"` * * - * .google.protobuf.FieldMask update_mask = 3; + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The updateMask. */ @@ -148,7 +156,8 @@ public interface UpdateCmekSettingsRequestOrBuilder * Example: `"updateMask=kmsKeyName"` * * - * .google.protobuf.FieldMask update_mask = 3; + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); } diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateExclusionRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateExclusionRequest.java index e128c84b6..568936f86 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateExclusionRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateExclusionRequest.java @@ -161,6 +161,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -190,6 +191,7 @@ public java.lang.String getName() { * * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -208,8 +210,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * Required. New values for the existing exclusion. Only the fields specified
-   * in `update_mask` are relevant.
+   * Required. New values for the existing exclusion. Only the fields specified in
+   * `update_mask` are relevant.
    * 
* * .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -217,6 +219,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * @return Whether the exclusion field is set. */ + @java.lang.Override public boolean hasExclusion() { return exclusion_ != null; } @@ -224,8 +227,8 @@ public boolean hasExclusion() { * * *
-   * Required. New values for the existing exclusion. Only the fields specified
-   * in `update_mask` are relevant.
+   * Required. New values for the existing exclusion. Only the fields specified in
+   * `update_mask` are relevant.
    * 
* * .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -233,6 +236,7 @@ public boolean hasExclusion() { * * @return The exclusion. */ + @java.lang.Override public com.google.logging.v2.LogExclusion getExclusion() { return exclusion_ == null ? com.google.logging.v2.LogExclusion.getDefaultInstance() @@ -242,13 +246,14 @@ public com.google.logging.v2.LogExclusion getExclusion() { * * *
-   * Required. New values for the existing exclusion. Only the fields specified
-   * in `update_mask` are relevant.
+   * Required. New values for the existing exclusion. Only the fields specified in
+   * `update_mask` are relevant.
    * 
* * .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.logging.v2.LogExclusionOrBuilder getExclusionOrBuilder() { return getExclusion(); } @@ -259,8 +264,8 @@ public com.google.logging.v2.LogExclusionOrBuilder getExclusionOrBuilder() { * * *
-   * Required. A non-empty list of fields to change in the existing exclusion.
-   * New values for the fields are taken from the corresponding fields in the
+   * Required. A non-empty list of fields to change in the existing exclusion. New values
+   * for the fields are taken from the corresponding fields in the
    * [LogExclusion][google.logging.v2.LogExclusion] included in this request. Fields not mentioned in
    * `update_mask` are not changed and are ignored in the request.
    * For example, to change the filter and description of an exclusion,
@@ -272,6 +277,7 @@ public com.google.logging.v2.LogExclusionOrBuilder getExclusionOrBuilder() {
    *
    * @return Whether the updateMask field is set.
    */
+  @java.lang.Override
   public boolean hasUpdateMask() {
     return updateMask_ != null;
   }
@@ -279,8 +285,8 @@ public boolean hasUpdateMask() {
    *
    *
    * 
-   * Required. A non-empty list of fields to change in the existing exclusion.
-   * New values for the fields are taken from the corresponding fields in the
+   * Required. A non-empty list of fields to change in the existing exclusion. New values
+   * for the fields are taken from the corresponding fields in the
    * [LogExclusion][google.logging.v2.LogExclusion] included in this request. Fields not mentioned in
    * `update_mask` are not changed and are ignored in the request.
    * For example, to change the filter and description of an exclusion,
@@ -292,6 +298,7 @@ public boolean hasUpdateMask() {
    *
    * @return The updateMask.
    */
+  @java.lang.Override
   public com.google.protobuf.FieldMask getUpdateMask() {
     return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_;
   }
@@ -299,8 +306,8 @@ public com.google.protobuf.FieldMask getUpdateMask() {
    *
    *
    * 
-   * Required. A non-empty list of fields to change in the existing exclusion.
-   * New values for the fields are taken from the corresponding fields in the
+   * Required. A non-empty list of fields to change in the existing exclusion. New values
+   * for the fields are taken from the corresponding fields in the
    * [LogExclusion][google.logging.v2.LogExclusion] included in this request. Fields not mentioned in
    * `update_mask` are not changed and are ignored in the request.
    * For example, to change the filter and description of an exclusion,
@@ -310,6 +317,7 @@ public com.google.protobuf.FieldMask getUpdateMask() {
    * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED];
    * 
    */
+  @java.lang.Override
   public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() {
     return getUpdateMask();
   }
@@ -837,8 +845,8 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) {
      *
      *
      * 
-     * Required. New values for the existing exclusion. Only the fields specified
-     * in `update_mask` are relevant.
+     * Required. New values for the existing exclusion. Only the fields specified in
+     * `update_mask` are relevant.
      * 
* * @@ -854,8 +862,8 @@ public boolean hasExclusion() { * * *
-     * Required. New values for the existing exclusion. Only the fields specified
-     * in `update_mask` are relevant.
+     * Required. New values for the existing exclusion. Only the fields specified in
+     * `update_mask` are relevant.
      * 
* * @@ -877,8 +885,8 @@ public com.google.logging.v2.LogExclusion getExclusion() { * * *
-     * Required. New values for the existing exclusion. Only the fields specified
-     * in `update_mask` are relevant.
+     * Required. New values for the existing exclusion. Only the fields specified in
+     * `update_mask` are relevant.
      * 
* * @@ -902,8 +910,8 @@ public Builder setExclusion(com.google.logging.v2.LogExclusion value) { * * *
-     * Required. New values for the existing exclusion. Only the fields specified
-     * in `update_mask` are relevant.
+     * Required. New values for the existing exclusion. Only the fields specified in
+     * `update_mask` are relevant.
      * 
* * @@ -924,8 +932,8 @@ public Builder setExclusion(com.google.logging.v2.LogExclusion.Builder builderFo * * *
-     * Required. New values for the existing exclusion. Only the fields specified
-     * in `update_mask` are relevant.
+     * Required. New values for the existing exclusion. Only the fields specified in
+     * `update_mask` are relevant.
      * 
* * @@ -953,8 +961,8 @@ public Builder mergeExclusion(com.google.logging.v2.LogExclusion value) { * * *
-     * Required. New values for the existing exclusion. Only the fields specified
-     * in `update_mask` are relevant.
+     * Required. New values for the existing exclusion. Only the fields specified in
+     * `update_mask` are relevant.
      * 
* * @@ -976,8 +984,8 @@ public Builder clearExclusion() { * * *
-     * Required. New values for the existing exclusion. Only the fields specified
-     * in `update_mask` are relevant.
+     * Required. New values for the existing exclusion. Only the fields specified in
+     * `update_mask` are relevant.
      * 
* * @@ -993,8 +1001,8 @@ public com.google.logging.v2.LogExclusion.Builder getExclusionBuilder() { * * *
-     * Required. New values for the existing exclusion. Only the fields specified
-     * in `update_mask` are relevant.
+     * Required. New values for the existing exclusion. Only the fields specified in
+     * `update_mask` are relevant.
      * 
* * @@ -1014,8 +1022,8 @@ public com.google.logging.v2.LogExclusionOrBuilder getExclusionOrBuilder() { * * *
-     * Required. New values for the existing exclusion. Only the fields specified
-     * in `update_mask` are relevant.
+     * Required. New values for the existing exclusion. Only the fields specified in
+     * `update_mask` are relevant.
      * 
* * @@ -1049,8 +1057,8 @@ public com.google.logging.v2.LogExclusionOrBuilder getExclusionOrBuilder() { * * *
-     * Required. A non-empty list of fields to change in the existing exclusion.
-     * New values for the fields are taken from the corresponding fields in the
+     * Required. A non-empty list of fields to change in the existing exclusion. New values
+     * for the fields are taken from the corresponding fields in the
      * [LogExclusion][google.logging.v2.LogExclusion] included in this request. Fields not mentioned in
      * `update_mask` are not changed and are ignored in the request.
      * For example, to change the filter and description of an exclusion,
@@ -1069,8 +1077,8 @@ public boolean hasUpdateMask() {
      *
      *
      * 
-     * Required. A non-empty list of fields to change in the existing exclusion.
-     * New values for the fields are taken from the corresponding fields in the
+     * Required. A non-empty list of fields to change in the existing exclusion. New values
+     * for the fields are taken from the corresponding fields in the
      * [LogExclusion][google.logging.v2.LogExclusion] included in this request. Fields not mentioned in
      * `update_mask` are not changed and are ignored in the request.
      * For example, to change the filter and description of an exclusion,
@@ -1095,8 +1103,8 @@ public com.google.protobuf.FieldMask getUpdateMask() {
      *
      *
      * 
-     * Required. A non-empty list of fields to change in the existing exclusion.
-     * New values for the fields are taken from the corresponding fields in the
+     * Required. A non-empty list of fields to change in the existing exclusion. New values
+     * for the fields are taken from the corresponding fields in the
      * [LogExclusion][google.logging.v2.LogExclusion] included in this request. Fields not mentioned in
      * `update_mask` are not changed and are ignored in the request.
      * For example, to change the filter and description of an exclusion,
@@ -1123,8 +1131,8 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) {
      *
      *
      * 
-     * Required. A non-empty list of fields to change in the existing exclusion.
-     * New values for the fields are taken from the corresponding fields in the
+     * Required. A non-empty list of fields to change in the existing exclusion. New values
+     * for the fields are taken from the corresponding fields in the
      * [LogExclusion][google.logging.v2.LogExclusion] included in this request. Fields not mentioned in
      * `update_mask` are not changed and are ignored in the request.
      * For example, to change the filter and description of an exclusion,
@@ -1148,8 +1156,8 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal
      *
      *
      * 
-     * Required. A non-empty list of fields to change in the existing exclusion.
-     * New values for the fields are taken from the corresponding fields in the
+     * Required. A non-empty list of fields to change in the existing exclusion. New values
+     * for the fields are taken from the corresponding fields in the
      * [LogExclusion][google.logging.v2.LogExclusion] included in this request. Fields not mentioned in
      * `update_mask` are not changed and are ignored in the request.
      * For example, to change the filter and description of an exclusion,
@@ -1178,8 +1186,8 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) {
      *
      *
      * 
-     * Required. A non-empty list of fields to change in the existing exclusion.
-     * New values for the fields are taken from the corresponding fields in the
+     * Required. A non-empty list of fields to change in the existing exclusion. New values
+     * for the fields are taken from the corresponding fields in the
      * [LogExclusion][google.logging.v2.LogExclusion] included in this request. Fields not mentioned in
      * `update_mask` are not changed and are ignored in the request.
      * For example, to change the filter and description of an exclusion,
@@ -1204,8 +1212,8 @@ public Builder clearUpdateMask() {
      *
      *
      * 
-     * Required. A non-empty list of fields to change in the existing exclusion.
-     * New values for the fields are taken from the corresponding fields in the
+     * Required. A non-empty list of fields to change in the existing exclusion. New values
+     * for the fields are taken from the corresponding fields in the
      * [LogExclusion][google.logging.v2.LogExclusion] included in this request. Fields not mentioned in
      * `update_mask` are not changed and are ignored in the request.
      * For example, to change the filter and description of an exclusion,
@@ -1224,8 +1232,8 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() {
      *
      *
      * 
-     * Required. A non-empty list of fields to change in the existing exclusion.
-     * New values for the fields are taken from the corresponding fields in the
+     * Required. A non-empty list of fields to change in the existing exclusion. New values
+     * for the fields are taken from the corresponding fields in the
      * [LogExclusion][google.logging.v2.LogExclusion] included in this request. Fields not mentioned in
      * `update_mask` are not changed and are ignored in the request.
      * For example, to change the filter and description of an exclusion,
@@ -1248,8 +1256,8 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() {
      *
      *
      * 
-     * Required. A non-empty list of fields to change in the existing exclusion.
-     * New values for the fields are taken from the corresponding fields in the
+     * Required. A non-empty list of fields to change in the existing exclusion. New values
+     * for the fields are taken from the corresponding fields in the
      * [LogExclusion][google.logging.v2.LogExclusion] included in this request. Fields not mentioned in
      * `update_mask` are not changed and are ignored in the request.
      * For example, to change the filter and description of an exclusion,
diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateExclusionRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateExclusionRequestOrBuilder.java
index b2e175355..01bc7fd79 100644
--- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateExclusionRequestOrBuilder.java
+++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateExclusionRequestOrBuilder.java
@@ -66,8 +66,8 @@ public interface UpdateExclusionRequestOrBuilder
    *
    *
    * 
-   * Required. New values for the existing exclusion. Only the fields specified
-   * in `update_mask` are relevant.
+   * Required. New values for the existing exclusion. Only the fields specified in
+   * `update_mask` are relevant.
    * 
* * .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -80,8 +80,8 @@ public interface UpdateExclusionRequestOrBuilder * * *
-   * Required. New values for the existing exclusion. Only the fields specified
-   * in `update_mask` are relevant.
+   * Required. New values for the existing exclusion. Only the fields specified in
+   * `update_mask` are relevant.
    * 
* * .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -94,8 +94,8 @@ public interface UpdateExclusionRequestOrBuilder * * *
-   * Required. New values for the existing exclusion. Only the fields specified
-   * in `update_mask` are relevant.
+   * Required. New values for the existing exclusion. Only the fields specified in
+   * `update_mask` are relevant.
    * 
* * .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -107,8 +107,8 @@ public interface UpdateExclusionRequestOrBuilder * * *
-   * Required. A non-empty list of fields to change in the existing exclusion.
-   * New values for the fields are taken from the corresponding fields in the
+   * Required. A non-empty list of fields to change in the existing exclusion. New values
+   * for the fields are taken from the corresponding fields in the
    * [LogExclusion][google.logging.v2.LogExclusion] included in this request. Fields not mentioned in
    * `update_mask` are not changed and are ignored in the request.
    * For example, to change the filter and description of an exclusion,
@@ -125,8 +125,8 @@ public interface UpdateExclusionRequestOrBuilder
    *
    *
    * 
-   * Required. A non-empty list of fields to change in the existing exclusion.
-   * New values for the fields are taken from the corresponding fields in the
+   * Required. A non-empty list of fields to change in the existing exclusion. New values
+   * for the fields are taken from the corresponding fields in the
    * [LogExclusion][google.logging.v2.LogExclusion] included in this request. Fields not mentioned in
    * `update_mask` are not changed and are ignored in the request.
    * For example, to change the filter and description of an exclusion,
@@ -143,8 +143,8 @@ public interface UpdateExclusionRequestOrBuilder
    *
    *
    * 
-   * Required. A non-empty list of fields to change in the existing exclusion.
-   * New values for the fields are taken from the corresponding fields in the
+   * Required. A non-empty list of fields to change in the existing exclusion. New values
+   * for the fields are taken from the corresponding fields in the
    * [LogExclusion][google.logging.v2.LogExclusion] included in this request. Fields not mentioned in
    * `update_mask` are not changed and are ignored in the request.
    * For example, to change the filter and description of an exclusion,
diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateLogMetricRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateLogMetricRequest.java
index b096aabe2..188a0144f 100644
--- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateLogMetricRequest.java
+++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateLogMetricRequest.java
@@ -145,6 +145,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    * @return The metricName.
    */
+  @java.lang.Override
   public java.lang.String getMetricName() {
     java.lang.Object ref = metricName_;
     if (ref instanceof java.lang.String) {
@@ -173,6 +174,7 @@ public java.lang.String getMetricName() {
    *
    * @return The bytes for metricName.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getMetricNameBytes() {
     java.lang.Object ref = metricName_;
     if (ref instanceof java.lang.String) {
@@ -198,6 +200,7 @@ public com.google.protobuf.ByteString getMetricNameBytes() {
    *
    * @return Whether the metric field is set.
    */
+  @java.lang.Override
   public boolean hasMetric() {
     return metric_ != null;
   }
@@ -212,6 +215,7 @@ public boolean hasMetric() {
    *
    * @return The metric.
    */
+  @java.lang.Override
   public com.google.logging.v2.LogMetric getMetric() {
     return metric_ == null ? com.google.logging.v2.LogMetric.getDefaultInstance() : metric_;
   }
@@ -224,6 +228,7 @@ public com.google.logging.v2.LogMetric getMetric() {
    *
    * .google.logging.v2.LogMetric metric = 2 [(.google.api.field_behavior) = REQUIRED];
    */
+  @java.lang.Override
   public com.google.logging.v2.LogMetricOrBuilder getMetricOrBuilder() {
     return getMetric();
   }
diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSinkRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSinkRequest.java
index 07c0de1dd..fbcfbb1bd 100644
--- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSinkRequest.java
+++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSinkRequest.java
@@ -151,8 +151,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    *
    * 
-   * Required. The full resource name of the sink to update, including the
-   * parent resource and the sink identifier:
+   * Required. The full resource name of the sink to update, including the parent
+   * resource and the sink identifier:
    *     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
    *     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
    *     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
@@ -166,6 +166,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    * @return The sinkName.
    */
+  @java.lang.Override
   public java.lang.String getSinkName() {
     java.lang.Object ref = sinkName_;
     if (ref instanceof java.lang.String) {
@@ -181,8 +182,8 @@ public java.lang.String getSinkName() {
    *
    *
    * 
-   * Required. The full resource name of the sink to update, including the
-   * parent resource and the sink identifier:
+   * Required. The full resource name of the sink to update, including the parent
+   * resource and the sink identifier:
    *     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
    *     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
    *     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
@@ -196,6 +197,7 @@ public java.lang.String getSinkName() {
    *
    * @return The bytes for sinkName.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getSinkNameBytes() {
     java.lang.Object ref = sinkName_;
     if (ref instanceof java.lang.String) {
@@ -214,14 +216,15 @@ public com.google.protobuf.ByteString getSinkNameBytes() {
    *
    *
    * 
-   * Required. The updated sink, whose name is the same identifier that appears
-   * as part of `sink_name`.
+   * Required. The updated sink, whose name is the same identifier that appears as part
+   * of `sink_name`.
    * 
* * .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the sink field is set. */ + @java.lang.Override public boolean hasSink() { return sink_ != null; } @@ -229,14 +232,15 @@ public boolean hasSink() { * * *
-   * Required. The updated sink, whose name is the same identifier that appears
-   * as part of `sink_name`.
+   * Required. The updated sink, whose name is the same identifier that appears as part
+   * of `sink_name`.
    * 
* * .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The sink. */ + @java.lang.Override public com.google.logging.v2.LogSink getSink() { return sink_ == null ? com.google.logging.v2.LogSink.getDefaultInstance() : sink_; } @@ -244,12 +248,13 @@ public com.google.logging.v2.LogSink getSink() { * * *
-   * Required. The updated sink, whose name is the same identifier that appears
-   * as part of `sink_name`.
+   * Required. The updated sink, whose name is the same identifier that appears as part
+   * of `sink_name`.
    * 
* * .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; */ + @java.lang.Override public com.google.logging.v2.LogSinkOrBuilder getSinkOrBuilder() { return getSink(); } @@ -272,10 +277,11 @@ public com.google.logging.v2.LogSinkOrBuilder getSinkOrBuilder() { * set to false or defaulted to false. *
* - * bool unique_writer_identity = 3; + * bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The uniqueWriterIdentity. */ + @java.lang.Override public boolean getUniqueWriterIdentity() { return uniqueWriterIdentity_; } @@ -299,10 +305,12 @@ public boolean getUniqueWriterIdentity() { * Example: `updateMask=filter`. *
* - * .google.protobuf.FieldMask update_mask = 4; + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the updateMask field is set. */ + @java.lang.Override public boolean hasUpdateMask() { return updateMask_ != null; } @@ -323,10 +331,12 @@ public boolean hasUpdateMask() { * Example: `updateMask=filter`. *
* - * .google.protobuf.FieldMask update_mask = 4; + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The updateMask. */ + @java.lang.Override public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } @@ -347,8 +357,10 @@ public com.google.protobuf.FieldMask getUpdateMask() { * Example: `updateMask=filter`. *
* - * .google.protobuf.FieldMask update_mask = 4; + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ + @java.lang.Override public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { return getUpdateMask(); } @@ -744,8 +756,8 @@ public Builder mergeFrom( * * *
-     * Required. The full resource name of the sink to update, including the
-     * parent resource and the sink identifier:
+     * Required. The full resource name of the sink to update, including the parent
+     * resource and the sink identifier:
      *     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
      *     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
      *     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
@@ -774,8 +786,8 @@ public java.lang.String getSinkName() {
      *
      *
      * 
-     * Required. The full resource name of the sink to update, including the
-     * parent resource and the sink identifier:
+     * Required. The full resource name of the sink to update, including the parent
+     * resource and the sink identifier:
      *     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
      *     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
      *     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
@@ -804,8 +816,8 @@ public com.google.protobuf.ByteString getSinkNameBytes() {
      *
      *
      * 
-     * Required. The full resource name of the sink to update, including the
-     * parent resource and the sink identifier:
+     * Required. The full resource name of the sink to update, including the parent
+     * resource and the sink identifier:
      *     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
      *     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
      *     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
@@ -833,8 +845,8 @@ public Builder setSinkName(java.lang.String value) {
      *
      *
      * 
-     * Required. The full resource name of the sink to update, including the
-     * parent resource and the sink identifier:
+     * Required. The full resource name of the sink to update, including the parent
+     * resource and the sink identifier:
      *     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
      *     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
      *     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
@@ -858,8 +870,8 @@ public Builder clearSinkName() {
      *
      *
      * 
-     * Required. The full resource name of the sink to update, including the
-     * parent resource and the sink identifier:
+     * Required. The full resource name of the sink to update, including the parent
+     * resource and the sink identifier:
      *     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
      *     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
      *     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
@@ -895,8 +907,8 @@ public Builder setSinkNameBytes(com.google.protobuf.ByteString value) {
      *
      *
      * 
-     * Required. The updated sink, whose name is the same identifier that appears
-     * as part of `sink_name`.
+     * Required. The updated sink, whose name is the same identifier that appears as part
+     * of `sink_name`.
      * 
* * .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -910,8 +922,8 @@ public boolean hasSink() { * * *
-     * Required. The updated sink, whose name is the same identifier that appears
-     * as part of `sink_name`.
+     * Required. The updated sink, whose name is the same identifier that appears as part
+     * of `sink_name`.
      * 
* * .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -929,8 +941,8 @@ public com.google.logging.v2.LogSink getSink() { * * *
-     * Required. The updated sink, whose name is the same identifier that appears
-     * as part of `sink_name`.
+     * Required. The updated sink, whose name is the same identifier that appears as part
+     * of `sink_name`.
      * 
* * .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -952,8 +964,8 @@ public Builder setSink(com.google.logging.v2.LogSink value) { * * *
-     * Required. The updated sink, whose name is the same identifier that appears
-     * as part of `sink_name`.
+     * Required. The updated sink, whose name is the same identifier that appears as part
+     * of `sink_name`.
      * 
* * .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -972,8 +984,8 @@ public Builder setSink(com.google.logging.v2.LogSink.Builder builderForValue) { * * *
-     * Required. The updated sink, whose name is the same identifier that appears
-     * as part of `sink_name`.
+     * Required. The updated sink, whose name is the same identifier that appears as part
+     * of `sink_name`.
      * 
* * .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -996,8 +1008,8 @@ public Builder mergeSink(com.google.logging.v2.LogSink value) { * * *
-     * Required. The updated sink, whose name is the same identifier that appears
-     * as part of `sink_name`.
+     * Required. The updated sink, whose name is the same identifier that appears as part
+     * of `sink_name`.
      * 
* * .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1017,8 +1029,8 @@ public Builder clearSink() { * * *
-     * Required. The updated sink, whose name is the same identifier that appears
-     * as part of `sink_name`.
+     * Required. The updated sink, whose name is the same identifier that appears as part
+     * of `sink_name`.
      * 
* * .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1032,8 +1044,8 @@ public com.google.logging.v2.LogSink.Builder getSinkBuilder() { * * *
-     * Required. The updated sink, whose name is the same identifier that appears
-     * as part of `sink_name`.
+     * Required. The updated sink, whose name is the same identifier that appears as part
+     * of `sink_name`.
      * 
* * .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1049,8 +1061,8 @@ public com.google.logging.v2.LogSinkOrBuilder getSinkOrBuilder() { * * *
-     * Required. The updated sink, whose name is the same identifier that appears
-     * as part of `sink_name`.
+     * Required. The updated sink, whose name is the same identifier that appears as part
+     * of `sink_name`.
      * 
* * .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1089,10 +1101,11 @@ public com.google.logging.v2.LogSinkOrBuilder getSinkOrBuilder() { * set to false or defaulted to false. *
* - * bool unique_writer_identity = 3; + * bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The uniqueWriterIdentity. */ + @java.lang.Override public boolean getUniqueWriterIdentity() { return uniqueWriterIdentity_; } @@ -1112,7 +1125,7 @@ public boolean getUniqueWriterIdentity() { * set to false or defaulted to false. *
* - * bool unique_writer_identity = 3; + * bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The uniqueWriterIdentity to set. * @return This builder for chaining. @@ -1139,7 +1152,7 @@ public Builder setUniqueWriterIdentity(boolean value) { * set to false or defaulted to false. *
* - * bool unique_writer_identity = 3; + * bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1173,7 +1186,8 @@ public Builder clearUniqueWriterIdentity() { * Example: `updateMask=filter`. *
* - * .google.protobuf.FieldMask update_mask = 4; + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the updateMask field is set. */ @@ -1197,7 +1211,8 @@ public boolean hasUpdateMask() { * Example: `updateMask=filter`. *
* - * .google.protobuf.FieldMask update_mask = 4; + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The updateMask. */ @@ -1227,7 +1242,8 @@ public com.google.protobuf.FieldMask getUpdateMask() { * Example: `updateMask=filter`. *
* - * .google.protobuf.FieldMask update_mask = 4; + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { if (updateMaskBuilder_ == null) { @@ -1259,7 +1275,8 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { * Example: `updateMask=filter`. *
* - * .google.protobuf.FieldMask update_mask = 4; + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { if (updateMaskBuilder_ == null) { @@ -1288,7 +1305,8 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal * Example: `updateMask=filter`. *
* - * .google.protobuf.FieldMask update_mask = 4; + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { if (updateMaskBuilder_ == null) { @@ -1322,7 +1340,8 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { * Example: `updateMask=filter`. *
* - * .google.protobuf.FieldMask update_mask = 4; + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearUpdateMask() { if (updateMaskBuilder_ == null) { @@ -1352,7 +1371,8 @@ public Builder clearUpdateMask() { * Example: `updateMask=filter`. *
* - * .google.protobuf.FieldMask update_mask = 4; + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { @@ -1376,7 +1396,8 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { * Example: `updateMask=filter`. *
* - * .google.protobuf.FieldMask update_mask = 4; + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { if (updateMaskBuilder_ != null) { @@ -1404,7 +1425,8 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * Example: `updateMask=filter`. *
* - * .google.protobuf.FieldMask update_mask = 4; + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.FieldMask, diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSinkRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSinkRequestOrBuilder.java index 62475f8dc..dce77c709 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSinkRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSinkRequestOrBuilder.java @@ -27,8 +27,8 @@ public interface UpdateSinkRequestOrBuilder * * *
-   * Required. The full resource name of the sink to update, including the
-   * parent resource and the sink identifier:
+   * Required. The full resource name of the sink to update, including the parent
+   * resource and the sink identifier:
    *     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
    *     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
    *     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
@@ -47,8 +47,8 @@ public interface UpdateSinkRequestOrBuilder
    *
    *
    * 
-   * Required. The full resource name of the sink to update, including the
-   * parent resource and the sink identifier:
+   * Required. The full resource name of the sink to update, including the parent
+   * resource and the sink identifier:
    *     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
    *     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
    *     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
@@ -68,8 +68,8 @@ public interface UpdateSinkRequestOrBuilder
    *
    *
    * 
-   * Required. The updated sink, whose name is the same identifier that appears
-   * as part of `sink_name`.
+   * Required. The updated sink, whose name is the same identifier that appears as part
+   * of `sink_name`.
    * 
* * .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -81,8 +81,8 @@ public interface UpdateSinkRequestOrBuilder * * *
-   * Required. The updated sink, whose name is the same identifier that appears
-   * as part of `sink_name`.
+   * Required. The updated sink, whose name is the same identifier that appears as part
+   * of `sink_name`.
    * 
* * .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -94,8 +94,8 @@ public interface UpdateSinkRequestOrBuilder * * *
-   * Required. The updated sink, whose name is the same identifier that appears
-   * as part of `sink_name`.
+   * Required. The updated sink, whose name is the same identifier that appears as part
+   * of `sink_name`.
    * 
* * .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -118,7 +118,7 @@ public interface UpdateSinkRequestOrBuilder * set to false or defaulted to false. *
* - * bool unique_writer_identity = 3; + * bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The uniqueWriterIdentity. */ @@ -141,7 +141,8 @@ public interface UpdateSinkRequestOrBuilder * Example: `updateMask=filter`. *
* - * .google.protobuf.FieldMask update_mask = 4; + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the updateMask field is set. */ @@ -163,7 +164,8 @@ public interface UpdateSinkRequestOrBuilder * Example: `updateMask=filter`. *
* - * .google.protobuf.FieldMask update_mask = 4; + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The updateMask. */ @@ -185,7 +187,8 @@ public interface UpdateSinkRequestOrBuilder * Example: `updateMask=filter`. *
* - * .google.protobuf.FieldMask update_mask = 4; + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); } diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesPartialErrors.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesPartialErrors.java index 0b667346e..862dc9917 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesPartialErrors.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesPartialErrors.java @@ -174,11 +174,13 @@ public int getLogEntryErrorsCount() { * * map<int32, .google.rpc.Status> log_entry_errors = 1; */ + @java.lang.Override public boolean containsLogEntryErrors(int key) { return internalGetLogEntryErrors().getMap().containsKey(key); } /** Use {@link #getLogEntryErrorsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLogEntryErrors() { return getLogEntryErrorsMap(); @@ -196,6 +198,7 @@ public java.util.Map getLogEntryErrors * * map<int32, .google.rpc.Status> log_entry_errors = 1; */ + @java.lang.Override public java.util.Map getLogEntryErrorsMap() { return internalGetLogEntryErrors().getMap(); } @@ -212,6 +215,7 @@ public java.util.Map getLogEntryErrors * * map<int32, .google.rpc.Status> log_entry_errors = 1; */ + @java.lang.Override public com.google.rpc.Status getLogEntryErrorsOrDefault( int key, com.google.rpc.Status defaultValue) { @@ -232,6 +236,7 @@ public com.google.rpc.Status getLogEntryErrorsOrDefault( * * map<int32, .google.rpc.Status> log_entry_errors = 1; */ + @java.lang.Override public com.google.rpc.Status getLogEntryErrorsOrThrow(int key) { java.util.Map map = @@ -629,11 +634,13 @@ public int getLogEntryErrorsCount() { * * map<int32, .google.rpc.Status> log_entry_errors = 1; */ + @java.lang.Override public boolean containsLogEntryErrors(int key) { return internalGetLogEntryErrors().getMap().containsKey(key); } /** Use {@link #getLogEntryErrorsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLogEntryErrors() { return getLogEntryErrorsMap(); @@ -651,6 +658,7 @@ public java.util.Map getLogEntryErrors * * map<int32, .google.rpc.Status> log_entry_errors = 1; */ + @java.lang.Override public java.util.Map getLogEntryErrorsMap() { return internalGetLogEntryErrors().getMap(); } @@ -667,6 +675,7 @@ public java.util.Map getLogEntryErrors * * map<int32, .google.rpc.Status> log_entry_errors = 1; */ + @java.lang.Override public com.google.rpc.Status getLogEntryErrorsOrDefault( int key, com.google.rpc.Status defaultValue) { @@ -687,6 +696,7 @@ public com.google.rpc.Status getLogEntryErrorsOrDefault( * * map<int32, .google.rpc.Status> log_entry_errors = 1; */ + @java.lang.Override public com.google.rpc.Status getLogEntryErrorsOrThrow(int key) { java.util.Map map = diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequest.java index 3466a8465..edb57aeb8 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequest.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequest.java @@ -190,16 +190,19 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { * `[LOG_ID]` must be URL-encoded. For example: * "projects/my-project-id/logs/syslog" * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" - * The permission <code>logging.logEntries.create</code> is needed on each - * project, organization, billing account, or folder that is receiving - * new log entries, whether the resource is specified in - * <code>logName</code> or in an individual log entry. + * The permission `logging.logEntries.create` is needed on each project, + * organization, billing account, or folder that is receiving new log + * entries, whether the resource is specified in `logName` or in an + * individual log entry. *
* - * string log_name = 1 [(.google.api.resource_reference) = { ... } + * + * string log_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The logName. */ + @java.lang.Override public java.lang.String getLogName() { java.lang.Object ref = logName_; if (ref instanceof java.lang.String) { @@ -224,16 +227,19 @@ public java.lang.String getLogName() { * `[LOG_ID]` must be URL-encoded. For example: * "projects/my-project-id/logs/syslog" * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" - * The permission <code>logging.logEntries.create</code> is needed on each - * project, organization, billing account, or folder that is receiving - * new log entries, whether the resource is specified in - * <code>logName</code> or in an individual log entry. + * The permission `logging.logEntries.create` is needed on each project, + * organization, billing account, or folder that is receiving new log + * entries, whether the resource is specified in `logName` or in an + * individual log entry. *
* - * string log_name = 1 [(.google.api.resource_reference) = { ... } + * + * string log_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for logName. */ + @java.lang.Override public com.google.protobuf.ByteString getLogNameBytes() { java.lang.Object ref = logName_; if (ref instanceof java.lang.String) { @@ -260,10 +266,12 @@ public com.google.protobuf.ByteString getLogNameBytes() { * See [LogEntry][google.logging.v2.LogEntry]. *
* - * .google.api.MonitoredResource resource = 2; + * .google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the resource field is set. */ + @java.lang.Override public boolean hasResource() { return resource_ != null; } @@ -279,10 +287,12 @@ public boolean hasResource() { * See [LogEntry][google.logging.v2.LogEntry]. *
* - * .google.api.MonitoredResource resource = 2; + * .google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The resource. */ + @java.lang.Override public com.google.api.MonitoredResource getResource() { return resource_ == null ? com.google.api.MonitoredResource.getDefaultInstance() : resource_; } @@ -298,8 +308,10 @@ public com.google.api.MonitoredResource getResource() { * See [LogEntry][google.logging.v2.LogEntry]. * * - * .google.api.MonitoredResource resource = 2; + * .google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ + @java.lang.Override public com.google.api.MonitoredResourceOrBuilder getResourceOrBuilder() { return getResource(); } @@ -339,8 +351,9 @@ public int getLabelsCount() { * See [LogEntry][google.logging.v2.LogEntry]. * * - * map<string, string> labels = 3; + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; */ + @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -348,6 +361,7 @@ public boolean containsLabels(java.lang.String key) { return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); @@ -362,8 +376,9 @@ public java.util.Map getLabels() { * See [LogEntry][google.logging.v2.LogEntry]. * * - * map<string, string> labels = 3; + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; */ + @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } @@ -377,8 +392,9 @@ public java.util.Map getLabelsMap() { * See [LogEntry][google.logging.v2.LogEntry]. * * - * map<string, string> labels = 3; + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; */ + @java.lang.Override public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); @@ -396,8 +412,9 @@ public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.Strin * See [LogEntry][google.logging.v2.LogEntry]. * * - * map<string, string> labels = 3; + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; */ + @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -427,12 +444,12 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -441,6 +458,7 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { * repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public java.util.List getEntriesList() { return entries_; } @@ -460,12 +478,12 @@ public java.util.List getEntriesList() { * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -474,6 +492,7 @@ public java.util.List getEntriesList() { * repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public java.util.List getEntriesOrBuilderList() { return entries_; @@ -494,12 +513,12 @@ public java.util.List getEntriesList() { * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -508,6 +527,7 @@ public java.util.List getEntriesList() { * repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public int getEntriesCount() { return entries_.size(); } @@ -527,12 +547,12 @@ public int getEntriesCount() { * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -541,6 +561,7 @@ public int getEntriesCount() { * repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.logging.v2.LogEntry getEntries(int index) { return entries_.get(index); } @@ -560,12 +581,12 @@ public com.google.logging.v2.LogEntry getEntries(int index) { * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -574,6 +595,7 @@ public com.google.logging.v2.LogEntry getEntries(int index) { * repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.logging.v2.LogEntryOrBuilder getEntriesOrBuilder(int index) { return entries_.get(index); } @@ -591,10 +613,11 @@ public com.google.logging.v2.LogEntryOrBuilder getEntriesOrBuilder(int index) { * keyed by the entries' zero-based index in the `entries.write` method. * * - * bool partial_success = 5; + * bool partial_success = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The partialSuccess. */ + @java.lang.Override public boolean getPartialSuccess() { return partialSuccess_; } @@ -610,10 +633,11 @@ public boolean getPartialSuccess() { * logging API endpoints are working properly before sending valuable data. * * - * bool dry_run = 6; + * bool dry_run = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The dryRun. */ + @java.lang.Override public boolean getDryRun() { return dryRun_; } @@ -1105,13 +1129,15 @@ public Builder mergeFrom( * `[LOG_ID]` must be URL-encoded. For example: * "projects/my-project-id/logs/syslog" * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" - * The permission <code>logging.logEntries.create</code> is needed on each - * project, organization, billing account, or folder that is receiving - * new log entries, whether the resource is specified in - * <code>logName</code> or in an individual log entry. + * The permission `logging.logEntries.create` is needed on each project, + * organization, billing account, or folder that is receiving new log + * entries, whether the resource is specified in `logName` or in an + * individual log entry. * * - * string log_name = 1 [(.google.api.resource_reference) = { ... } + * + * string log_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The logName. */ @@ -1139,13 +1165,15 @@ public java.lang.String getLogName() { * `[LOG_ID]` must be URL-encoded. For example: * "projects/my-project-id/logs/syslog" * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" - * The permission <code>logging.logEntries.create</code> is needed on each - * project, organization, billing account, or folder that is receiving - * new log entries, whether the resource is specified in - * <code>logName</code> or in an individual log entry. + * The permission `logging.logEntries.create` is needed on each project, + * organization, billing account, or folder that is receiving new log + * entries, whether the resource is specified in `logName` or in an + * individual log entry. * * - * string log_name = 1 [(.google.api.resource_reference) = { ... } + * + * string log_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for logName. */ @@ -1173,13 +1201,15 @@ public com.google.protobuf.ByteString getLogNameBytes() { * `[LOG_ID]` must be URL-encoded. For example: * "projects/my-project-id/logs/syslog" * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" - * The permission <code>logging.logEntries.create</code> is needed on each - * project, organization, billing account, or folder that is receiving - * new log entries, whether the resource is specified in - * <code>logName</code> or in an individual log entry. + * The permission `logging.logEntries.create` is needed on each project, + * organization, billing account, or folder that is receiving new log + * entries, whether the resource is specified in `logName` or in an + * individual log entry. * * - * string log_name = 1 [(.google.api.resource_reference) = { ... } + * + * string log_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The logName to set. * @return This builder for chaining. @@ -1206,13 +1236,15 @@ public Builder setLogName(java.lang.String value) { * `[LOG_ID]` must be URL-encoded. For example: * "projects/my-project-id/logs/syslog" * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" - * The permission <code>logging.logEntries.create</code> is needed on each - * project, organization, billing account, or folder that is receiving - * new log entries, whether the resource is specified in - * <code>logName</code> or in an individual log entry. + * The permission `logging.logEntries.create` is needed on each project, + * organization, billing account, or folder that is receiving new log + * entries, whether the resource is specified in `logName` or in an + * individual log entry. * * - * string log_name = 1 [(.google.api.resource_reference) = { ... } + * + * string log_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -1235,13 +1267,15 @@ public Builder clearLogName() { * `[LOG_ID]` must be URL-encoded. For example: * "projects/my-project-id/logs/syslog" * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" - * The permission <code>logging.logEntries.create</code> is needed on each - * project, organization, billing account, or folder that is receiving - * new log entries, whether the resource is specified in - * <code>logName</code> or in an individual log entry. + * The permission `logging.logEntries.create` is needed on each project, + * organization, billing account, or folder that is receiving new log + * entries, whether the resource is specified in `logName` or in an + * individual log entry. * * - * string log_name = 1 [(.google.api.resource_reference) = { ... } + * + * string log_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for logName to set. * @return This builder for chaining. @@ -1275,7 +1309,8 @@ public Builder setLogNameBytes(com.google.protobuf.ByteString value) { * See [LogEntry][google.logging.v2.LogEntry]. * * - * .google.api.MonitoredResource resource = 2; + * .google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the resource field is set. */ @@ -1294,7 +1329,8 @@ public boolean hasResource() { * See [LogEntry][google.logging.v2.LogEntry]. * * - * .google.api.MonitoredResource resource = 2; + * .google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The resource. */ @@ -1319,7 +1355,8 @@ public com.google.api.MonitoredResource getResource() { * See [LogEntry][google.logging.v2.LogEntry]. * * - * .google.api.MonitoredResource resource = 2; + * .google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setResource(com.google.api.MonitoredResource value) { if (resourceBuilder_ == null) { @@ -1346,7 +1383,8 @@ public Builder setResource(com.google.api.MonitoredResource value) { * See [LogEntry][google.logging.v2.LogEntry]. * * - * .google.api.MonitoredResource resource = 2; + * .google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setResource(com.google.api.MonitoredResource.Builder builderForValue) { if (resourceBuilder_ == null) { @@ -1370,7 +1408,8 @@ public Builder setResource(com.google.api.MonitoredResource.Builder builderForVa * See [LogEntry][google.logging.v2.LogEntry]. * * - * .google.api.MonitoredResource resource = 2; + * .google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeResource(com.google.api.MonitoredResource value) { if (resourceBuilder_ == null) { @@ -1401,7 +1440,8 @@ public Builder mergeResource(com.google.api.MonitoredResource value) { * See [LogEntry][google.logging.v2.LogEntry]. * * - * .google.api.MonitoredResource resource = 2; + * .google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearResource() { if (resourceBuilder_ == null) { @@ -1426,7 +1466,8 @@ public Builder clearResource() { * See [LogEntry][google.logging.v2.LogEntry]. * * - * .google.api.MonitoredResource resource = 2; + * .google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.api.MonitoredResource.Builder getResourceBuilder() { @@ -1445,7 +1486,8 @@ public com.google.api.MonitoredResource.Builder getResourceBuilder() { * See [LogEntry][google.logging.v2.LogEntry]. * * - * .google.api.MonitoredResource resource = 2; + * .google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.api.MonitoredResourceOrBuilder getResourceOrBuilder() { if (resourceBuilder_ != null) { @@ -1468,7 +1510,8 @@ public com.google.api.MonitoredResourceOrBuilder getResourceOrBuilder() { * See [LogEntry][google.logging.v2.LogEntry]. * * - * .google.api.MonitoredResource resource = 2; + * .google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.api.MonitoredResource, @@ -1522,8 +1565,9 @@ public int getLabelsCount() { * See [LogEntry][google.logging.v2.LogEntry]. * * - * map<string, string> labels = 3; + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; */ + @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1531,6 +1575,7 @@ public boolean containsLabels(java.lang.String key) { return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); @@ -1545,8 +1590,9 @@ public java.util.Map getLabels() { * See [LogEntry][google.logging.v2.LogEntry]. * * - * map<string, string> labels = 3; + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; */ + @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } @@ -1560,8 +1606,9 @@ public java.util.Map getLabelsMap() { * See [LogEntry][google.logging.v2.LogEntry]. * * - * map<string, string> labels = 3; + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; */ + @java.lang.Override public java.lang.String getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -1580,8 +1627,9 @@ public java.lang.String getLabelsOrDefault( * See [LogEntry][google.logging.v2.LogEntry]. * * - * map<string, string> labels = 3; + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; */ + @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1607,7 +1655,7 @@ public Builder clearLabels() { * See [LogEntry][google.logging.v2.LogEntry]. * * - * map<string, string> labels = 3; + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder removeLabels(java.lang.String key) { if (key == null) { @@ -1631,7 +1679,7 @@ public java.util.Map getMutableLabels() { * See [LogEntry][google.logging.v2.LogEntry]. * * - * map<string, string> labels = 3; + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder putLabels(java.lang.String key, java.lang.String value) { if (key == null) { @@ -1653,7 +1701,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { * See [LogEntry][google.logging.v2.LogEntry]. * * - * map<string, string> labels = 3; + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder putAllLabels(java.util.Map values) { internalGetMutableLabels().getMutableMap().putAll(values); @@ -1692,12 +1740,12 @@ private void ensureEntriesIsMutable() { * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -1729,12 +1777,12 @@ public java.util.List getEntriesList() { * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -1766,12 +1814,12 @@ public int getEntriesCount() { * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -1803,12 +1851,12 @@ public com.google.logging.v2.LogEntry getEntries(int index) { * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -1846,12 +1894,12 @@ public Builder setEntries(int index, com.google.logging.v2.LogEntry value) { * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -1886,12 +1934,12 @@ public Builder setEntries(int index, com.google.logging.v2.LogEntry.Builder buil * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -1929,12 +1977,12 @@ public Builder addEntries(com.google.logging.v2.LogEntry value) { * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -1972,12 +2020,12 @@ public Builder addEntries(int index, com.google.logging.v2.LogEntry value) { * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -2012,12 +2060,12 @@ public Builder addEntries(com.google.logging.v2.LogEntry.Builder builderForValue * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -2052,12 +2100,12 @@ public Builder addEntries(int index, com.google.logging.v2.LogEntry.Builder buil * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -2093,12 +2141,12 @@ public Builder addAllEntries( * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -2133,12 +2181,12 @@ public Builder clearEntries() { * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -2173,12 +2221,12 @@ public Builder removeEntries(int index) { * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -2206,12 +2254,12 @@ public com.google.logging.v2.LogEntry.Builder getEntriesBuilder(int index) { * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -2243,12 +2291,12 @@ public com.google.logging.v2.LogEntryOrBuilder getEntriesOrBuilder(int index) { * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -2281,12 +2329,12 @@ public com.google.logging.v2.LogEntryOrBuilder getEntriesOrBuilder(int index) { * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -2315,12 +2363,12 @@ public com.google.logging.v2.LogEntry.Builder addEntriesBuilder() { * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -2349,12 +2397,12 @@ public com.google.logging.v2.LogEntry.Builder addEntriesBuilder(int index) { * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -2396,10 +2444,11 @@ public java.util.List getEntriesBuilderL * keyed by the entries' zero-based index in the `entries.write` method. * * - * bool partial_success = 5; + * bool partial_success = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The partialSuccess. */ + @java.lang.Override public boolean getPartialSuccess() { return partialSuccess_; } @@ -2414,7 +2463,7 @@ public boolean getPartialSuccess() { * keyed by the entries' zero-based index in the `entries.write` method. * * - * bool partial_success = 5; + * bool partial_success = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The partialSuccess to set. * @return This builder for chaining. @@ -2436,7 +2485,7 @@ public Builder setPartialSuccess(boolean value) { * keyed by the entries' zero-based index in the `entries.write` method. * * - * bool partial_success = 5; + * bool partial_success = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -2457,10 +2506,11 @@ public Builder clearPartialSuccess() { * logging API endpoints are working properly before sending valuable data. * * - * bool dry_run = 6; + * bool dry_run = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The dryRun. */ + @java.lang.Override public boolean getDryRun() { return dryRun_; } @@ -2473,7 +2523,7 @@ public boolean getDryRun() { * logging API endpoints are working properly before sending valuable data. * * - * bool dry_run = 6; + * bool dry_run = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The dryRun to set. * @return This builder for chaining. @@ -2493,7 +2543,7 @@ public Builder setDryRun(boolean value) { * logging API endpoints are working properly before sending valuable data. * * - * bool dry_run = 6; + * bool dry_run = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequestOrBuilder.java index c704aaecc..db6d49a7a 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequestOrBuilder.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequestOrBuilder.java @@ -36,13 +36,15 @@ public interface WriteLogEntriesRequestOrBuilder * `[LOG_ID]` must be URL-encoded. For example: * "projects/my-project-id/logs/syslog" * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" - * The permission <code>logging.logEntries.create</code> is needed on each - * project, organization, billing account, or folder that is receiving - * new log entries, whether the resource is specified in - * <code>logName</code> or in an individual log entry. + * The permission `logging.logEntries.create` is needed on each project, + * organization, billing account, or folder that is receiving new log + * entries, whether the resource is specified in `logName` or in an + * individual log entry. * * - * string log_name = 1 [(.google.api.resource_reference) = { ... } + * + * string log_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The logName. */ @@ -60,13 +62,15 @@ public interface WriteLogEntriesRequestOrBuilder * `[LOG_ID]` must be URL-encoded. For example: * "projects/my-project-id/logs/syslog" * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" - * The permission <code>logging.logEntries.create</code> is needed on each - * project, organization, billing account, or folder that is receiving - * new log entries, whether the resource is specified in - * <code>logName</code> or in an individual log entry. + * The permission `logging.logEntries.create` is needed on each project, + * organization, billing account, or folder that is receiving new log + * entries, whether the resource is specified in `logName` or in an + * individual log entry. * * - * string log_name = 1 [(.google.api.resource_reference) = { ... } + * + * string log_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for logName. */ @@ -84,7 +88,8 @@ public interface WriteLogEntriesRequestOrBuilder * See [LogEntry][google.logging.v2.LogEntry]. * * - * .google.api.MonitoredResource resource = 2; + * .google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the resource field is set. */ @@ -101,7 +106,8 @@ public interface WriteLogEntriesRequestOrBuilder * See [LogEntry][google.logging.v2.LogEntry]. * * - * .google.api.MonitoredResource resource = 2; + * .google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The resource. */ @@ -118,7 +124,8 @@ public interface WriteLogEntriesRequestOrBuilder * See [LogEntry][google.logging.v2.LogEntry]. * * - * .google.api.MonitoredResource resource = 2; + * .google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.api.MonitoredResourceOrBuilder getResourceOrBuilder(); @@ -132,7 +139,7 @@ public interface WriteLogEntriesRequestOrBuilder * See [LogEntry][google.logging.v2.LogEntry]. * * - * map<string, string> labels = 3; + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; */ int getLabelsCount(); /** @@ -145,7 +152,7 @@ public interface WriteLogEntriesRequestOrBuilder * See [LogEntry][google.logging.v2.LogEntry]. * * - * map<string, string> labels = 3; + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; */ boolean containsLabels(java.lang.String key); /** Use {@link #getLabelsMap()} instead. */ @@ -161,7 +168,7 @@ public interface WriteLogEntriesRequestOrBuilder * See [LogEntry][google.logging.v2.LogEntry]. * * - * map<string, string> labels = 3; + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; */ java.util.Map getLabelsMap(); /** @@ -174,7 +181,7 @@ public interface WriteLogEntriesRequestOrBuilder * See [LogEntry][google.logging.v2.LogEntry]. * * - * map<string, string> labels = 3; + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; */ java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); /** @@ -187,7 +194,7 @@ public interface WriteLogEntriesRequestOrBuilder * See [LogEntry][google.logging.v2.LogEntry]. * * - * map<string, string> labels = 3; + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; */ java.lang.String getLabelsOrThrow(java.lang.String key); @@ -207,12 +214,12 @@ public interface WriteLogEntriesRequestOrBuilder * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -238,12 +245,12 @@ public interface WriteLogEntriesRequestOrBuilder * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -269,12 +276,12 @@ public interface WriteLogEntriesRequestOrBuilder * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -300,12 +307,12 @@ public interface WriteLogEntriesRequestOrBuilder * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -331,12 +338,12 @@ public interface WriteLogEntriesRequestOrBuilder * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * [logs retention period](/logging/quota-policy) in the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be - * [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * [quota limit](/logging/quota-policy) for calls to `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * @@ -358,7 +365,7 @@ public interface WriteLogEntriesRequestOrBuilder * keyed by the entries' zero-based index in the `entries.write` method. * * - * bool partial_success = 5; + * bool partial_success = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The partialSuccess. */ @@ -373,7 +380,7 @@ public interface WriteLogEntriesRequestOrBuilder * logging API endpoints are working properly before sending valuable data. * * - * bool dry_run = 6; + * bool dry_run = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The dryRun. */ diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesResponse.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesResponse.java index d613aef44..fa53a3b88 100644 --- a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesResponse.java +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesResponse.java @@ -23,7 +23,6 @@ * *
  * Result returned from WriteLogEntries.
- * empty
  * 
* * Protobuf type {@code google.logging.v2.WriteLogEntriesResponse} @@ -258,7 +257,6 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * Result returned from WriteLogEntries.
-   * empty
    * 
* * Protobuf type {@code google.logging.v2.WriteLogEntriesResponse} diff --git a/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/log_entry.proto b/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/log_entry.proto index 3f9c3d51d..351f9e632 100644 --- a/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/log_entry.proto +++ b/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/log_entry.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.logging.v2; +import "google/api/field_behavior.proto"; import "google/api/monitored_resource.proto"; import "google/api/resource.proto"; import "google/logging/type/http_request.proto"; @@ -55,9 +55,9 @@ message LogEntry { // "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" // "folders/[FOLDER_ID]/logs/[LOG_ID]" // - // A project number may optionally be used in place of PROJECT_ID. The project - // number is translated to its corresponding PROJECT_ID internally and the - // `log_name` field will contain PROJECT_ID in queries and exports. + // A project number may be used in place of PROJECT_ID. The project number is + // translated to its corresponding PROJECT_ID internally and the `log_name` + // field will contain PROJECT_ID in queries and exports. // // `[LOG_ID]` must be URL-encoded within `log_name`. Example: // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. @@ -70,16 +70,16 @@ message LogEntry { // forward-slash is removed. Listing the log entry will not show the leading // slash and filtering for a log name with a leading slash will never return // any results. - string log_name = 12; + string log_name = 12 [(google.api.field_behavior) = REQUIRED]; // Required. The monitored resource that produced this log entry. // // Example: a log entry that reports a database error would be associated with // the monitored resource designating the particular database that reported // the error. - google.api.MonitoredResource resource = 8; + google.api.MonitoredResource resource = 8 [(google.api.field_behavior) = REQUIRED]; - // Optional. The log entry payload, which can be one of multiple types. + // The log entry payload, which can be one of multiple types. oneof payload { // The log entry payload, represented as a protocol buffer. Some Google // Cloud Platform services use this field for their log entry payloads. @@ -99,29 +99,27 @@ message LogEntry { google.protobuf.Struct json_payload = 6; } - // Optional. The time the event described by the log entry occurred. This - // time is used to compute the log entry's age and to enforce the logs - // retention period. If this field is omitted in a new log entry, then Logging - // assigns it the current time. Timestamps have nanosecond accuracy, but - // trailing zeros in the fractional seconds might be omitted when the - // timestamp is displayed. + // Optional. The time the event described by the log entry occurred. This time is used + // to compute the log entry's age and to enforce the logs retention period. + // If this field is omitted in a new log entry, then Logging assigns it the + // current time. Timestamps have nanosecond accuracy, but trailing zeros in + // the fractional seconds might be omitted when the timestamp is displayed. // // Incoming log entries should have timestamps that are no more than the [logs - // retention period](/logging/quotas) in the past, and no more than 24 hours + // retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours // in the future. Log entries outside those time boundaries will not be // available when calling `entries.list`, but those log entries can still be - // [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). - google.protobuf.Timestamp timestamp = 9; + // [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + google.protobuf.Timestamp timestamp = 9 [(google.api.field_behavior) = OPTIONAL]; // Output only. The time the log entry was received by Logging. - google.protobuf.Timestamp receive_timestamp = 24; + google.protobuf.Timestamp receive_timestamp = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. The severity of the log entry. The default value is - // `LogSeverity.DEFAULT`. - google.logging.type.LogSeverity severity = 10; + // Optional. The severity of the log entry. The default value is `LogSeverity.DEFAULT`. + google.logging.type.LogSeverity severity = 10 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A unique identifier for the log entry. If you provide a value, - // then Logging considers other log entries in the same project, with the same + // Optional. A unique identifier for the log entry. If you provide a value, then + // Logging considers other log entries in the same project, with the same // `timestamp`, and with the same `insert_id` to be duplicates which are // removed in a single query result. However, there are no guarantees of // de-duplication in the export of logs. @@ -131,43 +129,32 @@ message LogEntry { // // In queries, the `insert_id` is also used to order log entries that have // the same `log_name` and `timestamp` values. - string insert_id = 4; + string insert_id = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Information about the HTTP request associated with this log - // entry, if applicable. - google.logging.type.HttpRequest http_request = 7; + // Optional. Information about the HTTP request associated with this log entry, if + // applicable. + google.logging.type.HttpRequest http_request = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. A set of user-defined (key, value) data that provides additional // information about the log entry. - map labels = 11; - - // Deprecated. Output only. Additional metadata about the monitored resource. - // - // Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have - // this field populated for GKE versions older than 1.12.6. For GKE versions - // 1.12.6 and above, the `metadata` field has been deprecated. The Kubernetes - // pod labels that used to be in `metadata.userLabels` will now be present in - // the `labels` field with a key prefix of `k8s-pod/`. The Stackdriver system - // labels that were present in the `metadata.systemLabels` field will no - // longer be available in the LogEntry. - google.api.MonitoredResourceMetadata metadata = 25 [deprecated = true]; + map labels = 11 [(google.api.field_behavior) = OPTIONAL]; // Optional. Information about an operation associated with the log entry, if // applicable. - LogEntryOperation operation = 15; + LogEntryOperation operation = 15 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Resource name of the trace associated with the log entry, if any. - // If it contains a relative resource name, the name is assumed to be relative - // to `//tracing.googleapis.com`. Example: + // Optional. Resource name of the trace associated with the log entry, if any. If it + // contains a relative resource name, the name is assumed to be relative to + // `//tracing.googleapis.com`. Example: // `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` - string trace = 22; + string trace = 22 [(google.api.field_behavior) = OPTIONAL]; // Optional. The span ID within the trace associated with the log entry. // // For Trace spans, this is the same format that the Trace API v2 uses: a // 16-character hexadecimal encoding of an 8-byte array, such as - // "000000000000004a". - string span_id = 27; + // `000000000000004a`. + string span_id = 27 [(google.api.field_behavior) = OPTIONAL]; // Optional. The sampling decision of the trace associated with the log entry. // @@ -176,11 +163,10 @@ message LogEntry { // for storage when this log entry was written, or the sampling decision was // unknown at the time. A non-sampled `trace` value is still useful as a // request correlation identifier. The default is False. - bool trace_sampled = 30; + bool trace_sampled = 30 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Source code location information associated with the log entry, - // if any. - LogEntrySourceLocation source_location = 23; + // Optional. Source code location information associated with the log entry, if any. + LogEntrySourceLocation source_location = 23 [(google.api.field_behavior) = OPTIONAL]; } // Additional information about a potentially long-running operation with which @@ -188,18 +174,18 @@ message LogEntry { message LogEntryOperation { // Optional. An arbitrary operation identifier. Log entries with the same // identifier are assumed to be part of the same operation. - string id = 1; + string id = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. An arbitrary producer identifier. The combination of `id` and // `producer` must be globally unique. Examples for `producer`: // `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. - string producer = 2; + string producer = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Set this to True if this is the first log entry in the operation. - bool first = 3; + bool first = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Set this to True if this is the last log entry in the operation. - bool last = 4; + bool last = 4 [(google.api.field_behavior) = OPTIONAL]; } // Additional information about the source code location that produced the log @@ -207,11 +193,11 @@ message LogEntryOperation { message LogEntrySourceLocation { // Optional. Source file name. Depending on the runtime environment, this // might be a simple name or a fully-qualified name. - string file = 1; + string file = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. Line within the source file. 1-based; 0 indicates no line number // available. - int64 line = 2; + int64 line = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Human-readable name of the function or method being invoked, with // optional context such as the class or package name. This information may be @@ -219,5 +205,5 @@ message LogEntrySourceLocation { // less meaningful. The format can vary by language. For example: // `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` // (Python). - string function = 3; + string function = 3 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/logging.proto b/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/logging.proto index c3a524633..36a81dcc2 100644 --- a/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/logging.proto +++ b/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/logging.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,11 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.logging.v2; -import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/monitored_resource.proto"; @@ -28,6 +26,7 @@ import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; +import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; @@ -87,7 +86,7 @@ service LoggingServiceV2 { // Lists log entries. Use this method to retrieve log entries that originated // from a project/folder/organization/billing account. For ways to export log - // entries, see [Exporting Logs](/logging/docs/export). + // entries, see [Exporting Logs](https://cloud.google.com/logging/docs/export). rpc ListLogEntries(ListLogEntriesRequest) returns (ListLogEntriesResponse) { option (google.api.http) = { post: "/v2/entries:list" @@ -142,7 +141,7 @@ message DeleteLogRequest { string log_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - child_type: "logging.googleapis.com/Log" + type: "logging.googleapis.com/Log" } ]; } @@ -162,13 +161,16 @@ message WriteLogEntriesRequest { // "projects/my-project-id/logs/syslog" // "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" // - // The permission logging.logEntries.create is needed on each - // project, organization, billing account, or folder that is receiving - // new log entries, whether the resource is specified in - // logName or in an individual log entry. - string log_name = 1 [(google.api.resource_reference) = { - type: "logging.googleapis.com/Log" - }]; + // The permission `logging.logEntries.create` is needed on each project, + // organization, billing account, or folder that is receiving new log + // entries, whether the resource is specified in `logName` or in an + // individual log entry. + string log_name = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "logging.googleapis.com/Log" + } + ]; // Optional. A default monitored resource object that is assigned to all log // entries in `entries` that do not specify a value for `resource`. Example: @@ -178,13 +180,13 @@ message WriteLogEntriesRequest { // "zone": "us-central1-a", "instance_id": "00000000000000000000" }} // // See [LogEntry][google.logging.v2.LogEntry]. - google.api.MonitoredResource resource = 2; + google.api.MonitoredResource resource = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Default labels that are added to the `labels` field of all log // entries in `entries`. If a log entry already has a label with the same key // as a label in this parameter, then the log entry's label is not changed. // See [LogEntry][google.logging.v2.LogEntry]. - map labels = 3; + map labels = 3 [(google.api.field_behavior) = OPTIONAL]; // Required. The log entries to send to Logging. The order of log // entries in this list does not matter. Values supplied in this method's @@ -200,13 +202,13 @@ message WriteLogEntriesRequest { // the entries later in the list. See the `entries.list` method. // // Log entries with timestamps that are more than the - // [logs retention period](/logging/quota-policy) in the past or more than + // [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than // 24 hours in the future will not be available when calling `entries.list`. // However, those log entries can still be - // [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + // [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). // // To improve throughput and to avoid exceeding the - // [quota limit](/logging/quota-policy) for calls to `entries.write`, + // [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, // you should try to include several log entries in this list, // rather than calling this method for each individual log entry. repeated LogEntry entries = 4 [(google.api.field_behavior) = REQUIRED]; @@ -216,19 +218,16 @@ message WriteLogEntriesRequest { // entry is not written, then the response status is the error associated // with one of the failed entries and the response includes error details // keyed by the entries' zero-based index in the `entries.write` method. - bool partial_success = 5; + bool partial_success = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. If true, the request should expect normal response, but the // entries won't be persisted nor exported. Useful for checking whether the // logging API endpoints are working properly before sending valuable data. - bool dry_run = 6; + bool dry_run = 6 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from WriteLogEntries. -// empty -message WriteLogEntriesResponse { - -} +message WriteLogEntriesResponse {} // Error details for WriteLogEntries with partial success. message WriteLogEntriesPartialErrors { @@ -243,11 +242,6 @@ message WriteLogEntriesPartialErrors { // The parameters to `ListLogEntries`. message ListLogEntriesRequest { - // Deprecated. Use `resource_names` instead. One or more project identifiers - // or project numbers from which to retrieve log entries. Example: - // `"my-project-1A"`. - repeated string project_ids = 1 [deprecated = true]; - // Required. Names of one or more parent resources from which to // retrieve log entries: // @@ -266,13 +260,13 @@ message ListLogEntriesRequest { ]; // Optional. A filter that chooses which log entries to return. See [Advanced - // Logs Queries](/logging/docs/view/advanced-queries). Only log entries that + // Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). Only log entries that // match the filter are returned. An empty filter matches all log entries in // the resources listed in `resource_names`. Referencing a parent resource // that is not listed in `resource_names` will cause the filter to return no // results. // The maximum length of the filter is 20000 characters. - string filter = 2; + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. How the results should be sorted. Presently, the only permitted // values are `"timestamp asc"` (default) and `"timestamp desc"`. The first @@ -280,18 +274,18 @@ message ListLogEntriesRequest { // `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 their `insert_id` values. - string order_by = 3; + string order_by = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of results to return from this request. // Non-positive values are ignored. The presence of `next_page_token` in the // response indicates that more results might be available. - int32 page_size = 4; + int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. If present, then retrieve the next batch of results from the // preceding call to this method. `page_token` must be the value of // `next_page_token` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 5; + string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from `ListLogEntries`. @@ -319,13 +313,13 @@ message ListMonitoredResourceDescriptorsRequest { // Optional. The maximum number of results to return from this request. // Non-positive values are ignored. The presence of `nextPageToken` in the // response indicates that more results might be available. - int32 page_size = 1; + int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. If present, then retrieve the next batch of results from the // preceding call to this method. `pageToken` must be the value of // `nextPageToken` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 2; + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from ListMonitoredResourceDescriptors. @@ -347,20 +341,23 @@ message ListLogsRequest { // "organizations/[ORGANIZATION_ID]" // "billingAccounts/[BILLING_ACCOUNT_ID]" // "folders/[FOLDER_ID]" - string parent = 1 [(google.api.resource_reference) = { - child_type: "logging.googleapis.com/Log" - }]; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "logging.googleapis.com/Log" + } + ]; // Optional. The maximum number of results to return from this request. // Non-positive values are ignored. The presence of `nextPageToken` in the // response indicates that more results might be available. - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. If present, then retrieve the next batch of results from the // preceding call to this method. `pageToken` must be the value of // `nextPageToken` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from ListLogs. diff --git a/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/logging_config.proto b/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/logging_config.proto index 7fb830ded..b7cb9c94a 100644 --- a/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/logging_config.proto +++ b/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/logging_config.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -33,6 +32,18 @@ option java_multiple_files = true; option java_outer_classname = "LoggingConfigProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; +option (google.api.resource_definition) = { + type: "logging.googleapis.com/OrganizationLocation" + pattern: "organizations/{organization}/locations/{location}" +}; +option (google.api.resource_definition) = { + type: "logging.googleapis.com/FolderLocation" + pattern: "folders/{folder}/locations/{location}" +}; +option (google.api.resource_definition) = { + type: "logging.googleapis.com/BillingAccountLocation" + pattern: "billingAccounts/{billing_account}/locations/{location}" +}; // Service for configuring sinks used to route log entries. service ConfigServiceV2 { @@ -43,6 +54,79 @@ service ConfigServiceV2 { "https://www.googleapis.com/auth/logging.admin," "https://www.googleapis.com/auth/logging.read"; + // Lists buckets (Beta). + rpc ListBuckets(ListBucketsRequest) returns (ListBucketsResponse) { + option (google.api.http) = { + get: "/v2/{parent=*/*/locations/*}/buckets" + additional_bindings { + get: "/v2/{parent=projects/*/locations/*}/buckets" + } + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*}/buckets" + } + additional_bindings { + get: "/v2/{parent=folders/*/locations/*}/buckets" + } + additional_bindings { + get: "/v2/{parent=billingAccounts/*/locations/*}/buckets" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a bucket (Beta). + rpc GetBucket(GetBucketRequest) returns (LogBucket) { + option (google.api.http) = { + get: "/v2/{name=*/*/locations/*/buckets/*}" + additional_bindings { + get: "/v2/{name=projects/*/locations/*/buckets/*}" + } + additional_bindings { + get: "/v2/{name=organizations/*/locations/*/buckets/*}" + } + additional_bindings { + get: "/v2/{name=folders/*/locations/*/buckets/*}" + } + additional_bindings { + get: "/v2/{name=billingAccounts/*/buckets/*}" + } + }; + } + + // Updates a bucket. This method replaces the following fields in the + // existing bucket with values from the new bucket: `retention_period` + // + // If the retention period is decreased and the bucket is locked, + // FAILED_PRECONDITION will be returned. + // + // If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION + // will be returned. + // + // A buckets region may not be modified after it is created. + // This method is in Beta. + rpc UpdateBucket(UpdateBucketRequest) returns (LogBucket) { + option (google.api.http) = { + patch: "/v2/{name=*/*/locations/*/buckets/*}" + body: "bucket" + additional_bindings { + patch: "/v2/{name=projects/*/locations/*/buckets/*}" + body: "bucket" + } + additional_bindings { + patch: "/v2/{name=organizations/*/locations/*/buckets/*}" + body: "bucket" + } + additional_bindings { + patch: "/v2/{name=folders/*/locations/*/buckets/*}" + body: "bucket" + } + additional_bindings { + patch: "/v2/{name=billingAccounts/*/locations/*/buckets/*}" + body: "bucket" + } + }; + } + // Lists sinks. rpc ListSinks(ListSinksRequest) returns (ListSinksResponse) { option (google.api.http) = { @@ -297,7 +381,7 @@ service ConfigServiceV2 { // the GCP organization. // // See [Enabling CMEK for Logs - // Router](/logging/docs/routing/managed-encryption) for more information. + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. rpc GetCmekSettings(GetCmekSettingsRequest) returns (CmekSettings) { option (google.api.http) = { get: "/v2/{name=*/*}/cmekSettings" @@ -320,7 +404,7 @@ service ConfigServiceV2 { // 3) access to the key is disabled. // // See [Enabling CMEK for Logs - // Router](/logging/docs/routing/managed-encryption) for more information. + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. rpc UpdateCmekSettings(UpdateCmekSettingsRequest) returns (CmekSettings) { option (google.api.http) = { patch: "/v2/{name=*/*}/cmekSettings" @@ -333,6 +417,48 @@ service ConfigServiceV2 { } } +// Describes a repository of logs (Beta). +message LogBucket { + option (google.api.resource) = { + type: "logging.googleapis.com/LogBucket" + pattern: "projects/{project}/locations/{location}/buckets/{bucket}" + pattern: "organizations/{organization}/locations/{location}/buckets/{bucket}" + pattern: "folders/{folder}/locations/{location}/buckets/{bucket}" + pattern: "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}" + }; + + // The resource name of the bucket. + // For example: + // "projects/my-project-id/locations/my-location/buckets/my-bucket-id The + // supported locations are: + // "global" + // "us-central1" + // + // For the location of `global` it is unspecified where logs are actually + // stored. + // Once a bucket has been created, the location can not be changed. + string name = 1; + + // Describes this bucket. + string description = 3; + + // Output only. The creation timestamp of the bucket. This is not set for any of the + // default buckets. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update timestamp of the bucket. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Logs will be retained by default for this amount of time, after which they + // will automatically be deleted. The minimum retention period is 1 day. + // If this value is set to zero at bucket creation time, the default time of + // 30 days will be used. + int32 retention_days = 11; + + // Output only. The bucket lifecycle state. + LifecycleState lifecycle_state = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // Describes a sink used to export log entries to one of the following // destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a // Cloud Pub/Sub topic. A logs filter controls which log entries are exported. @@ -340,7 +466,7 @@ service ConfigServiceV2 { // folder. message LogSink { option (google.api.resource) = { - type: "logging.googleapis.com/Sink" + type: "logging.googleapis.com/LogSink" pattern: "projects/{project}/sinks/{sink}" pattern: "organizations/{organization}/sinks/{sink}" pattern: "folders/{folder}/sinks/{sink}" @@ -361,12 +487,12 @@ message LogSink { V1 = 2; } - // Required. The client-assigned sink identifier, unique within the - // project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are - // limited to 100 characters and can include only the following characters: - // upper and lower-case alphanumeric characters, underscores, hyphens, and - // periods. First character has to be alphanumeric. - string name = 1; + // Required. The client-assigned sink identifier, unique within the project. Example: + // `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited to 100 + // characters and can include only the following characters: upper and + // lower-case alphanumeric characters, underscores, hyphens, and periods. + // First character has to be alphanumeric. + string name = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The export destination: // @@ -377,42 +503,43 @@ message LogSink { // The sink's `writer_identity`, set when the sink is created, must // have permission to write to the destination or else the log // entries are not exported. For more information, see - // [Exporting Logs with Sinks](/logging/docs/api/tasks/exporting-logs). - string destination = 3 [(google.api.resource_reference) = { - type: "*" - }]; + // [Exporting Logs with Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + string destination = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "*" + } + ]; - // Optional. An [advanced logs filter](/logging/docs/view/advanced-queries). The only + // Optional. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries). The only // exported log entries are those that are in the resource owning the sink and // that match the filter. For example: // // logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR - string filter = 5; + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. A description of this sink. // The maximum length of the description is 8000 characters. - string description = 18; + string description = 18 [(google.api.field_behavior) = OPTIONAL]; // Optional. If set to True, then this sink is disabled and it does not // export any log entries. - bool disabled = 19; + bool disabled = 19 [(google.api.field_behavior) = OPTIONAL]; // Deprecated. The log entry format to use for this sink's exported log // entries. The v2 format is used by default and cannot be changed. VersionFormat output_version_format = 6 [deprecated = true]; - // Output only. An IAM identity—a service account or group—under - // which Logging writes the exported log entries to the sink's destination. - // This field is set by - // [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] - // and - // [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] - // based on the value of `unique_writer_identity` in those methods. + // Output only. An IAM identity–a service account or group—under which Logging + // writes the exported log entries to the sink's destination. This field is + // set by [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and + // [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the + // value of `unique_writer_identity` in those methods. // // Until you grant this identity write-access to the destination, log entry // exports from this sink will fail. For more information, // see [Granting Access for a - // Resource](/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). + // Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). // Consult the destination service's documentation to determine the // appropriate IAM roles to assign to the identity. string writer_identity = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -430,12 +557,12 @@ message LogSink { // // logName:("projects/test-project1/" OR "projects/test-project2/") AND // resource.type=gce_instance - bool include_children = 9; + bool include_children = 9 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Destination dependent options. + // Destination dependent options. oneof options { // Optional. Options that affect sinks exporting data to BigQuery. - BigQueryOptions bigquery_options = 12; + BigQueryOptions bigquery_options = 12 [(google.api.field_behavior) = OPTIONAL]; } // Output only. The creation timestamp of the sink. @@ -447,24 +574,18 @@ message LogSink { // // This field may not be present for older sinks. google.protobuf.Timestamp update_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Do not use. This field is ignored. - google.protobuf.Timestamp start_time = 10 [deprecated = true]; - - // Do not use. This field is ignored. - google.protobuf.Timestamp end_time = 11 [deprecated = true]; } // Options that change functionality of a sink exporting data to BigQuery. message BigQueryOptions { // Optional. Whether to use [BigQuery's partition - // tables](/bigquery/docs/partitioned-tables). By default, Logging + // tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By default, Logging // creates dated tables based on the log entries' timestamps, e.g. // syslog_20170523. With partitioned tables the date suffix is no longer // present and [special query - // syntax](/bigquery/docs/querying-partitioned-tables) has to be used instead. + // syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) has to be used instead. // In both cases, tables are sharded based on UTC timezone. - bool use_partitioned_tables = 1; + bool use_partitioned_tables = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. True if new timestamp column based partitioning is in use, // false if legacy ingestion-time partitioning is in use. @@ -475,6 +596,113 @@ message BigQueryOptions { bool uses_timestamp_column_partitioning = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// LogBucket lifecycle states (Beta). +enum LifecycleState { + // Unspecified state. This is only used/useful for distinguishing + // unset values. + LIFECYCLE_STATE_UNSPECIFIED = 0; + + // The normal and active state. + ACTIVE = 1; + + // The bucket has been marked for deletion by the user. + DELETE_REQUESTED = 2; +} + +// The parameters to `ListBuckets` (Beta). +message ListBucketsRequest { + // Required. The parent resource whose buckets are to be listed: + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + // "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + // + // Note: The locations portion of the resource must be specified, but + // supplying the character `-` in place of [LOCATION_ID] will return all + // buckets. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "logging.googleapis.com/LogBucket" + }]; + + // Optional. If present, then retrieve the next batch of results from the + // preceding call to this method. `pageToken` must be the value of + // `nextPageToken` from the previous response. The values of other method + // parameters should be identical to those in the previous call. + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of results to return from this request. + // Non-positive values are ignored. The presence of `nextPageToken` in the + // response indicates that more results might be available. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response from ListBuckets (Beta). +message ListBucketsResponse { + // A list of buckets. + repeated LogBucket buckets = 1; + + // If there might be more results than appear in this response, then + // `nextPageToken` is included. To get the next set of results, call the same + // method again using the value of `nextPageToken` as `pageToken`. + string next_page_token = 2; +} + +// The parameters to `UpdateBucket` (Beta). +message UpdateBucketRequest { + // Required. The full resource name of the bucket to update. + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // + // Example: + // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also + // requires permission "resourcemanager.projects.updateLiens" to set the + // locked property + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/LogBucket" + } + ]; + + // Required. The updated bucket. + LogBucket bucket = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Field mask that specifies the fields in `bucket` that need an update. A + // bucket field will be overwritten if, and only if, it is in the update + // mask. `name` and output only fields cannot be updated. + // + // For a detailed `FieldMask` definition, see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + // + // Example: `updateMask=retention_days`. + google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// The parameters to `GetBucket` (Beta). +message GetBucketRequest { + // Required. The resource name of the bucket: + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // + // Example: + // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/LogBucket" + } + ]; +} + // The parameters to `ListSinks`. message ListSinksRequest { // Required. The parent resource whose sinks are to be listed: @@ -486,7 +714,7 @@ message ListSinksRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - child_type: "logging.googleapis.com/Sink" + child_type: "logging.googleapis.com/LogSink" } ]; @@ -494,12 +722,12 @@ message ListSinksRequest { // preceding call to this method. `pageToken` must be the value of // `nextPageToken` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 2; + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of results to return from this request. // Non-positive values are ignored. The presence of `nextPageToken` in the // response indicates that more results might be available. - int32 page_size = 3; + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from `ListSinks`. @@ -526,7 +754,7 @@ message GetSinkRequest { string sink_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Sink" + type: "logging.googleapis.com/LogSink" } ]; } @@ -544,7 +772,7 @@ message CreateSinkRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - child_type: "logging.googleapis.com/Sink" + child_type: "logging.googleapis.com/LogSink" } ]; @@ -563,13 +791,13 @@ message CreateSinkRequest { // resource such as an organization, then the value of `writer_identity` will // be a unique service account used only for exports from the new sink. For // more information, see `writer_identity` in [LogSink][google.logging.v2.LogSink]. - bool unique_writer_identity = 3; + bool unique_writer_identity = 3 [(google.api.field_behavior) = OPTIONAL]; } // The parameters to `UpdateSink`. message UpdateSinkRequest { - // Required. The full resource name of the sink to update, including the - // parent resource and the sink identifier: + // Required. The full resource name of the sink to update, including the parent + // resource and the sink identifier: // // "projects/[PROJECT_ID]/sinks/[SINK_ID]" // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" @@ -580,12 +808,12 @@ message UpdateSinkRequest { string sink_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Sink" + type: "logging.googleapis.com/LogSink" } ]; - // Required. The updated sink, whose name is the same identifier that appears - // as part of `sink_name`. + // Required. The updated sink, whose name is the same identifier that appears as part + // of `sink_name`. LogSink sink = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] @@ -599,7 +827,7 @@ message UpdateSinkRequest { // `writer_identity` is changed to a unique service account. // + It is an error if the old value is true and the new value is // set to false or defaulted to false. - bool unique_writer_identity = 3; + bool unique_writer_identity = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Field mask that specifies the fields in `sink` that need // an update. A sink field will be overwritten if, and only if, it is @@ -615,13 +843,13 @@ message UpdateSinkRequest { // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask // // Example: `updateMask=filter`. - google.protobuf.FieldMask update_mask = 4; + google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = OPTIONAL]; } // The parameters to `DeleteSink`. message DeleteSinkRequest { - // Required. The full resource name of the sink to delete, including the - // parent resource and the sink identifier: + // Required. The full resource name of the sink to delete, including the parent + // resource and the sink identifier: // // "projects/[PROJECT_ID]/sinks/[SINK_ID]" // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" @@ -632,7 +860,7 @@ message DeleteSinkRequest { string sink_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Sink" + type: "logging.googleapis.com/LogSink" } ]; } @@ -645,47 +873,47 @@ message DeleteSinkRequest { // apply to child resources, and that you can't exclude audit log entries. message LogExclusion { option (google.api.resource) = { - type: "logging.googleapis.com/Exclusion" + type: "logging.googleapis.com/LogExclusion" pattern: "projects/{project}/exclusions/{exclusion}" pattern: "organizations/{organization}/exclusions/{exclusion}" pattern: "folders/{folder}/exclusions/{exclusion}" pattern: "billingAccounts/{billing_account}/exclusions/{exclusion}" }; - // Required. A client-assigned identifier, such as - // `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and - // can include only letters, digits, underscores, hyphens, and periods. - // First character has to be alphanumeric. - string name = 1; + // Required. A client-assigned identifier, such as `"load-balancer-exclusion"`. + // Identifiers are limited to 100 characters and can include only letters, + // digits, underscores, hyphens, and periods. First character has to be + // alphanumeric. + string name = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. A description of this exclusion. - string description = 2; + string description = 2 [(google.api.field_behavior) = OPTIONAL]; - // Required. An [advanced logs filter](/logging/docs/view/advanced-queries) + // Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries) // that matches the log entries to be excluded. By using the - // [sample function](/logging/docs/view/advanced-queries#sample), + // [sample function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), // you can exclude less than 100% of the matching log entries. // For example, the following query matches 99% of low-severity log // entries from Google Cloud Storage buckets: // // `"resource.type=gcs_bucket severity=ERROR" // // The maximum length of the filter is 20000 characters. - string filter = 3; + string filter = 3 [(google.api.field_behavior) = REQUIRED]; // Optional. The metric descriptor associated with the logs-based metric. // If unspecified, it uses a default metric descriptor with a DELTA metric @@ -160,7 +159,7 @@ message LogMetric { // be updated once initially configured. New labels can be added in the // `metric_descriptor`, but existing labels cannot be modified except for // their description. - google.api.MetricDescriptor metric_descriptor = 5; + google.api.MetricDescriptor metric_descriptor = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. A `value_extractor` is required when using a distribution // logs-based metric to extract the values to record from a log entry. @@ -181,7 +180,7 @@ message LogMetric { // distribution. // // Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` - string value_extractor = 6; + string value_extractor = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. A map from a label key string to an extractor expression which is // used to extract data from a log entry field and assign as the label value. @@ -197,22 +196,22 @@ message LogMetric { // // Note that there are upper bounds on the maximum number of labels and the // number of active time series that are allowed in a project. - map label_extractors = 7; + map label_extractors = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. The `bucket_options` are required when the logs-based metric is // using a DISTRIBUTION value type and it describes the bucket boundaries // used to create a histogram of the extracted values. - google.api.Distribution.BucketOptions bucket_options = 8; + google.api.Distribution.BucketOptions bucket_options = 8 [(google.api.field_behavior) = OPTIONAL]; // Output only. The creation timestamp of the metric. // // This field may not be present for older metrics. - google.protobuf.Timestamp create_time = 9; + google.protobuf.Timestamp create_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last update timestamp of the metric. // // This field may not be present for older metrics. - google.protobuf.Timestamp update_time = 10; + google.protobuf.Timestamp update_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Deprecated. The API version that created or updated this metric. // The v2 format is used by default and cannot be changed. @@ -235,12 +234,12 @@ message ListLogMetricsRequest { // preceding call to this method. `pageToken` must be the value of // `nextPageToken` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 2; + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of results to return from this request. // Non-positive values are ignored. The presence of `nextPageToken` in the // response indicates that more results might be available. - int32 page_size = 3; + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from ListLogMetrics. @@ -262,7 +261,7 @@ message GetLogMetricRequest { string metric_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Metric" + type: "logging.googleapis.com/LogMetric" } ]; } @@ -277,7 +276,7 @@ message CreateLogMetricRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Metric" + child_type: "logging.googleapis.com/LogMetric" } ]; @@ -298,7 +297,7 @@ message UpdateLogMetricRequest { string metric_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Metric" + type: "logging.googleapis.com/LogMetric" } ]; @@ -314,7 +313,7 @@ message DeleteLogMetricRequest { string metric_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Metric" + type: "logging.googleapis.com/LogMetric" } ]; } diff --git a/synth.metadata b/synth.metadata index 92d5939b7..0227f6ffc 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,9 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "83c6f84035ee0f80eaa44d8b688a010461cc4080", - "internalRef": "297918498", - "log": "83c6f84035ee0f80eaa44d8b688a010461cc4080\nUpdate google/api/auth.proto to make AuthProvider to have JwtLocation\n\nPiperOrigin-RevId: 297918498\n\ne9e90a787703ec5d388902e2cb796aaed3a385b4\nDialogflow weekly v2/v2beta1 library update:\n - adding get validation result\n - adding field mask override control for output audio config\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 297671458\n\n1a2b05cc3541a5f7714529c665aecc3ea042c646\nAdding .yaml and .json config files.\n\nPiperOrigin-RevId: 297570622\n\ndfe1cf7be44dee31d78f78e485d8c95430981d6e\nPublish `QueryOptions` proto.\n\nIntroduced a `query_options` input in `ExecuteSqlRequest`.\n\nPiperOrigin-RevId: 297497710\n\ndafc905f71e5d46f500b41ed715aad585be062c3\npubsub: revert pull init_rpc_timeout & max_rpc_timeout back to 25 seconds and reset multiplier to 1.0\n\nPiperOrigin-RevId: 297486523\n\n" + "sha": "c4e37010d74071851ff24121f522e802231ac86e", + "internalRef": "313460921" } }, { @@ -31,8 +30,7 @@ "apiName": "logging", "apiVersion": "v2", "language": "java", - "generator": "gapic", - "config": "google/logging/artman_logging.yaml" + "generator": "bazel" } } ]