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 8549b9276..efa034ce0 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 @@ -31,35 +31,45 @@ import com.google.logging.v2.BillingAccountLocationName; import com.google.logging.v2.BillingAccountName; import com.google.logging.v2.CmekSettings; +import com.google.logging.v2.CreateBucketRequest; import com.google.logging.v2.CreateExclusionRequest; import com.google.logging.v2.CreateSinkRequest; +import com.google.logging.v2.CreateViewRequest; +import com.google.logging.v2.DeleteBucketRequest; import com.google.logging.v2.DeleteExclusionRequest; import com.google.logging.v2.DeleteSinkRequest; +import com.google.logging.v2.DeleteViewRequest; 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.GetViewRequest; 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.ListViewsRequest; +import com.google.logging.v2.ListViewsResponse; 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.LogSinkName; +import com.google.logging.v2.LogView; import com.google.logging.v2.OrganizationLocationName; import com.google.logging.v2.OrganizationName; import com.google.logging.v2.ProjectName; +import com.google.logging.v2.UndeleteBucketRequest; import com.google.logging.v2.UpdateBucketRequest; import com.google.logging.v2.UpdateCmekSettingsRequest; import com.google.logging.v2.UpdateExclusionRequest; import com.google.logging.v2.UpdateSinkRequest; +import com.google.logging.v2.UpdateViewRequest; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import java.io.IOException; @@ -619,7 +629,7 @@ public final UnaryCallable deleteExclusionCallabl // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists buckets (Beta). + * Lists buckets. * *

Sample code: * @@ -651,7 +661,7 @@ public final ListBucketsPagedResponse listBuckets(OrganizationLocationName paren // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists buckets (Beta). + * Lists buckets. * *

Sample code: * @@ -683,7 +693,7 @@ public final ListBucketsPagedResponse listBuckets(FolderLocationName parent) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists buckets (Beta). + * Lists buckets. * *

Sample code: * @@ -715,7 +725,7 @@ public final ListBucketsPagedResponse listBuckets(BillingAccountLocationName par // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists buckets (Beta). + * Lists buckets. * *

Sample code: * @@ -747,7 +757,7 @@ public final ListBucketsPagedResponse listBuckets(LocationName parent) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists buckets (Beta). + * Lists buckets. * *

Sample code: * @@ -776,7 +786,7 @@ public final ListBucketsPagedResponse listBuckets(String parent) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists buckets (Beta). + * Lists buckets. * *

Sample code: * @@ -801,7 +811,7 @@ public final ListBucketsPagedResponse listBuckets(ListBucketsRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists buckets (Beta). + * Lists buckets. * *

Sample code: * @@ -826,7 +836,7 @@ public final ListBucketsPagedResponse listBuckets(ListBucketsRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists buckets (Beta). + * Lists buckets. * *

Sample code: * @@ -857,7 +867,7 @@ public final UnaryCallable listBucketsC // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets a bucket (Beta). + * Gets a bucket. * *

Sample code: * @@ -880,7 +890,7 @@ public final LogBucket getBucket(GetBucketRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets a bucket (Beta). + * Gets a bucket. * *

Sample code: * @@ -900,6 +910,61 @@ public final UnaryCallable getBucketCallable() { return stub.getBucketCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a bucket that can be used to store log entries. Once a bucket has been created, the + * region cannot be changed. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   String bucketId = "";
+   *   LogBucket bucket = LogBucket.newBuilder().build();
+   *   CreateBucketRequest request = CreateBucketRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setBucketId(bucketId)
+   *     .setBucket(bucket)
+   *     .build();
+   *   LogBucket response = configClient.createBucket(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 createBucket(CreateBucketRequest request) { + return createBucketCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a bucket that can be used to store log entries. Once a bucket has been created, the + * region cannot be changed. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   String bucketId = "";
+   *   LogBucket bucket = LogBucket.newBuilder().build();
+   *   CreateBucketRequest request = CreateBucketRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setBucketId(bucketId)
+   *     .setBucket(bucket)
+   *     .build();
+   *   ApiFuture<LogBucket> future = configClient.createBucketCallable().futureCall(request);
+   *   // Do something
+   *   LogBucket response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable createBucketCallable() { + return stub.createBucketCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Updates a bucket. This method replaces the following fields in the existing bucket with values @@ -911,7 +976,7 @@ public final UnaryCallable getBucketCallable() { *

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. + *

A buckets region may not be modified after it is created. * *

Sample code: * @@ -947,7 +1012,7 @@ public final LogBucket updateBucket(UpdateBucketRequest request) { *

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. + *

A buckets region may not be modified after it is created. * *

Sample code: * @@ -971,6 +1036,398 @@ public final UnaryCallable updateBucketCallable( return stub.updateBucketCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a bucket. Moves the bucket to the DELETE_REQUESTED state. After 7 days, the bucket will + * be purged and all logs in the bucket will be permanently deleted. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   LogBucketName name = LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]");
+   *   DeleteBucketRequest request = DeleteBucketRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   configClient.deleteBucket(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 deleteBucket(DeleteBucketRequest request) { + deleteBucketCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a bucket. Moves the bucket to the DELETE_REQUESTED state. After 7 days, the bucket will + * be purged and all logs in the bucket will be permanently deleted. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   LogBucketName name = LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]");
+   *   DeleteBucketRequest request = DeleteBucketRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = configClient.deleteBucketCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteBucketCallable() { + return stub.deleteBucketCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Undeletes a bucket. A bucket that has been deleted may be undeleted within the grace period of + * 7 days. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   LogBucketName name = LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]");
+   *   UndeleteBucketRequest request = UndeleteBucketRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   configClient.undeleteBucket(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 undeleteBucket(UndeleteBucketRequest request) { + undeleteBucketCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Undeletes a bucket. A bucket that has been deleted may be undeleted within the grace period of + * 7 days. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   LogBucketName name = LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]");
+   *   UndeleteBucketRequest request = UndeleteBucketRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = configClient.undeleteBucketCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable undeleteBucketCallable() { + return stub.undeleteBucketCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists views on a bucket. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   String parent = "";
+   *   for (LogView element : configClient.listViews(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The bucket whose views are to be listed: + *

"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListViewsPagedResponse listViews(String parent) { + ListViewsRequest request = ListViewsRequest.newBuilder().setParent(parent).build(); + return listViews(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists views on a bucket. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   String parent = "";
+   *   ListViewsRequest request = ListViewsRequest.newBuilder()
+   *     .setParent(parent)
+   *     .build();
+   *   for (LogView element : configClient.listViews(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 ListViewsPagedResponse listViews(ListViewsRequest request) { + return listViewsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists views on a bucket. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   String parent = "";
+   *   ListViewsRequest request = ListViewsRequest.newBuilder()
+   *     .setParent(parent)
+   *     .build();
+   *   ApiFuture<ListViewsPagedResponse> future = configClient.listViewsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (LogView element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listViewsPagedCallable() { + return stub.listViewsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists views on a bucket. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   String parent = "";
+   *   ListViewsRequest request = ListViewsRequest.newBuilder()
+   *     .setParent(parent)
+   *     .build();
+   *   while (true) {
+   *     ListViewsResponse response = configClient.listViewsCallable().call(request);
+   *     for (LogView element : response.getViewsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listViewsCallable() { + return stub.listViewsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a view. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   LogViewName name = LogViewName.ofProjectLocationBucketViewName("[PROJECT]", "[LOCATION]", "[BUCKET]", "[VIEW]");
+   *   GetViewRequest request = GetViewRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   LogView response = configClient.getView(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 LogView getView(GetViewRequest request) { + return getViewCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a view. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   LogViewName name = LogViewName.ofProjectLocationBucketViewName("[PROJECT]", "[LOCATION]", "[BUCKET]", "[VIEW]");
+   *   GetViewRequest request = GetViewRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<LogView> future = configClient.getViewCallable().futureCall(request);
+   *   // Do something
+   *   LogView response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getViewCallable() { + return stub.getViewCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a view over logs in a bucket. A bucket may contain a maximum of 50 views. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   String parent = "";
+   *   String viewId = "";
+   *   LogView view = LogView.newBuilder().build();
+   *   CreateViewRequest request = CreateViewRequest.newBuilder()
+   *     .setParent(parent)
+   *     .setViewId(viewId)
+   *     .setView(view)
+   *     .build();
+   *   LogView response = configClient.createView(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 LogView createView(CreateViewRequest request) { + return createViewCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a view over logs in a bucket. A bucket may contain a maximum of 50 views. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   String parent = "";
+   *   String viewId = "";
+   *   LogView view = LogView.newBuilder().build();
+   *   CreateViewRequest request = CreateViewRequest.newBuilder()
+   *     .setParent(parent)
+   *     .setViewId(viewId)
+   *     .setView(view)
+   *     .build();
+   *   ApiFuture<LogView> future = configClient.createViewCallable().futureCall(request);
+   *   // Do something
+   *   LogView response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable createViewCallable() { + return stub.createViewCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a view. This method replaces the following fields in the existing view with values from + * the new view: `filter`. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   String name = "";
+   *   LogView view = LogView.newBuilder().build();
+   *   UpdateViewRequest request = UpdateViewRequest.newBuilder()
+   *     .setName(name)
+   *     .setView(view)
+   *     .build();
+   *   LogView response = configClient.updateView(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 LogView updateView(UpdateViewRequest request) { + return updateViewCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a view. This method replaces the following fields in the existing view with values from + * the new view: `filter`. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   String name = "";
+   *   LogView view = LogView.newBuilder().build();
+   *   UpdateViewRequest request = UpdateViewRequest.newBuilder()
+   *     .setName(name)
+   *     .setView(view)
+   *     .build();
+   *   ApiFuture<LogView> future = configClient.updateViewCallable().futureCall(request);
+   *   // Do something
+   *   LogView response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable updateViewCallable() { + return stub.updateViewCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a view from a bucket. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   LogViewName name = LogViewName.ofProjectLocationBucketViewName("[PROJECT]", "[LOCATION]", "[BUCKET]", "[VIEW]");
+   *   DeleteViewRequest request = DeleteViewRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   configClient.deleteView(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 deleteView(DeleteViewRequest request) { + deleteViewCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a view from a bucket. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   LogViewName name = LogViewName.ofProjectLocationBucketViewName("[PROJECT]", "[LOCATION]", "[BUCKET]", "[VIEW]");
+   *   DeleteViewRequest request = DeleteViewRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = configClient.deleteViewCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteViewCallable() { + return stub.deleteViewCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Lists sinks. @@ -2402,6 +2859,86 @@ protected ListBucketsFixedSizeCollection createCollection( } } + public static class ListViewsPagedResponse + extends AbstractPagedListResponse< + ListViewsRequest, + ListViewsResponse, + LogView, + ListViewsPage, + ListViewsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListViewsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListViewsPagedResponse apply(ListViewsPage input) { + return new ListViewsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListViewsPagedResponse(ListViewsPage page) { + super(page, ListViewsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListViewsPage + extends AbstractPage { + + private ListViewsPage( + PageContext context, + ListViewsResponse response) { + super(context, response); + } + + private static ListViewsPage createEmptyPage() { + return new ListViewsPage(null, null); + } + + @Override + protected ListViewsPage createPage( + PageContext context, + ListViewsResponse response) { + return new ListViewsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListViewsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListViewsRequest, + ListViewsResponse, + LogView, + ListViewsPage, + ListViewsFixedSizeCollection> { + + private ListViewsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListViewsFixedSizeCollection createEmptyCollection() { + return new ListViewsFixedSizeCollection(null, 0); + } + + @Override + protected ListViewsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListViewsFixedSizeCollection(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 a27a8dcf3..7d395ea86 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 @@ -18,6 +18,7 @@ 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; +import static com.google.cloud.logging.v2.ConfigClient.ListViewsPagedResponse; import com.google.api.core.ApiFunction; import com.google.api.core.BetaApi; @@ -32,27 +33,37 @@ import com.google.api.gax.rpc.UnaryCallSettings; import com.google.cloud.logging.v2.stub.ConfigServiceV2StubSettings; import com.google.logging.v2.CmekSettings; +import com.google.logging.v2.CreateBucketRequest; import com.google.logging.v2.CreateExclusionRequest; import com.google.logging.v2.CreateSinkRequest; +import com.google.logging.v2.CreateViewRequest; +import com.google.logging.v2.DeleteBucketRequest; import com.google.logging.v2.DeleteExclusionRequest; import com.google.logging.v2.DeleteSinkRequest; +import com.google.logging.v2.DeleteViewRequest; 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.GetViewRequest; 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.ListViewsRequest; +import com.google.logging.v2.ListViewsResponse; import com.google.logging.v2.LogBucket; import com.google.logging.v2.LogExclusion; import com.google.logging.v2.LogSink; +import com.google.logging.v2.LogView; +import com.google.logging.v2.UndeleteBucketRequest; import com.google.logging.v2.UpdateBucketRequest; import com.google.logging.v2.UpdateCmekSettingsRequest; import com.google.logging.v2.UpdateExclusionRequest; import com.google.logging.v2.UpdateSinkRequest; +import com.google.logging.v2.UpdateViewRequest; import com.google.protobuf.Empty; import java.io.IOException; import java.util.List; @@ -118,11 +129,52 @@ public UnaryCallSettings getBucketSettings() { return ((ConfigServiceV2StubSettings) getStubSettings()).getBucketSettings(); } + /** Returns the object with the settings used for calls to createBucket. */ + public UnaryCallSettings createBucketSettings() { + return ((ConfigServiceV2StubSettings) getStubSettings()).createBucketSettings(); + } + /** 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 deleteBucket. */ + public UnaryCallSettings deleteBucketSettings() { + return ((ConfigServiceV2StubSettings) getStubSettings()).deleteBucketSettings(); + } + + /** Returns the object with the settings used for calls to undeleteBucket. */ + public UnaryCallSettings undeleteBucketSettings() { + return ((ConfigServiceV2StubSettings) getStubSettings()).undeleteBucketSettings(); + } + + /** Returns the object with the settings used for calls to listViews. */ + public PagedCallSettings + listViewsSettings() { + return ((ConfigServiceV2StubSettings) getStubSettings()).listViewsSettings(); + } + + /** Returns the object with the settings used for calls to getView. */ + public UnaryCallSettings getViewSettings() { + return ((ConfigServiceV2StubSettings) getStubSettings()).getViewSettings(); + } + + /** Returns the object with the settings used for calls to createView. */ + public UnaryCallSettings createViewSettings() { + return ((ConfigServiceV2StubSettings) getStubSettings()).createViewSettings(); + } + + /** Returns the object with the settings used for calls to updateView. */ + public UnaryCallSettings updateViewSettings() { + return ((ConfigServiceV2StubSettings) getStubSettings()).updateViewSettings(); + } + + /** Returns the object with the settings used for calls to deleteView. */ + public UnaryCallSettings deleteViewSettings() { + return ((ConfigServiceV2StubSettings) getStubSettings()).deleteViewSettings(); + } + /** Returns the object with the settings used for calls to listSinks. */ public PagedCallSettings listSinksSettings() { @@ -294,11 +346,52 @@ public UnaryCallSettings.Builder getBucketSettings( return getStubSettingsBuilder().getBucketSettings(); } + /** Returns the builder for the settings used for calls to createBucket. */ + public UnaryCallSettings.Builder createBucketSettings() { + return getStubSettingsBuilder().createBucketSettings(); + } + /** 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 deleteBucket. */ + public UnaryCallSettings.Builder deleteBucketSettings() { + return getStubSettingsBuilder().deleteBucketSettings(); + } + + /** Returns the builder for the settings used for calls to undeleteBucket. */ + public UnaryCallSettings.Builder undeleteBucketSettings() { + return getStubSettingsBuilder().undeleteBucketSettings(); + } + + /** Returns the builder for the settings used for calls to listViews. */ + public PagedCallSettings.Builder + listViewsSettings() { + return getStubSettingsBuilder().listViewsSettings(); + } + + /** Returns the builder for the settings used for calls to getView. */ + public UnaryCallSettings.Builder getViewSettings() { + return getStubSettingsBuilder().getViewSettings(); + } + + /** Returns the builder for the settings used for calls to createView. */ + public UnaryCallSettings.Builder createViewSettings() { + return getStubSettingsBuilder().createViewSettings(); + } + + /** Returns the builder for the settings used for calls to updateView. */ + public UnaryCallSettings.Builder updateViewSettings() { + return getStubSettingsBuilder().updateViewSettings(); + } + + /** Returns the builder for the settings used for calls to deleteView. */ + public UnaryCallSettings.Builder deleteViewSettings() { + return getStubSettingsBuilder().deleteViewSettings(); + } + /** Returns the builder for the settings used for calls to listSinks. */ public PagedCallSettings.Builder listSinksSettings() { 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 bcdcd6935..4adc0f982 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 @@ -18,32 +18,43 @@ 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; +import static com.google.cloud.logging.v2.ConfigClient.ListViewsPagedResponse; import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.UnaryCallable; import com.google.logging.v2.CmekSettings; +import com.google.logging.v2.CreateBucketRequest; import com.google.logging.v2.CreateExclusionRequest; import com.google.logging.v2.CreateSinkRequest; +import com.google.logging.v2.CreateViewRequest; +import com.google.logging.v2.DeleteBucketRequest; import com.google.logging.v2.DeleteExclusionRequest; import com.google.logging.v2.DeleteSinkRequest; +import com.google.logging.v2.DeleteViewRequest; 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.GetViewRequest; 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.ListViewsRequest; +import com.google.logging.v2.ListViewsResponse; import com.google.logging.v2.LogBucket; import com.google.logging.v2.LogExclusion; import com.google.logging.v2.LogSink; +import com.google.logging.v2.LogView; +import com.google.logging.v2.UndeleteBucketRequest; import com.google.logging.v2.UpdateBucketRequest; import com.google.logging.v2.UpdateCmekSettingsRequest; import com.google.logging.v2.UpdateExclusionRequest; import com.google.logging.v2.UpdateSinkRequest; +import com.google.logging.v2.UpdateViewRequest; import com.google.protobuf.Empty; import javax.annotation.Generated; @@ -81,10 +92,46 @@ public UnaryCallable getBucketCallable() { throw new UnsupportedOperationException("Not implemented: getBucketCallable()"); } + public UnaryCallable createBucketCallable() { + throw new UnsupportedOperationException("Not implemented: createBucketCallable()"); + } + public UnaryCallable updateBucketCallable() { throw new UnsupportedOperationException("Not implemented: updateBucketCallable()"); } + public UnaryCallable deleteBucketCallable() { + throw new UnsupportedOperationException("Not implemented: deleteBucketCallable()"); + } + + public UnaryCallable undeleteBucketCallable() { + throw new UnsupportedOperationException("Not implemented: undeleteBucketCallable()"); + } + + public UnaryCallable listViewsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listViewsPagedCallable()"); + } + + public UnaryCallable listViewsCallable() { + throw new UnsupportedOperationException("Not implemented: listViewsCallable()"); + } + + public UnaryCallable getViewCallable() { + throw new UnsupportedOperationException("Not implemented: getViewCallable()"); + } + + public UnaryCallable createViewCallable() { + throw new UnsupportedOperationException("Not implemented: createViewCallable()"); + } + + public UnaryCallable updateViewCallable() { + throw new UnsupportedOperationException("Not implemented: updateViewCallable()"); + } + + public UnaryCallable deleteViewCallable() { + throw new UnsupportedOperationException("Not implemented: deleteViewCallable()"); + } + public UnaryCallable listSinksPagedCallable() { throw new UnsupportedOperationException("Not implemented: listSinksPagedCallable()"); } 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 21b3c6c23..df47ec922 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 @@ -18,6 +18,7 @@ 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; +import static com.google.cloud.logging.v2.ConfigClient.ListViewsPagedResponse; import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; @@ -46,27 +47,37 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; import com.google.logging.v2.CmekSettings; +import com.google.logging.v2.CreateBucketRequest; import com.google.logging.v2.CreateExclusionRequest; import com.google.logging.v2.CreateSinkRequest; +import com.google.logging.v2.CreateViewRequest; +import com.google.logging.v2.DeleteBucketRequest; import com.google.logging.v2.DeleteExclusionRequest; import com.google.logging.v2.DeleteSinkRequest; +import com.google.logging.v2.DeleteViewRequest; 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.GetViewRequest; 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.ListViewsRequest; +import com.google.logging.v2.ListViewsResponse; import com.google.logging.v2.LogBucket; import com.google.logging.v2.LogExclusion; import com.google.logging.v2.LogSink; +import com.google.logging.v2.LogView; +import com.google.logging.v2.UndeleteBucketRequest; import com.google.logging.v2.UpdateBucketRequest; import com.google.logging.v2.UpdateCmekSettingsRequest; import com.google.logging.v2.UpdateExclusionRequest; import com.google.logging.v2.UpdateSinkRequest; +import com.google.logging.v2.UpdateViewRequest; import com.google.protobuf.Empty; import java.io.IOException; import java.util.List; @@ -123,7 +134,16 @@ public class ConfigServiceV2StubSettings extends StubSettings listBucketsSettings; private final UnaryCallSettings getBucketSettings; + private final UnaryCallSettings createBucketSettings; private final UnaryCallSettings updateBucketSettings; + private final UnaryCallSettings deleteBucketSettings; + private final UnaryCallSettings undeleteBucketSettings; + private final PagedCallSettings + listViewsSettings; + private final UnaryCallSettings getViewSettings; + private final UnaryCallSettings createViewSettings; + private final UnaryCallSettings updateViewSettings; + private final UnaryCallSettings deleteViewSettings; private final PagedCallSettings listSinksSettings; private final UnaryCallSettings getSinkSettings; @@ -164,11 +184,52 @@ public UnaryCallSettings getBucketSettings() { return getBucketSettings; } + /** Returns the object with the settings used for calls to createBucket. */ + public UnaryCallSettings createBucketSettings() { + return createBucketSettings; + } + /** 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 deleteBucket. */ + public UnaryCallSettings deleteBucketSettings() { + return deleteBucketSettings; + } + + /** Returns the object with the settings used for calls to undeleteBucket. */ + public UnaryCallSettings undeleteBucketSettings() { + return undeleteBucketSettings; + } + + /** Returns the object with the settings used for calls to listViews. */ + public PagedCallSettings + listViewsSettings() { + return listViewsSettings; + } + + /** Returns the object with the settings used for calls to getView. */ + public UnaryCallSettings getViewSettings() { + return getViewSettings; + } + + /** Returns the object with the settings used for calls to createView. */ + public UnaryCallSettings createViewSettings() { + return createViewSettings; + } + + /** Returns the object with the settings used for calls to updateView. */ + public UnaryCallSettings updateViewSettings() { + return updateViewSettings; + } + + /** Returns the object with the settings used for calls to deleteView. */ + public UnaryCallSettings deleteViewSettings() { + return deleteViewSettings; + } + /** Returns the object with the settings used for calls to listSinks. */ public PagedCallSettings listSinksSettings() { @@ -291,7 +352,15 @@ protected ConfigServiceV2StubSettings(Builder settingsBuilder) throws IOExceptio deleteExclusionSettings = settingsBuilder.deleteExclusionSettings().build(); listBucketsSettings = settingsBuilder.listBucketsSettings().build(); getBucketSettings = settingsBuilder.getBucketSettings().build(); + createBucketSettings = settingsBuilder.createBucketSettings().build(); updateBucketSettings = settingsBuilder.updateBucketSettings().build(); + deleteBucketSettings = settingsBuilder.deleteBucketSettings().build(); + undeleteBucketSettings = settingsBuilder.undeleteBucketSettings().build(); + listViewsSettings = settingsBuilder.listViewsSettings().build(); + getViewSettings = settingsBuilder.getViewSettings().build(); + createViewSettings = settingsBuilder.createViewSettings().build(); + updateViewSettings = settingsBuilder.updateViewSettings().build(); + deleteViewSettings = settingsBuilder.deleteViewSettings().build(); listSinksSettings = settingsBuilder.listSinksSettings().build(); getSinkSettings = settingsBuilder.getSinkSettings().build(); createSinkSettings = settingsBuilder.createSinkSettings().build(); @@ -339,6 +408,42 @@ public Iterable extractResources(ListBucketsResponse payload) { } }; + private static final PagedListDescriptor + LIST_VIEWS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListViewsRequest injectToken(ListViewsRequest payload, String token) { + return ListViewsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListViewsRequest injectPageSize(ListViewsRequest payload, int pageSize) { + return ListViewsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListViewsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListViewsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListViewsResponse payload) { + return payload.getViewsList() != null + ? payload.getViewsList() + : ImmutableList.of(); + } + }; + private static final PagedListDescriptor LIST_SINKS_PAGE_STR_DESC = new PagedListDescriptor() { @@ -430,6 +535,23 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListViewsRequest, ListViewsResponse, ListViewsPagedResponse> + LIST_VIEWS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListViewsRequest, ListViewsResponse, ListViewsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListViewsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_VIEWS_PAGE_STR_DESC, request, context); + return ListViewsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + private static final PagedListResponseFactory< ListSinksRequest, ListSinksResponse, ListSinksPagedResponse> LIST_SINKS_PAGE_STR_FACT = @@ -475,7 +597,17 @@ public static class Builder extends StubSettings.Builder listBucketsSettings; private final UnaryCallSettings.Builder getBucketSettings; + private final UnaryCallSettings.Builder createBucketSettings; private final UnaryCallSettings.Builder updateBucketSettings; + private final UnaryCallSettings.Builder deleteBucketSettings; + private final UnaryCallSettings.Builder undeleteBucketSettings; + private final PagedCallSettings.Builder< + ListViewsRequest, ListViewsResponse, ListViewsPagedResponse> + listViewsSettings; + private final UnaryCallSettings.Builder getViewSettings; + private final UnaryCallSettings.Builder createViewSettings; + private final UnaryCallSettings.Builder updateViewSettings; + private final UnaryCallSettings.Builder deleteViewSettings; private final PagedCallSettings.Builder< ListSinksRequest, ListSinksResponse, ListSinksPagedResponse> listSinksSettings; @@ -559,8 +691,24 @@ protected Builder(ClientContext clientContext) { getBucketSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createBucketSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateBucketSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteBucketSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + undeleteBucketSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listViewsSettings = PagedCallSettings.newBuilder(LIST_VIEWS_PAGE_STR_FACT); + + getViewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + createViewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + updateViewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + deleteViewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listSinksSettings = PagedCallSettings.newBuilder(LIST_SINKS_PAGE_STR_FACT); getSinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -586,7 +734,15 @@ protected Builder(ClientContext clientContext) { deleteExclusionSettings, listBucketsSettings, getBucketSettings, + createBucketSettings, updateBucketSettings, + deleteBucketSettings, + undeleteBucketSettings, + listViewsSettings, + getViewSettings, + createViewSettings, + updateViewSettings, + deleteViewSettings, listSinksSettings, getSinkSettings, createSinkSettings, @@ -636,11 +792,51 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .createBucketSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .updateBucketSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .deleteBucketSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .undeleteBucketSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listViewsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getViewSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createViewSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateViewSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteViewSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .listSinksSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) @@ -697,7 +893,15 @@ protected Builder(ConfigServiceV2StubSettings settings) { deleteExclusionSettings = settings.deleteExclusionSettings.toBuilder(); listBucketsSettings = settings.listBucketsSettings.toBuilder(); getBucketSettings = settings.getBucketSettings.toBuilder(); + createBucketSettings = settings.createBucketSettings.toBuilder(); updateBucketSettings = settings.updateBucketSettings.toBuilder(); + deleteBucketSettings = settings.deleteBucketSettings.toBuilder(); + undeleteBucketSettings = settings.undeleteBucketSettings.toBuilder(); + listViewsSettings = settings.listViewsSettings.toBuilder(); + getViewSettings = settings.getViewSettings.toBuilder(); + createViewSettings = settings.createViewSettings.toBuilder(); + updateViewSettings = settings.updateViewSettings.toBuilder(); + deleteViewSettings = settings.deleteViewSettings.toBuilder(); listSinksSettings = settings.listSinksSettings.toBuilder(); getSinkSettings = settings.getSinkSettings.toBuilder(); createSinkSettings = settings.createSinkSettings.toBuilder(); @@ -715,7 +919,15 @@ protected Builder(ConfigServiceV2StubSettings settings) { deleteExclusionSettings, listBucketsSettings, getBucketSettings, + createBucketSettings, updateBucketSettings, + deleteBucketSettings, + undeleteBucketSettings, + listViewsSettings, + getViewSettings, + createViewSettings, + updateViewSettings, + deleteViewSettings, listSinksSettings, getSinkSettings, createSinkSettings, @@ -770,11 +982,52 @@ public UnaryCallSettings.Builder getBucketSettings( return getBucketSettings; } + /** Returns the builder for the settings used for calls to createBucket. */ + public UnaryCallSettings.Builder createBucketSettings() { + return createBucketSettings; + } + /** 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 deleteBucket. */ + public UnaryCallSettings.Builder deleteBucketSettings() { + return deleteBucketSettings; + } + + /** Returns the builder for the settings used for calls to undeleteBucket. */ + public UnaryCallSettings.Builder undeleteBucketSettings() { + return undeleteBucketSettings; + } + + /** Returns the builder for the settings used for calls to listViews. */ + public PagedCallSettings.Builder + listViewsSettings() { + return listViewsSettings; + } + + /** Returns the builder for the settings used for calls to getView. */ + public UnaryCallSettings.Builder getViewSettings() { + return getViewSettings; + } + + /** Returns the builder for the settings used for calls to createView. */ + public UnaryCallSettings.Builder createViewSettings() { + return createViewSettings; + } + + /** Returns the builder for the settings used for calls to updateView. */ + public UnaryCallSettings.Builder updateViewSettings() { + return updateViewSettings; + } + + /** Returns the builder for the settings used for calls to deleteView. */ + public UnaryCallSettings.Builder deleteViewSettings() { + return deleteViewSettings; + } + /** Returns the builder for the settings used for calls to listSinks. */ public PagedCallSettings.Builder listSinksSettings() { 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 76349234f..35cf7403a 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 @@ -18,6 +18,7 @@ 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; +import static com.google.cloud.logging.v2.ConfigClient.ListViewsPagedResponse; import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; @@ -29,27 +30,37 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.common.collect.ImmutableMap; import com.google.logging.v2.CmekSettings; +import com.google.logging.v2.CreateBucketRequest; import com.google.logging.v2.CreateExclusionRequest; import com.google.logging.v2.CreateSinkRequest; +import com.google.logging.v2.CreateViewRequest; +import com.google.logging.v2.DeleteBucketRequest; import com.google.logging.v2.DeleteExclusionRequest; import com.google.logging.v2.DeleteSinkRequest; +import com.google.logging.v2.DeleteViewRequest; 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.GetViewRequest; 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.ListViewsRequest; +import com.google.logging.v2.ListViewsResponse; import com.google.logging.v2.LogBucket; import com.google.logging.v2.LogExclusion; import com.google.logging.v2.LogSink; +import com.google.logging.v2.LogView; +import com.google.logging.v2.UndeleteBucketRequest; import com.google.logging.v2.UpdateBucketRequest; import com.google.logging.v2.UpdateCmekSettingsRequest; import com.google.logging.v2.UpdateExclusionRequest; import com.google.logging.v2.UpdateSinkRequest; +import com.google.logging.v2.UpdateViewRequest; import com.google.protobuf.Empty; import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; @@ -107,6 +118,14 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setRequestMarshaller(ProtoUtils.marshaller(GetBucketRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(LogBucket.getDefaultInstance())) .build(); + private static final MethodDescriptor + createBucketMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.logging.v2.ConfigServiceV2/CreateBucket") + .setRequestMarshaller(ProtoUtils.marshaller(CreateBucketRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(LogBucket.getDefaultInstance())) + .build(); private static final MethodDescriptor updateBucketMethodDescriptor = MethodDescriptor.newBuilder() @@ -115,6 +134,58 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setRequestMarshaller(ProtoUtils.marshaller(UpdateBucketRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(LogBucket.getDefaultInstance())) .build(); + private static final MethodDescriptor deleteBucketMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.logging.v2.ConfigServiceV2/DeleteBucket") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteBucketRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor + undeleteBucketMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.logging.v2.ConfigServiceV2/UndeleteBucket") + .setRequestMarshaller( + ProtoUtils.marshaller(UndeleteBucketRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listViewsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.logging.v2.ConfigServiceV2/ListViews") + .setRequestMarshaller(ProtoUtils.marshaller(ListViewsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListViewsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor getViewMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.logging.v2.ConfigServiceV2/GetView") + .setRequestMarshaller(ProtoUtils.marshaller(GetViewRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(LogView.getDefaultInstance())) + .build(); + private static final MethodDescriptor createViewMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.logging.v2.ConfigServiceV2/CreateView") + .setRequestMarshaller(ProtoUtils.marshaller(CreateViewRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(LogView.getDefaultInstance())) + .build(); + private static final MethodDescriptor updateViewMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.logging.v2.ConfigServiceV2/UpdateView") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateViewRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(LogView.getDefaultInstance())) + .build(); + private static final MethodDescriptor deleteViewMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.logging.v2.ConfigServiceV2/DeleteView") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteViewRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); private static final MethodDescriptor listSinksMethodDescriptor = MethodDescriptor.newBuilder() @@ -201,7 +272,16 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { private final UnaryCallable listBucketsPagedCallable; private final UnaryCallable getBucketCallable; + private final UnaryCallable createBucketCallable; private final UnaryCallable updateBucketCallable; + private final UnaryCallable deleteBucketCallable; + private final UnaryCallable undeleteBucketCallable; + private final UnaryCallable listViewsCallable; + private final UnaryCallable listViewsPagedCallable; + private final UnaryCallable getViewCallable; + private final UnaryCallable createViewCallable; + private final UnaryCallable updateViewCallable; + private final UnaryCallable deleteViewCallable; private final UnaryCallable listSinksCallable; private final UnaryCallable listSinksPagedCallable; private final UnaryCallable getSinkCallable; @@ -321,6 +401,19 @@ public Map extract(GetBucketRequest request) { } }) .build(); + GrpcCallSettings createBucketTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createBucketMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateBucketRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); GrpcCallSettings updateBucketTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateBucketMethodDescriptor) @@ -334,6 +427,97 @@ public Map extract(UpdateBucketRequest request) { } }) .build(); + GrpcCallSettings deleteBucketTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteBucketMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteBucketRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings undeleteBucketTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(undeleteBucketMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UndeleteBucketRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings listViewsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listViewsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListViewsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getViewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getViewMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetViewRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createViewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createViewMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateViewRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateViewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateViewMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateViewRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteViewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteViewMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteViewRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); GrpcCallSettings listSinksTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listSinksMethodDescriptor) @@ -471,9 +655,36 @@ public Map extract(UpdateCmekSettingsRequest request) { this.getBucketCallable = callableFactory.createUnaryCallable( getBucketTransportSettings, settings.getBucketSettings(), clientContext); + this.createBucketCallable = + callableFactory.createUnaryCallable( + createBucketTransportSettings, settings.createBucketSettings(), clientContext); this.updateBucketCallable = callableFactory.createUnaryCallable( updateBucketTransportSettings, settings.updateBucketSettings(), clientContext); + this.deleteBucketCallable = + callableFactory.createUnaryCallable( + deleteBucketTransportSettings, settings.deleteBucketSettings(), clientContext); + this.undeleteBucketCallable = + callableFactory.createUnaryCallable( + undeleteBucketTransportSettings, settings.undeleteBucketSettings(), clientContext); + this.listViewsCallable = + callableFactory.createUnaryCallable( + listViewsTransportSettings, settings.listViewsSettings(), clientContext); + this.listViewsPagedCallable = + callableFactory.createPagedCallable( + listViewsTransportSettings, settings.listViewsSettings(), clientContext); + this.getViewCallable = + callableFactory.createUnaryCallable( + getViewTransportSettings, settings.getViewSettings(), clientContext); + this.createViewCallable = + callableFactory.createUnaryCallable( + createViewTransportSettings, settings.createViewSettings(), clientContext); + this.updateViewCallable = + callableFactory.createUnaryCallable( + updateViewTransportSettings, settings.updateViewSettings(), clientContext); + this.deleteViewCallable = + callableFactory.createUnaryCallable( + deleteViewTransportSettings, settings.deleteViewSettings(), clientContext); this.listSinksCallable = callableFactory.createUnaryCallable( listSinksTransportSettings, settings.listSinksSettings(), clientContext); @@ -537,10 +748,46 @@ public UnaryCallable getBucketCallable() { return getBucketCallable; } + public UnaryCallable createBucketCallable() { + return createBucketCallable; + } + public UnaryCallable updateBucketCallable() { return updateBucketCallable; } + public UnaryCallable deleteBucketCallable() { + return deleteBucketCallable; + } + + public UnaryCallable undeleteBucketCallable() { + return undeleteBucketCallable; + } + + public UnaryCallable listViewsPagedCallable() { + return listViewsPagedCallable; + } + + public UnaryCallable listViewsCallable() { + return listViewsCallable; + } + + public UnaryCallable getViewCallable() { + return getViewCallable; + } + + public UnaryCallable createViewCallable() { + return createViewCallable; + } + + public UnaryCallable updateViewCallable() { + return updateViewCallable; + } + + public UnaryCallable deleteViewCallable() { + return deleteViewCallable; + } + public UnaryCallable listSinksPagedCallable() { return listSinksPagedCallable; } 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 512e54c6f..911e33ac7 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 @@ -18,6 +18,7 @@ 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; +import static com.google.cloud.logging.v2.ConfigClient.ListViewsPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.grpc.GaxGrpcProperties; @@ -31,32 +32,43 @@ import com.google.logging.v2.BillingAccountName; import com.google.logging.v2.CmekSettings; import com.google.logging.v2.CmekSettingsName; +import com.google.logging.v2.CreateBucketRequest; import com.google.logging.v2.CreateExclusionRequest; import com.google.logging.v2.CreateSinkRequest; +import com.google.logging.v2.CreateViewRequest; +import com.google.logging.v2.DeleteBucketRequest; import com.google.logging.v2.DeleteExclusionRequest; import com.google.logging.v2.DeleteSinkRequest; +import com.google.logging.v2.DeleteViewRequest; 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.GetViewRequest; 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.ListViewsRequest; +import com.google.logging.v2.ListViewsResponse; 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.LogSinkName; +import com.google.logging.v2.LogView; +import com.google.logging.v2.LogViewName; import com.google.logging.v2.OrganizationLocationName; import com.google.logging.v2.ProjectName; +import com.google.logging.v2.UndeleteBucketRequest; import com.google.logging.v2.UpdateBucketRequest; import com.google.logging.v2.UpdateCmekSettingsRequest; import com.google.logging.v2.UpdateExclusionRequest; import com.google.logging.v2.UpdateSinkRequest; +import com.google.logging.v2.UpdateViewRequest; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; @@ -363,11 +375,13 @@ public void getBucketTest() { LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]"); String description = "description-1724546052"; int retentionDays = 1544391896; + boolean locked = true; LogBucket expectedResponse = LogBucket.newBuilder() .setName(name2.toString()) .setDescription(description) .setRetentionDays(retentionDays) + .setLocked(locked) .build(); mockConfigServiceV2.addResponse(expectedResponse); @@ -407,6 +421,73 @@ public void getBucketExceptionTest() throws Exception { } } + @Test + @SuppressWarnings("all") + public void createBucketTest() { + LogBucketName name = + LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]"); + String description = "description-1724546052"; + int retentionDays = 1544391896; + boolean locked = true; + LogBucket expectedResponse = + LogBucket.newBuilder() + .setName(name.toString()) + .setDescription(description) + .setRetentionDays(retentionDays) + .setLocked(locked) + .build(); + mockConfigServiceV2.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + String bucketId = "bucketId1837164432"; + LogBucket bucket = LogBucket.newBuilder().build(); + CreateBucketRequest request = + CreateBucketRequest.newBuilder() + .setParent(parent.toString()) + .setBucketId(bucketId) + .setBucket(bucket) + .build(); + + LogBucket actualResponse = client.createBucket(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfigServiceV2.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBucketRequest actualRequest = (CreateBucketRequest) actualRequests.get(0); + + Assert.assertEquals(parent, OrganizationLocationName.parse(actualRequest.getParent())); + Assert.assertEquals(bucketId, actualRequest.getBucketId()); + Assert.assertEquals(bucket, actualRequest.getBucket()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createBucketExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockConfigServiceV2.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + String bucketId = "bucketId1837164432"; + LogBucket bucket = LogBucket.newBuilder().build(); + CreateBucketRequest request = + CreateBucketRequest.newBuilder() + .setParent(parent.toString()) + .setBucketId(bucketId) + .setBucket(bucket) + .build(); + + client.createBucket(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + @Test @SuppressWarnings("all") public void updateBucketTest() { @@ -414,11 +495,13 @@ public void updateBucketTest() { LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]"); String description = "description-1724546052"; int retentionDays = 1544391896; + boolean locked = true; LogBucket expectedResponse = LogBucket.newBuilder() .setName(name2.toString()) .setDescription(description) .setRetentionDays(retentionDays) + .setLocked(locked) .build(); mockConfigServiceV2.addResponse(expectedResponse); @@ -474,6 +557,345 @@ public void updateBucketExceptionTest() throws Exception { } } + @Test + @SuppressWarnings("all") + public void deleteBucketTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockConfigServiceV2.addResponse(expectedResponse); + + LogBucketName name = + LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]"); + DeleteBucketRequest request = DeleteBucketRequest.newBuilder().setName(name.toString()).build(); + + client.deleteBucket(request); + + List actualRequests = mockConfigServiceV2.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteBucketRequest actualRequest = (DeleteBucketRequest) actualRequests.get(0); + + Assert.assertEquals(name, LogBucketName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteBucketExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockConfigServiceV2.addException(exception); + + try { + LogBucketName name = + LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]"); + DeleteBucketRequest request = + DeleteBucketRequest.newBuilder().setName(name.toString()).build(); + + client.deleteBucket(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void undeleteBucketTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockConfigServiceV2.addResponse(expectedResponse); + + LogBucketName name = + LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]"); + UndeleteBucketRequest request = + UndeleteBucketRequest.newBuilder().setName(name.toString()).build(); + + client.undeleteBucket(request); + + List actualRequests = mockConfigServiceV2.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UndeleteBucketRequest actualRequest = (UndeleteBucketRequest) actualRequests.get(0); + + Assert.assertEquals(name, LogBucketName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void undeleteBucketExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockConfigServiceV2.addException(exception); + + try { + LogBucketName name = + LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]"); + UndeleteBucketRequest request = + UndeleteBucketRequest.newBuilder().setName(name.toString()).build(); + + client.undeleteBucket(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listViewsTest() { + String nextPageToken = ""; + LogView viewsElement = LogView.newBuilder().build(); + List views = Arrays.asList(viewsElement); + ListViewsResponse expectedResponse = + ListViewsResponse.newBuilder().setNextPageToken(nextPageToken).addAllViews(views).build(); + mockConfigServiceV2.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListViewsPagedResponse pagedListResponse = client.listViews(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getViewsList().get(0), resources.get(0)); + + List actualRequests = mockConfigServiceV2.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListViewsRequest actualRequest = (ListViewsRequest) actualRequests.get(0); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listViewsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockConfigServiceV2.addException(exception); + + try { + String parent = "parent-995424086"; + + client.listViews(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getViewTest() { + LogViewName name2 = + LogViewName.ofProjectLocationBucketViewName( + "[PROJECT]", "[LOCATION]", "[BUCKET]", "[VIEW]"); + String description = "description-1724546052"; + String filter = "filter-1274492040"; + LogView expectedResponse = + LogView.newBuilder() + .setName(name2.toString()) + .setDescription(description) + .setFilter(filter) + .build(); + mockConfigServiceV2.addResponse(expectedResponse); + + LogViewName name = + LogViewName.ofProjectLocationBucketViewName( + "[PROJECT]", "[LOCATION]", "[BUCKET]", "[VIEW]"); + GetViewRequest request = GetViewRequest.newBuilder().setName(name.toString()).build(); + + LogView actualResponse = client.getView(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfigServiceV2.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetViewRequest actualRequest = (GetViewRequest) actualRequests.get(0); + + Assert.assertEquals(name, LogViewName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getViewExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockConfigServiceV2.addException(exception); + + try { + LogViewName name = + LogViewName.ofProjectLocationBucketViewName( + "[PROJECT]", "[LOCATION]", "[BUCKET]", "[VIEW]"); + GetViewRequest request = GetViewRequest.newBuilder().setName(name.toString()).build(); + + client.getView(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void createViewTest() { + LogViewName name = + LogViewName.ofProjectLocationBucketViewName( + "[PROJECT]", "[LOCATION]", "[BUCKET]", "[VIEW]"); + String description = "description-1724546052"; + String filter = "filter-1274492040"; + LogView expectedResponse = + LogView.newBuilder() + .setName(name.toString()) + .setDescription(description) + .setFilter(filter) + .build(); + mockConfigServiceV2.addResponse(expectedResponse); + + String parent = "parent-995424086"; + String viewId = "viewId454228213"; + LogView view = LogView.newBuilder().build(); + CreateViewRequest request = + CreateViewRequest.newBuilder().setParent(parent).setViewId(viewId).setView(view).build(); + + LogView actualResponse = client.createView(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfigServiceV2.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateViewRequest actualRequest = (CreateViewRequest) actualRequests.get(0); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(viewId, actualRequest.getViewId()); + Assert.assertEquals(view, actualRequest.getView()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createViewExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockConfigServiceV2.addException(exception); + + try { + String parent = "parent-995424086"; + String viewId = "viewId454228213"; + LogView view = LogView.newBuilder().build(); + CreateViewRequest request = + CreateViewRequest.newBuilder().setParent(parent).setViewId(viewId).setView(view).build(); + + client.createView(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void updateViewTest() { + LogViewName name2 = + LogViewName.ofProjectLocationBucketViewName( + "[PROJECT]", "[LOCATION]", "[BUCKET]", "[VIEW]"); + String description = "description-1724546052"; + String filter = "filter-1274492040"; + LogView expectedResponse = + LogView.newBuilder() + .setName(name2.toString()) + .setDescription(description) + .setFilter(filter) + .build(); + mockConfigServiceV2.addResponse(expectedResponse); + + String name = "name3373707"; + LogView view = LogView.newBuilder().build(); + UpdateViewRequest request = UpdateViewRequest.newBuilder().setName(name).setView(view).build(); + + LogView actualResponse = client.updateView(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfigServiceV2.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateViewRequest actualRequest = (UpdateViewRequest) actualRequests.get(0); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(view, actualRequest.getView()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void updateViewExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockConfigServiceV2.addException(exception); + + try { + String name = "name3373707"; + LogView view = LogView.newBuilder().build(); + UpdateViewRequest request = + UpdateViewRequest.newBuilder().setName(name).setView(view).build(); + + client.updateView(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void deleteViewTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockConfigServiceV2.addResponse(expectedResponse); + + LogViewName name = + LogViewName.ofProjectLocationBucketViewName( + "[PROJECT]", "[LOCATION]", "[BUCKET]", "[VIEW]"); + DeleteViewRequest request = DeleteViewRequest.newBuilder().setName(name.toString()).build(); + + client.deleteView(request); + + List actualRequests = mockConfigServiceV2.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteViewRequest actualRequest = (DeleteViewRequest) actualRequests.get(0); + + Assert.assertEquals(name, LogViewName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteViewExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockConfigServiceV2.addException(exception); + + try { + LogViewName name = + LogViewName.ofProjectLocationBucketViewName( + "[PROJECT]", "[LOCATION]", "[BUCKET]", "[VIEW]"); + DeleteViewRequest request = DeleteViewRequest.newBuilder().setName(name.toString()).build(); + + client.deleteView(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + @Test @SuppressWarnings("all") public void listSinksTest() { 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 2ca8ed4f2..6f82b09b9 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 @@ -18,27 +18,37 @@ import com.google.api.core.BetaApi; import com.google.logging.v2.CmekSettings; import com.google.logging.v2.ConfigServiceV2Grpc.ConfigServiceV2ImplBase; +import com.google.logging.v2.CreateBucketRequest; import com.google.logging.v2.CreateExclusionRequest; import com.google.logging.v2.CreateSinkRequest; +import com.google.logging.v2.CreateViewRequest; +import com.google.logging.v2.DeleteBucketRequest; import com.google.logging.v2.DeleteExclusionRequest; import com.google.logging.v2.DeleteSinkRequest; +import com.google.logging.v2.DeleteViewRequest; 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.GetViewRequest; 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.ListViewsRequest; +import com.google.logging.v2.ListViewsResponse; import com.google.logging.v2.LogBucket; import com.google.logging.v2.LogExclusion; import com.google.logging.v2.LogSink; +import com.google.logging.v2.LogView; +import com.google.logging.v2.UndeleteBucketRequest; import com.google.logging.v2.UpdateBucketRequest; import com.google.logging.v2.UpdateCmekSettingsRequest; import com.google.logging.v2.UpdateExclusionRequest; import com.google.logging.v2.UpdateSinkRequest; +import com.google.logging.v2.UpdateViewRequest; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Empty; import io.grpc.stub.StreamObserver; @@ -108,6 +118,21 @@ public void getBucket(GetBucketRequest request, StreamObserver respon } } + @Override + public void createBucket( + CreateBucketRequest 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) { @@ -123,6 +148,106 @@ public void updateBucket( } } + @Override + public void deleteBucket(DeleteBucketRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext((Empty) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void undeleteBucket( + UndeleteBucketRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext((Empty) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listViews( + ListViewsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListViewsResponse) { + requests.add(request); + responseObserver.onNext((ListViewsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getView(GetViewRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof LogView) { + requests.add(request); + responseObserver.onNext((LogView) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void createView(CreateViewRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof LogView) { + requests.add(request); + responseObserver.onNext((LogView) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateView(UpdateViewRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof LogView) { + requests.add(request); + responseObserver.onNext((LogView) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteView(DeleteViewRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext((Empty) 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/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 67b3600ff..a57bf673c 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 @@ -121,6 +121,47 @@ private ConfigServiceV2Grpc() {} return getGetBucketMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.logging.v2.CreateBucketRequest, com.google.logging.v2.LogBucket> + getCreateBucketMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateBucket", + requestType = com.google.logging.v2.CreateBucketRequest.class, + responseType = com.google.logging.v2.LogBucket.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.logging.v2.CreateBucketRequest, com.google.logging.v2.LogBucket> + getCreateBucketMethod() { + io.grpc.MethodDescriptor< + com.google.logging.v2.CreateBucketRequest, com.google.logging.v2.LogBucket> + getCreateBucketMethod; + if ((getCreateBucketMethod = ConfigServiceV2Grpc.getCreateBucketMethod) == null) { + synchronized (ConfigServiceV2Grpc.class) { + if ((getCreateBucketMethod = ConfigServiceV2Grpc.getCreateBucketMethod) == null) { + ConfigServiceV2Grpc.getCreateBucketMethod = + getCreateBucketMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateBucket")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.logging.v2.CreateBucketRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.logging.v2.LogBucket.getDefaultInstance())) + .setSchemaDescriptor( + new ConfigServiceV2MethodDescriptorSupplier("CreateBucket")) + .build(); + } + } + } + return getCreateBucketMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.logging.v2.UpdateBucketRequest, com.google.logging.v2.LogBucket> getUpdateBucketMethod; @@ -162,6 +203,286 @@ private ConfigServiceV2Grpc() {} return getUpdateBucketMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.logging.v2.DeleteBucketRequest, com.google.protobuf.Empty> + getDeleteBucketMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteBucket", + requestType = com.google.logging.v2.DeleteBucketRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.logging.v2.DeleteBucketRequest, com.google.protobuf.Empty> + getDeleteBucketMethod() { + io.grpc.MethodDescriptor + getDeleteBucketMethod; + if ((getDeleteBucketMethod = ConfigServiceV2Grpc.getDeleteBucketMethod) == null) { + synchronized (ConfigServiceV2Grpc.class) { + if ((getDeleteBucketMethod = ConfigServiceV2Grpc.getDeleteBucketMethod) == null) { + ConfigServiceV2Grpc.getDeleteBucketMethod = + getDeleteBucketMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteBucket")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.logging.v2.DeleteBucketRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new ConfigServiceV2MethodDescriptorSupplier("DeleteBucket")) + .build(); + } + } + } + return getDeleteBucketMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.logging.v2.UndeleteBucketRequest, com.google.protobuf.Empty> + getUndeleteBucketMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UndeleteBucket", + requestType = com.google.logging.v2.UndeleteBucketRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.logging.v2.UndeleteBucketRequest, com.google.protobuf.Empty> + getUndeleteBucketMethod() { + io.grpc.MethodDescriptor + getUndeleteBucketMethod; + if ((getUndeleteBucketMethod = ConfigServiceV2Grpc.getUndeleteBucketMethod) == null) { + synchronized (ConfigServiceV2Grpc.class) { + if ((getUndeleteBucketMethod = ConfigServiceV2Grpc.getUndeleteBucketMethod) == null) { + ConfigServiceV2Grpc.getUndeleteBucketMethod = + getUndeleteBucketMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UndeleteBucket")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.logging.v2.UndeleteBucketRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new ConfigServiceV2MethodDescriptorSupplier("UndeleteBucket")) + .build(); + } + } + } + return getUndeleteBucketMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.logging.v2.ListViewsRequest, com.google.logging.v2.ListViewsResponse> + getListViewsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListViews", + requestType = com.google.logging.v2.ListViewsRequest.class, + responseType = com.google.logging.v2.ListViewsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.logging.v2.ListViewsRequest, com.google.logging.v2.ListViewsResponse> + getListViewsMethod() { + io.grpc.MethodDescriptor< + com.google.logging.v2.ListViewsRequest, com.google.logging.v2.ListViewsResponse> + getListViewsMethod; + if ((getListViewsMethod = ConfigServiceV2Grpc.getListViewsMethod) == null) { + synchronized (ConfigServiceV2Grpc.class) { + if ((getListViewsMethod = ConfigServiceV2Grpc.getListViewsMethod) == null) { + ConfigServiceV2Grpc.getListViewsMethod = + getListViewsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListViews")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.logging.v2.ListViewsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.logging.v2.ListViewsResponse.getDefaultInstance())) + .setSchemaDescriptor(new ConfigServiceV2MethodDescriptorSupplier("ListViews")) + .build(); + } + } + } + return getListViewsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.logging.v2.GetViewRequest, com.google.logging.v2.LogView> + getGetViewMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetView", + requestType = com.google.logging.v2.GetViewRequest.class, + responseType = com.google.logging.v2.LogView.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.logging.v2.GetViewRequest, com.google.logging.v2.LogView> + getGetViewMethod() { + io.grpc.MethodDescriptor + getGetViewMethod; + if ((getGetViewMethod = ConfigServiceV2Grpc.getGetViewMethod) == null) { + synchronized (ConfigServiceV2Grpc.class) { + if ((getGetViewMethod = ConfigServiceV2Grpc.getGetViewMethod) == null) { + ConfigServiceV2Grpc.getGetViewMethod = + getGetViewMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetView")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.logging.v2.GetViewRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.logging.v2.LogView.getDefaultInstance())) + .setSchemaDescriptor(new ConfigServiceV2MethodDescriptorSupplier("GetView")) + .build(); + } + } + } + return getGetViewMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.logging.v2.CreateViewRequest, com.google.logging.v2.LogView> + getCreateViewMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateView", + requestType = com.google.logging.v2.CreateViewRequest.class, + responseType = com.google.logging.v2.LogView.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.logging.v2.CreateViewRequest, com.google.logging.v2.LogView> + getCreateViewMethod() { + io.grpc.MethodDescriptor + getCreateViewMethod; + if ((getCreateViewMethod = ConfigServiceV2Grpc.getCreateViewMethod) == null) { + synchronized (ConfigServiceV2Grpc.class) { + if ((getCreateViewMethod = ConfigServiceV2Grpc.getCreateViewMethod) == null) { + ConfigServiceV2Grpc.getCreateViewMethod = + getCreateViewMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateView")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.logging.v2.CreateViewRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.logging.v2.LogView.getDefaultInstance())) + .setSchemaDescriptor( + new ConfigServiceV2MethodDescriptorSupplier("CreateView")) + .build(); + } + } + } + return getCreateViewMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.logging.v2.UpdateViewRequest, com.google.logging.v2.LogView> + getUpdateViewMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateView", + requestType = com.google.logging.v2.UpdateViewRequest.class, + responseType = com.google.logging.v2.LogView.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.logging.v2.UpdateViewRequest, com.google.logging.v2.LogView> + getUpdateViewMethod() { + io.grpc.MethodDescriptor + getUpdateViewMethod; + if ((getUpdateViewMethod = ConfigServiceV2Grpc.getUpdateViewMethod) == null) { + synchronized (ConfigServiceV2Grpc.class) { + if ((getUpdateViewMethod = ConfigServiceV2Grpc.getUpdateViewMethod) == null) { + ConfigServiceV2Grpc.getUpdateViewMethod = + getUpdateViewMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateView")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.logging.v2.UpdateViewRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.logging.v2.LogView.getDefaultInstance())) + .setSchemaDescriptor( + new ConfigServiceV2MethodDescriptorSupplier("UpdateView")) + .build(); + } + } + } + return getUpdateViewMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.logging.v2.DeleteViewRequest, com.google.protobuf.Empty> + getDeleteViewMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteView", + requestType = com.google.logging.v2.DeleteViewRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.logging.v2.DeleteViewRequest, com.google.protobuf.Empty> + getDeleteViewMethod() { + io.grpc.MethodDescriptor + getDeleteViewMethod; + if ((getDeleteViewMethod = ConfigServiceV2Grpc.getDeleteViewMethod) == null) { + synchronized (ConfigServiceV2Grpc.class) { + if ((getDeleteViewMethod = ConfigServiceV2Grpc.getDeleteViewMethod) == null) { + ConfigServiceV2Grpc.getDeleteViewMethod = + getDeleteViewMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteView")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.logging.v2.DeleteViewRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new ConfigServiceV2MethodDescriptorSupplier("DeleteView")) + .build(); + } + } + } + return getDeleteViewMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.logging.v2.ListSinksRequest, com.google.logging.v2.ListSinksResponse> getListSinksMethod; @@ -711,7 +1032,7 @@ public abstract static class ConfigServiceV2ImplBase implements io.grpc.Bindable * * *
-     * Lists buckets (Beta).
+     * Lists buckets.
      * 
*/ public void listBuckets( @@ -724,7 +1045,7 @@ public void listBuckets( * * *
-     * Gets a bucket (Beta).
+     * Gets a bucket.
      * 
*/ public void getBucket( @@ -733,6 +1054,20 @@ public void getBucket( asyncUnimplementedUnaryCall(getGetBucketMethod(), responseObserver); } + /** + * + * + *
+     * Creates a bucket that can be used to store log entries. Once a bucket has
+     * been created, the region cannot be changed.
+     * 
+ */ + public void createBucket( + com.google.logging.v2.CreateBucketRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateBucketMethod(), responseObserver); + } + /** * * @@ -744,7 +1079,6 @@ public void getBucket( * 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( @@ -753,6 +1087,103 @@ public void updateBucket( asyncUnimplementedUnaryCall(getUpdateBucketMethod(), responseObserver); } + /** + * + * + *
+     * Deletes a bucket.
+     * Moves the bucket to the DELETE_REQUESTED state. After 7 days, the
+     * bucket will be purged and all logs in the bucket will be permanently
+     * deleted.
+     * 
+ */ + public void deleteBucket( + com.google.logging.v2.DeleteBucketRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteBucketMethod(), responseObserver); + } + + /** + * + * + *
+     * Undeletes a bucket. A bucket that has been deleted may be undeleted within
+     * the grace period of 7 days.
+     * 
+ */ + public void undeleteBucket( + com.google.logging.v2.UndeleteBucketRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUndeleteBucketMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists views on a bucket.
+     * 
+ */ + public void listViews( + com.google.logging.v2.ListViewsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getListViewsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a view.
+     * 
+ */ + public void getView( + com.google.logging.v2.GetViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetViewMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a view over logs in a bucket. A bucket may contain a maximum of
+     * 50 views.
+     * 
+ */ + public void createView( + com.google.logging.v2.CreateViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateViewMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a view. This method replaces the following fields in the existing
+     * view with values from the new view: `filter`.
+     * 
+ */ + public void updateView( + com.google.logging.v2.UpdateViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateViewMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a view from a bucket.
+     * 
+ */ + public void deleteView( + com.google.logging.v2.DeleteViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteViewMethod(), responseObserver); + } + /** * * @@ -951,12 +1382,60 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.logging.v2.GetBucketRequest, com.google.logging.v2.LogBucket>( this, METHODID_GET_BUCKET))) + .addMethod( + getCreateBucketMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.logging.v2.CreateBucketRequest, com.google.logging.v2.LogBucket>( + this, METHODID_CREATE_BUCKET))) .addMethod( getUpdateBucketMethod(), asyncUnaryCall( new MethodHandlers< com.google.logging.v2.UpdateBucketRequest, com.google.logging.v2.LogBucket>( this, METHODID_UPDATE_BUCKET))) + .addMethod( + getDeleteBucketMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.logging.v2.DeleteBucketRequest, com.google.protobuf.Empty>( + this, METHODID_DELETE_BUCKET))) + .addMethod( + getUndeleteBucketMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.logging.v2.UndeleteBucketRequest, com.google.protobuf.Empty>( + this, METHODID_UNDELETE_BUCKET))) + .addMethod( + getListViewsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.logging.v2.ListViewsRequest, + com.google.logging.v2.ListViewsResponse>(this, METHODID_LIST_VIEWS))) + .addMethod( + getGetViewMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.logging.v2.GetViewRequest, com.google.logging.v2.LogView>( + this, METHODID_GET_VIEW))) + .addMethod( + getCreateViewMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.logging.v2.CreateViewRequest, com.google.logging.v2.LogView>( + this, METHODID_CREATE_VIEW))) + .addMethod( + getUpdateViewMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.logging.v2.UpdateViewRequest, com.google.logging.v2.LogView>( + this, METHODID_UPDATE_VIEW))) + .addMethod( + getDeleteViewMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.logging.v2.DeleteViewRequest, com.google.protobuf.Empty>( + this, METHODID_DELETE_VIEW))) .addMethod( getListSinksMethod(), asyncUnaryCall( @@ -1056,7 +1535,7 @@ protected ConfigServiceV2Stub build(io.grpc.Channel channel, io.grpc.CallOptions * * *
-     * Lists buckets (Beta).
+     * Lists buckets.
      * 
*/ public void listBuckets( @@ -1072,7 +1551,7 @@ public void listBuckets( * * *
-     * Gets a bucket (Beta).
+     * Gets a bucket.
      * 
*/ public void getBucket( @@ -1082,6 +1561,23 @@ public void getBucket( getChannel().newCall(getGetBucketMethod(), getCallOptions()), request, responseObserver); } + /** + * + * + *
+     * Creates a bucket that can be used to store log entries. Once a bucket has
+     * been created, the region cannot be changed.
+     * 
+ */ + public void createBucket( + com.google.logging.v2.CreateBucketRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateBucketMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1093,7 +1589,6 @@ public void getBucket( * 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( @@ -1105,6 +1600,114 @@ public void updateBucket( responseObserver); } + /** + * + * + *
+     * Deletes a bucket.
+     * Moves the bucket to the DELETE_REQUESTED state. After 7 days, the
+     * bucket will be purged and all logs in the bucket will be permanently
+     * deleted.
+     * 
+ */ + public void deleteBucket( + com.google.logging.v2.DeleteBucketRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteBucketMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Undeletes a bucket. A bucket that has been deleted may be undeleted within
+     * the grace period of 7 days.
+     * 
+ */ + public void undeleteBucket( + com.google.logging.v2.UndeleteBucketRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUndeleteBucketMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists views on a bucket.
+     * 
+ */ + public void listViews( + com.google.logging.v2.ListViewsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListViewsMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Gets a view.
+     * 
+ */ + public void getView( + com.google.logging.v2.GetViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetViewMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a view over logs in a bucket. A bucket may contain a maximum of
+     * 50 views.
+     * 
+ */ + public void createView( + com.google.logging.v2.CreateViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateViewMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Updates a view. This method replaces the following fields in the existing
+     * view with values from the new view: `filter`.
+     * 
+ */ + public void updateView( + com.google.logging.v2.UpdateViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateViewMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Deletes a view from a bucket.
+     * 
+ */ + public void deleteView( + com.google.logging.v2.DeleteViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteViewMethod(), getCallOptions()), request, responseObserver); + } + /** * * @@ -1338,7 +1941,7 @@ protected ConfigServiceV2BlockingStub build( * * *
-     * Lists buckets (Beta).
+     * Lists buckets.
      * 
*/ public com.google.logging.v2.ListBucketsResponse listBuckets( @@ -1350,7 +1953,7 @@ public com.google.logging.v2.ListBucketsResponse listBuckets( * * *
-     * Gets a bucket (Beta).
+     * Gets a bucket.
      * 
*/ public com.google.logging.v2.LogBucket getBucket( @@ -1358,6 +1961,19 @@ public com.google.logging.v2.LogBucket getBucket( return blockingUnaryCall(getChannel(), getGetBucketMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Creates a bucket that can be used to store log entries. Once a bucket has
+     * been created, the region cannot be changed.
+     * 
+ */ + public com.google.logging.v2.LogBucket createBucket( + com.google.logging.v2.CreateBucketRequest request) { + return blockingUnaryCall(getChannel(), getCreateBucketMethod(), getCallOptions(), request); + } + /** * * @@ -1369,7 +1985,6 @@ public com.google.logging.v2.LogBucket getBucket( * 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( @@ -1377,6 +1992,94 @@ public com.google.logging.v2.LogBucket updateBucket( return blockingUnaryCall(getChannel(), getUpdateBucketMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Deletes a bucket.
+     * Moves the bucket to the DELETE_REQUESTED state. After 7 days, the
+     * bucket will be purged and all logs in the bucket will be permanently
+     * deleted.
+     * 
+ */ + public com.google.protobuf.Empty deleteBucket( + com.google.logging.v2.DeleteBucketRequest request) { + return blockingUnaryCall(getChannel(), getDeleteBucketMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Undeletes a bucket. A bucket that has been deleted may be undeleted within
+     * the grace period of 7 days.
+     * 
+ */ + public com.google.protobuf.Empty undeleteBucket( + com.google.logging.v2.UndeleteBucketRequest request) { + return blockingUnaryCall(getChannel(), getUndeleteBucketMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists views on a bucket.
+     * 
+ */ + public com.google.logging.v2.ListViewsResponse listViews( + com.google.logging.v2.ListViewsRequest request) { + return blockingUnaryCall(getChannel(), getListViewsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a view.
+     * 
+ */ + public com.google.logging.v2.LogView getView(com.google.logging.v2.GetViewRequest request) { + return blockingUnaryCall(getChannel(), getGetViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a view over logs in a bucket. A bucket may contain a maximum of
+     * 50 views.
+     * 
+ */ + public com.google.logging.v2.LogView createView( + com.google.logging.v2.CreateViewRequest request) { + return blockingUnaryCall(getChannel(), getCreateViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a view. This method replaces the following fields in the existing
+     * view with values from the new view: `filter`.
+     * 
+ */ + public com.google.logging.v2.LogView updateView( + com.google.logging.v2.UpdateViewRequest request) { + return blockingUnaryCall(getChannel(), getUpdateViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a view from a bucket.
+     * 
+ */ + public com.google.protobuf.Empty deleteView(com.google.logging.v2.DeleteViewRequest request) { + return blockingUnaryCall(getChannel(), getDeleteViewMethod(), getCallOptions(), request); + } + /** * * @@ -1570,7 +2273,7 @@ protected ConfigServiceV2FutureStub build( * * *
-     * Lists buckets (Beta).
+     * Lists buckets.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< @@ -1584,7 +2287,7 @@ protected ConfigServiceV2FutureStub build( * * *
-     * Gets a bucket (Beta).
+     * Gets a bucket.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture @@ -1592,6 +2295,20 @@ protected ConfigServiceV2FutureStub build( return futureUnaryCall(getChannel().newCall(getGetBucketMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Creates a bucket that can be used to store log entries. Once a bucket has
+     * been created, the region cannot be changed.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createBucket(com.google.logging.v2.CreateBucketRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateBucketMethod(), getCallOptions()), request); + } + /** * * @@ -1603,7 +2320,6 @@ protected ConfigServiceV2FutureStub build( * 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 @@ -1612,6 +2328,102 @@ protected ConfigServiceV2FutureStub build( getChannel().newCall(getUpdateBucketMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Deletes a bucket.
+     * Moves the bucket to the DELETE_REQUESTED state. After 7 days, the
+     * bucket will be purged and all logs in the bucket will be permanently
+     * deleted.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteBucket(com.google.logging.v2.DeleteBucketRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteBucketMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Undeletes a bucket. A bucket that has been deleted may be undeleted within
+     * the grace period of 7 days.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + undeleteBucket(com.google.logging.v2.UndeleteBucketRequest request) { + return futureUnaryCall( + getChannel().newCall(getUndeleteBucketMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists views on a bucket.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.logging.v2.ListViewsResponse> + listViews(com.google.logging.v2.ListViewsRequest request) { + return futureUnaryCall(getChannel().newCall(getListViewsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a view.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getView(com.google.logging.v2.GetViewRequest request) { + return futureUnaryCall(getChannel().newCall(getGetViewMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a view over logs in a bucket. A bucket may contain a maximum of
+     * 50 views.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createView(com.google.logging.v2.CreateViewRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateViewMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a view. This method replaces the following fields in the existing
+     * view with values from the new view: `filter`.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateView(com.google.logging.v2.UpdateViewRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateViewMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a view from a bucket.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteView( + com.google.logging.v2.DeleteViewRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteViewMethod(), getCallOptions()), request); + } + /** * * @@ -1797,19 +2609,27 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1839,11 +2659,52 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.logging.v2.GetBucketRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_CREATE_BUCKET: + serviceImpl.createBucket( + (com.google.logging.v2.CreateBucketRequest) 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_DELETE_BUCKET: + serviceImpl.deleteBucket( + (com.google.logging.v2.DeleteBucketRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UNDELETE_BUCKET: + serviceImpl.undeleteBucket( + (com.google.logging.v2.UndeleteBucketRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_VIEWS: + serviceImpl.listViews( + (com.google.logging.v2.ListViewsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_VIEW: + serviceImpl.getView( + (com.google.logging.v2.GetViewRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_VIEW: + serviceImpl.createView( + (com.google.logging.v2.CreateViewRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_VIEW: + serviceImpl.updateView( + (com.google.logging.v2.UpdateViewRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_VIEW: + serviceImpl.deleteView( + (com.google.logging.v2.DeleteViewRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_LIST_SINKS: serviceImpl.listSinks( (com.google.logging.v2.ListSinksRequest) request, @@ -1972,7 +2833,15 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .setSchemaDescriptor(new ConfigServiceV2FileDescriptorSupplier()) .addMethod(getListBucketsMethod()) .addMethod(getGetBucketMethod()) + .addMethod(getCreateBucketMethod()) .addMethod(getUpdateBucketMethod()) + .addMethod(getDeleteBucketMethod()) + .addMethod(getUndeleteBucketMethod()) + .addMethod(getListViewsMethod()) + .addMethod(getGetViewMethod()) + .addMethod(getCreateViewMethod()) + .addMethod(getUpdateViewMethod()) + .addMethod(getDeleteViewMethod()) .addMethod(getListSinksMethod()) .addMethod(getGetSinkMethod()) .addMethod(getCreateSinkMethod()) diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateBucketRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateBucketRequest.java new file mode 100644 index 000000000..01428a77f --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateBucketRequest.java @@ -0,0 +1,1156 @@ +/* + * 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 `CreateBucket`.
+ * 
+ * + * Protobuf type {@code google.logging.v2.CreateBucketRequest} + */ +public final class CreateBucketRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.logging.v2.CreateBucketRequest) + CreateBucketRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateBucketRequest.newBuilder() to construct. + private CreateBucketRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateBucketRequest() { + parent_ = ""; + bucketId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateBucketRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateBucketRequest( + 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(); + + bucketId_ = s; + break; + } + case 26: + { + 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; + } + 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_CreateBucketRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_CreateBucketRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.CreateBucketRequest.class, + com.google.logging.v2.CreateBucketRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource in which to create the bucket:
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
+   * Example: `"projects/my-logging-project/locations/global"`
+   * 
+ * + * + * 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 resource in which to create the bucket:
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
+   * Example: `"projects/my-logging-project/locations/global"`
+   * 
+ * + * + * 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 BUCKET_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object bucketId_; + /** + * + * + *
+   * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are
+   * limited to 100 characters and can include only letters, digits,
+   * underscores, hyphens, and periods.
+   * 
+ * + * string bucket_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bucketId. + */ + @java.lang.Override + public java.lang.String getBucketId() { + java.lang.Object ref = bucketId_; + 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(); + bucketId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are
+   * limited to 100 characters and can include only letters, digits,
+   * underscores, hyphens, and periods.
+   * 
+ * + * string bucket_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bucketId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBucketIdBytes() { + java.lang.Object ref = bucketId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bucketId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUCKET_FIELD_NUMBER = 3; + private com.google.logging.v2.LogBucket bucket_; + /** + * + * + *
+   * Required. The new bucket. The region specified in the new bucket must be compliant
+   * with any Location Restriction Org Policy. The name field in the bucket is
+   * ignored.
+   * 
+ * + * .google.logging.v2.LogBucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the bucket field is set. + */ + @java.lang.Override + public boolean hasBucket() { + return bucket_ != null; + } + /** + * + * + *
+   * Required. The new bucket. The region specified in the new bucket must be compliant
+   * with any Location Restriction Org Policy. The name field in the bucket is
+   * ignored.
+   * 
+ * + * .google.logging.v2.LogBucket bucket = 3 [(.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 new bucket. The region specified in the new bucket must be compliant
+   * with any Location Restriction Org Policy. The name field in the bucket is
+   * ignored.
+   * 
+ * + * .google.logging.v2.LogBucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.logging.v2.LogBucketOrBuilder getBucketOrBuilder() { + return getBucket(); + } + + 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 (!getBucketIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, bucketId_); + } + if (bucket_ != null) { + output.writeMessage(3, getBucket()); + } + 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 (!getBucketIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, bucketId_); + } + if (bucket_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBucket()); + } + 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.CreateBucketRequest)) { + return super.equals(obj); + } + com.google.logging.v2.CreateBucketRequest other = + (com.google.logging.v2.CreateBucketRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getBucketId().equals(other.getBucketId())) return false; + if (hasBucket() != other.hasBucket()) return false; + if (hasBucket()) { + if (!getBucket().equals(other.getBucket())) 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) + BUCKET_ID_FIELD_NUMBER; + hash = (53 * hash) + getBucketId().hashCode(); + if (hasBucket()) { + hash = (37 * hash) + BUCKET_FIELD_NUMBER; + hash = (53 * hash) + getBucket().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.logging.v2.CreateBucketRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.CreateBucketRequest 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.CreateBucketRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.CreateBucketRequest 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.CreateBucketRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.CreateBucketRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.logging.v2.CreateBucketRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.CreateBucketRequest 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.CreateBucketRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.logging.v2.CreateBucketRequest 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.CreateBucketRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.CreateBucketRequest 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.CreateBucketRequest 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 `CreateBucket`.
+   * 
+ * + * Protobuf type {@code google.logging.v2.CreateBucketRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.logging.v2.CreateBucketRequest) + com.google.logging.v2.CreateBucketRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_CreateBucketRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_CreateBucketRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.CreateBucketRequest.class, + com.google.logging.v2.CreateBucketRequest.Builder.class); + } + + // Construct using com.google.logging.v2.CreateBucketRequest.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_ = ""; + + bucketId_ = ""; + + if (bucketBuilder_ == null) { + bucket_ = null; + } else { + bucket_ = null; + bucketBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_CreateBucketRequest_descriptor; + } + + @java.lang.Override + public com.google.logging.v2.CreateBucketRequest getDefaultInstanceForType() { + return com.google.logging.v2.CreateBucketRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.logging.v2.CreateBucketRequest build() { + com.google.logging.v2.CreateBucketRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.logging.v2.CreateBucketRequest buildPartial() { + com.google.logging.v2.CreateBucketRequest result = + new com.google.logging.v2.CreateBucketRequest(this); + result.parent_ = parent_; + result.bucketId_ = bucketId_; + if (bucketBuilder_ == null) { + result.bucket_ = bucket_; + } else { + result.bucket_ = bucketBuilder_.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.CreateBucketRequest) { + return mergeFrom((com.google.logging.v2.CreateBucketRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.logging.v2.CreateBucketRequest other) { + if (other == com.google.logging.v2.CreateBucketRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getBucketId().isEmpty()) { + bucketId_ = other.bucketId_; + onChanged(); + } + if (other.hasBucket()) { + mergeBucket(other.getBucket()); + } + 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.CreateBucketRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.logging.v2.CreateBucketRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource in which to create the bucket:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
+     * Example: `"projects/my-logging-project/locations/global"`
+     * 
+ * + * + * 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 resource in which to create the bucket:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
+     * Example: `"projects/my-logging-project/locations/global"`
+     * 
+ * + * + * 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 resource in which to create the bucket:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
+     * Example: `"projects/my-logging-project/locations/global"`
+     * 
+ * + * + * 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 resource in which to create the bucket:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
+     * Example: `"projects/my-logging-project/locations/global"`
+     * 
+ * + * + * 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 resource in which to create the bucket:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
+     * Example: `"projects/my-logging-project/locations/global"`
+     * 
+ * + * + * 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 bucketId_ = ""; + /** + * + * + *
+     * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are
+     * limited to 100 characters and can include only letters, digits,
+     * underscores, hyphens, and periods.
+     * 
+ * + * string bucket_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bucketId. + */ + public java.lang.String getBucketId() { + java.lang.Object ref = bucketId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bucketId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are
+     * limited to 100 characters and can include only letters, digits,
+     * underscores, hyphens, and periods.
+     * 
+ * + * string bucket_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bucketId. + */ + public com.google.protobuf.ByteString getBucketIdBytes() { + java.lang.Object ref = bucketId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bucketId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are
+     * limited to 100 characters and can include only letters, digits,
+     * underscores, hyphens, and periods.
+     * 
+ * + * string bucket_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bucketId to set. + * @return This builder for chaining. + */ + public Builder setBucketId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + bucketId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are
+     * limited to 100 characters and can include only letters, digits,
+     * underscores, hyphens, and periods.
+     * 
+ * + * string bucket_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBucketId() { + + bucketId_ = getDefaultInstance().getBucketId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are
+     * limited to 100 characters and can include only letters, digits,
+     * underscores, hyphens, and periods.
+     * 
+ * + * string bucket_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for bucketId to set. + * @return This builder for chaining. + */ + public Builder setBucketIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + bucketId_ = 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 new bucket. The region specified in the new bucket must be compliant
+     * with any Location Restriction Org Policy. The name field in the bucket is
+     * ignored.
+     * 
+ * + * .google.logging.v2.LogBucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the bucket field is set. + */ + public boolean hasBucket() { + return bucketBuilder_ != null || bucket_ != null; + } + /** + * + * + *
+     * Required. The new bucket. The region specified in the new bucket must be compliant
+     * with any Location Restriction Org Policy. The name field in the bucket is
+     * ignored.
+     * 
+ * + * .google.logging.v2.LogBucket bucket = 3 [(.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 new bucket. The region specified in the new bucket must be compliant
+     * with any Location Restriction Org Policy. The name field in the bucket is
+     * ignored.
+     * 
+ * + * .google.logging.v2.LogBucket bucket = 3 [(.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 new bucket. The region specified in the new bucket must be compliant
+     * with any Location Restriction Org Policy. The name field in the bucket is
+     * ignored.
+     * 
+ * + * .google.logging.v2.LogBucket bucket = 3 [(.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 new bucket. The region specified in the new bucket must be compliant
+     * with any Location Restriction Org Policy. The name field in the bucket is
+     * ignored.
+     * 
+ * + * .google.logging.v2.LogBucket bucket = 3 [(.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 new bucket. The region specified in the new bucket must be compliant
+     * with any Location Restriction Org Policy. The name field in the bucket is
+     * ignored.
+     * 
+ * + * .google.logging.v2.LogBucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearBucket() { + if (bucketBuilder_ == null) { + bucket_ = null; + onChanged(); + } else { + bucket_ = null; + bucketBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The new bucket. The region specified in the new bucket must be compliant
+     * with any Location Restriction Org Policy. The name field in the bucket is
+     * ignored.
+     * 
+ * + * .google.logging.v2.LogBucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.logging.v2.LogBucket.Builder getBucketBuilder() { + + onChanged(); + return getBucketFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The new bucket. The region specified in the new bucket must be compliant
+     * with any Location Restriction Org Policy. The name field in the bucket is
+     * ignored.
+     * 
+ * + * .google.logging.v2.LogBucket bucket = 3 [(.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 new bucket. The region specified in the new bucket must be compliant
+     * with any Location Restriction Org Policy. The name field in the bucket is
+     * ignored.
+     * 
+ * + * .google.logging.v2.LogBucket bucket = 3 [(.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_; + } + + @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.CreateBucketRequest) + } + + // @@protoc_insertion_point(class_scope:google.logging.v2.CreateBucketRequest) + private static final com.google.logging.v2.CreateBucketRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.logging.v2.CreateBucketRequest(); + } + + public static com.google.logging.v2.CreateBucketRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateBucketRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateBucketRequest(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.CreateBucketRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateBucketRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateBucketRequestOrBuilder.java new file mode 100644 index 000000000..f57d83413 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateBucketRequestOrBuilder.java @@ -0,0 +1,128 @@ +/* + * 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 CreateBucketRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.logging.v2.CreateBucketRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource in which to create the bucket:
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
+   * Example: `"projects/my-logging-project/locations/global"`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource in which to create the bucket:
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
+   * Example: `"projects/my-logging-project/locations/global"`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are
+   * limited to 100 characters and can include only letters, digits,
+   * underscores, hyphens, and periods.
+   * 
+ * + * string bucket_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bucketId. + */ + java.lang.String getBucketId(); + /** + * + * + *
+   * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are
+   * limited to 100 characters and can include only letters, digits,
+   * underscores, hyphens, and periods.
+   * 
+ * + * string bucket_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bucketId. + */ + com.google.protobuf.ByteString getBucketIdBytes(); + + /** + * + * + *
+   * Required. The new bucket. The region specified in the new bucket must be compliant
+   * with any Location Restriction Org Policy. The name field in the bucket is
+   * ignored.
+   * 
+ * + * .google.logging.v2.LogBucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the bucket field is set. + */ + boolean hasBucket(); + /** + * + * + *
+   * Required. The new bucket. The region specified in the new bucket must be compliant
+   * with any Location Restriction Org Policy. The name field in the bucket is
+   * ignored.
+   * 
+ * + * .google.logging.v2.LogBucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bucket. + */ + com.google.logging.v2.LogBucket getBucket(); + /** + * + * + *
+   * Required. The new bucket. The region specified in the new bucket must be compliant
+   * with any Location Restriction Org Policy. The name field in the bucket is
+   * ignored.
+   * 
+ * + * .google.logging.v2.LogBucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.logging.v2.LogBucketOrBuilder getBucketOrBuilder(); +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateViewRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateViewRequest.java new file mode 100644 index 000000000..748bf25bb --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateViewRequest.java @@ -0,0 +1,1099 @@ +/* + * 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 `CreateView`.
+ * 
+ * + * Protobuf type {@code google.logging.v2.CreateViewRequest} + */ +public final class CreateViewRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.logging.v2.CreateViewRequest) + CreateViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateViewRequest.newBuilder() to construct. + private CreateViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateViewRequest() { + parent_ = ""; + viewId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateViewRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateViewRequest( + 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(); + + viewId_ = s; + break; + } + case 26: + { + com.google.logging.v2.LogView.Builder subBuilder = null; + if (view_ != null) { + subBuilder = view_.toBuilder(); + } + view_ = input.readMessage(com.google.logging.v2.LogView.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(view_); + view_ = 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_CreateViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_CreateViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.CreateViewRequest.class, + com.google.logging.v2.CreateViewRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The bucket in which to create the view
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   * Example:
+   * `"projects/my-logging-project/locations/my-location/buckets/my-bucket"`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The bucket in which to create the view
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   * Example:
+   * `"projects/my-logging-project/locations/my-location/buckets/my-bucket"`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object viewId_; + /** + * + * + *
+   * Required. The id to use for this view.
+   * 
+ * + * string view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The viewId. + */ + @java.lang.Override + public java.lang.String getViewId() { + java.lang.Object ref = viewId_; + 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(); + viewId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The id to use for this view.
+   * 
+ * + * string view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for viewId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getViewIdBytes() { + java.lang.Object ref = viewId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + viewId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 3; + private com.google.logging.v2.LogView view_; + /** + * + * + *
+   * Required. The new view.
+   * 
+ * + * .google.logging.v2.LogView view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the view field is set. + */ + @java.lang.Override + public boolean hasView() { + return view_ != null; + } + /** + * + * + *
+   * Required. The new view.
+   * 
+ * + * .google.logging.v2.LogView view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The view. + */ + @java.lang.Override + public com.google.logging.v2.LogView getView() { + return view_ == null ? com.google.logging.v2.LogView.getDefaultInstance() : view_; + } + /** + * + * + *
+   * Required. The new view.
+   * 
+ * + * .google.logging.v2.LogView view = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.logging.v2.LogViewOrBuilder getViewOrBuilder() { + return getView(); + } + + 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 (!getViewIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, viewId_); + } + if (view_ != null) { + output.writeMessage(3, getView()); + } + 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 (!getViewIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, viewId_); + } + if (view_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getView()); + } + 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.CreateViewRequest)) { + return super.equals(obj); + } + com.google.logging.v2.CreateViewRequest other = (com.google.logging.v2.CreateViewRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getViewId().equals(other.getViewId())) return false; + if (hasView() != other.hasView()) return false; + if (hasView()) { + if (!getView().equals(other.getView())) 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) + VIEW_ID_FIELD_NUMBER; + hash = (53 * hash) + getViewId().hashCode(); + if (hasView()) { + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + getView().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.logging.v2.CreateViewRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.CreateViewRequest 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.CreateViewRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.CreateViewRequest 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.CreateViewRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.CreateViewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.logging.v2.CreateViewRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.CreateViewRequest 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.CreateViewRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.logging.v2.CreateViewRequest 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.CreateViewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.CreateViewRequest 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.CreateViewRequest 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 `CreateView`.
+   * 
+ * + * Protobuf type {@code google.logging.v2.CreateViewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.logging.v2.CreateViewRequest) + com.google.logging.v2.CreateViewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_CreateViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_CreateViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.CreateViewRequest.class, + com.google.logging.v2.CreateViewRequest.Builder.class); + } + + // Construct using com.google.logging.v2.CreateViewRequest.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_ = ""; + + viewId_ = ""; + + if (viewBuilder_ == null) { + view_ = null; + } else { + view_ = null; + viewBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_CreateViewRequest_descriptor; + } + + @java.lang.Override + public com.google.logging.v2.CreateViewRequest getDefaultInstanceForType() { + return com.google.logging.v2.CreateViewRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.logging.v2.CreateViewRequest build() { + com.google.logging.v2.CreateViewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.logging.v2.CreateViewRequest buildPartial() { + com.google.logging.v2.CreateViewRequest result = + new com.google.logging.v2.CreateViewRequest(this); + result.parent_ = parent_; + result.viewId_ = viewId_; + if (viewBuilder_ == null) { + result.view_ = view_; + } else { + result.view_ = viewBuilder_.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.CreateViewRequest) { + return mergeFrom((com.google.logging.v2.CreateViewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.logging.v2.CreateViewRequest other) { + if (other == com.google.logging.v2.CreateViewRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getViewId().isEmpty()) { + viewId_ = other.viewId_; + onChanged(); + } + if (other.hasView()) { + mergeView(other.getView()); + } + 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.CreateViewRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.logging.v2.CreateViewRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The bucket in which to create the view
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     * Example:
+     * `"projects/my-logging-project/locations/my-location/buckets/my-bucket"`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The bucket in which to create the view
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     * Example:
+     * `"projects/my-logging-project/locations/my-location/buckets/my-bucket"`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The bucket in which to create the view
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     * Example:
+     * `"projects/my-logging-project/locations/my-location/buckets/my-bucket"`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The bucket in which to create the view
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     * Example:
+     * `"projects/my-logging-project/locations/my-location/buckets/my-bucket"`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The bucket in which to create the view
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     * Example:
+     * `"projects/my-logging-project/locations/my-location/buckets/my-bucket"`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object viewId_ = ""; + /** + * + * + *
+     * Required. The id to use for this view.
+     * 
+ * + * string view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The viewId. + */ + public java.lang.String getViewId() { + java.lang.Object ref = viewId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + viewId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The id to use for this view.
+     * 
+ * + * string view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for viewId. + */ + public com.google.protobuf.ByteString getViewIdBytes() { + java.lang.Object ref = viewId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + viewId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The id to use for this view.
+     * 
+ * + * string view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The viewId to set. + * @return This builder for chaining. + */ + public Builder setViewId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + viewId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The id to use for this view.
+     * 
+ * + * string view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearViewId() { + + viewId_ = getDefaultInstance().getViewId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The id to use for this view.
+     * 
+ * + * string view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for viewId to set. + * @return This builder for chaining. + */ + public Builder setViewIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + viewId_ = value; + onChanged(); + return this; + } + + private com.google.logging.v2.LogView view_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.logging.v2.LogView, + com.google.logging.v2.LogView.Builder, + com.google.logging.v2.LogViewOrBuilder> + viewBuilder_; + /** + * + * + *
+     * Required. The new view.
+     * 
+ * + * .google.logging.v2.LogView view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the view field is set. + */ + public boolean hasView() { + return viewBuilder_ != null || view_ != null; + } + /** + * + * + *
+     * Required. The new view.
+     * 
+ * + * .google.logging.v2.LogView view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The view. + */ + public com.google.logging.v2.LogView getView() { + if (viewBuilder_ == null) { + return view_ == null ? com.google.logging.v2.LogView.getDefaultInstance() : view_; + } else { + return viewBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The new view.
+     * 
+ * + * .google.logging.v2.LogView view = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setView(com.google.logging.v2.LogView value) { + if (viewBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + view_ = value; + onChanged(); + } else { + viewBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The new view.
+     * 
+ * + * .google.logging.v2.LogView view = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setView(com.google.logging.v2.LogView.Builder builderForValue) { + if (viewBuilder_ == null) { + view_ = builderForValue.build(); + onChanged(); + } else { + viewBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The new view.
+     * 
+ * + * .google.logging.v2.LogView view = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeView(com.google.logging.v2.LogView value) { + if (viewBuilder_ == null) { + if (view_ != null) { + view_ = com.google.logging.v2.LogView.newBuilder(view_).mergeFrom(value).buildPartial(); + } else { + view_ = value; + } + onChanged(); + } else { + viewBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The new view.
+     * 
+ * + * .google.logging.v2.LogView view = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearView() { + if (viewBuilder_ == null) { + view_ = null; + onChanged(); + } else { + view_ = null; + viewBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The new view.
+     * 
+ * + * .google.logging.v2.LogView view = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.logging.v2.LogView.Builder getViewBuilder() { + + onChanged(); + return getViewFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The new view.
+     * 
+ * + * .google.logging.v2.LogView view = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.logging.v2.LogViewOrBuilder getViewOrBuilder() { + if (viewBuilder_ != null) { + return viewBuilder_.getMessageOrBuilder(); + } else { + return view_ == null ? com.google.logging.v2.LogView.getDefaultInstance() : view_; + } + } + /** + * + * + *
+     * Required. The new view.
+     * 
+ * + * .google.logging.v2.LogView view = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.logging.v2.LogView, + com.google.logging.v2.LogView.Builder, + com.google.logging.v2.LogViewOrBuilder> + getViewFieldBuilder() { + if (viewBuilder_ == null) { + viewBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.logging.v2.LogView, + com.google.logging.v2.LogView.Builder, + com.google.logging.v2.LogViewOrBuilder>( + getView(), getParentForChildren(), isClean()); + view_ = null; + } + return viewBuilder_; + } + + @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.CreateViewRequest) + } + + // @@protoc_insertion_point(class_scope:google.logging.v2.CreateViewRequest) + private static final com.google.logging.v2.CreateViewRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.logging.v2.CreateViewRequest(); + } + + public static com.google.logging.v2.CreateViewRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateViewRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateViewRequest(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.CreateViewRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateViewRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateViewRequestOrBuilder.java new file mode 100644 index 000000000..3258e6659 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateViewRequestOrBuilder.java @@ -0,0 +1,116 @@ +/* + * 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 CreateViewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.logging.v2.CreateViewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The bucket in which to create the view
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   * Example:
+   * `"projects/my-logging-project/locations/my-location/buckets/my-bucket"`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The bucket in which to create the view
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   * Example:
+   * `"projects/my-logging-project/locations/my-location/buckets/my-bucket"`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The id to use for this view.
+   * 
+ * + * string view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The viewId. + */ + java.lang.String getViewId(); + /** + * + * + *
+   * Required. The id to use for this view.
+   * 
+ * + * string view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for viewId. + */ + com.google.protobuf.ByteString getViewIdBytes(); + + /** + * + * + *
+   * Required. The new view.
+   * 
+ * + * .google.logging.v2.LogView view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the view field is set. + */ + boolean hasView(); + /** + * + * + *
+   * Required. The new view.
+   * 
+ * + * .google.logging.v2.LogView view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The view. + */ + com.google.logging.v2.LogView getView(); + /** + * + * + *
+   * Required. The new view.
+   * 
+ * + * .google.logging.v2.LogView view = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.logging.v2.LogViewOrBuilder getViewOrBuilder(); +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteBucketRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteBucketRequest.java new file mode 100644 index 000000000..320e8764b --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteBucketRequest.java @@ -0,0 +1,690 @@ +/* + * 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 `DeleteBucket`.
+ * 
+ * + * Protobuf type {@code google.logging.v2.DeleteBucketRequest} + */ +public final class DeleteBucketRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.logging.v2.DeleteBucketRequest) + DeleteBucketRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteBucketRequest.newBuilder() to construct. + private DeleteBucketRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteBucketRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteBucketRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteBucketRequest( + 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_DeleteBucketRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_DeleteBucketRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.DeleteBucketRequest.class, + com.google.logging.v2.DeleteBucketRequest.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 delete.
+   *     "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 full resource name of the bucket to delete.
+   *     "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.DeleteBucketRequest)) { + return super.equals(obj); + } + com.google.logging.v2.DeleteBucketRequest other = + (com.google.logging.v2.DeleteBucketRequest) 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.DeleteBucketRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.DeleteBucketRequest 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.DeleteBucketRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.DeleteBucketRequest 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.DeleteBucketRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.DeleteBucketRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.logging.v2.DeleteBucketRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.DeleteBucketRequest 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.DeleteBucketRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.logging.v2.DeleteBucketRequest 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.DeleteBucketRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.DeleteBucketRequest 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.DeleteBucketRequest 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 `DeleteBucket`.
+   * 
+ * + * Protobuf type {@code google.logging.v2.DeleteBucketRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.logging.v2.DeleteBucketRequest) + com.google.logging.v2.DeleteBucketRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_DeleteBucketRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_DeleteBucketRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.DeleteBucketRequest.class, + com.google.logging.v2.DeleteBucketRequest.Builder.class); + } + + // Construct using com.google.logging.v2.DeleteBucketRequest.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_DeleteBucketRequest_descriptor; + } + + @java.lang.Override + public com.google.logging.v2.DeleteBucketRequest getDefaultInstanceForType() { + return com.google.logging.v2.DeleteBucketRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.logging.v2.DeleteBucketRequest build() { + com.google.logging.v2.DeleteBucketRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.logging.v2.DeleteBucketRequest buildPartial() { + com.google.logging.v2.DeleteBucketRequest result = + new com.google.logging.v2.DeleteBucketRequest(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.DeleteBucketRequest) { + return mergeFrom((com.google.logging.v2.DeleteBucketRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.logging.v2.DeleteBucketRequest other) { + if (other == com.google.logging.v2.DeleteBucketRequest.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.DeleteBucketRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.logging.v2.DeleteBucketRequest) 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 delete.
+     *     "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 full resource name of the bucket to delete.
+     *     "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 full resource name of the bucket to delete.
+     *     "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 full resource name of the bucket to delete.
+     *     "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 full resource name of the bucket to delete.
+     *     "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.DeleteBucketRequest) + } + + // @@protoc_insertion_point(class_scope:google.logging.v2.DeleteBucketRequest) + private static final com.google.logging.v2.DeleteBucketRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.logging.v2.DeleteBucketRequest(); + } + + public static com.google.logging.v2.DeleteBucketRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteBucketRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteBucketRequest(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.DeleteBucketRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteBucketRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteBucketRequestOrBuilder.java new file mode 100644 index 000000000..ed0af6f2e --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteBucketRequestOrBuilder.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 DeleteBucketRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.logging.v2.DeleteBucketRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The full resource name of the bucket to delete.
+   *     "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 full resource name of the bucket to delete.
+   *     "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/DeleteViewRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteViewRequest.java new file mode 100644 index 000000000..72195b6c8 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteViewRequest.java @@ -0,0 +1,668 @@ +/* + * 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 `DeleteView`.
+ * 
+ * + * Protobuf type {@code google.logging.v2.DeleteViewRequest} + */ +public final class DeleteViewRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.logging.v2.DeleteViewRequest) + DeleteViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteViewRequest.newBuilder() to construct. + private DeleteViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteViewRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteViewRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteViewRequest( + 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_DeleteViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_DeleteViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.DeleteViewRequest.class, + com.google.logging.v2.DeleteViewRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The full resource name of the view to delete:
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+   * Example:
+   *    `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-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 full resource name of the view to delete:
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+   * Example:
+   *    `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-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.DeleteViewRequest)) { + return super.equals(obj); + } + com.google.logging.v2.DeleteViewRequest other = (com.google.logging.v2.DeleteViewRequest) 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.DeleteViewRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.DeleteViewRequest 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.DeleteViewRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.DeleteViewRequest 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.DeleteViewRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.DeleteViewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.logging.v2.DeleteViewRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.DeleteViewRequest 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.DeleteViewRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.logging.v2.DeleteViewRequest 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.DeleteViewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.DeleteViewRequest 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.DeleteViewRequest 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 `DeleteView`.
+   * 
+ * + * Protobuf type {@code google.logging.v2.DeleteViewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.logging.v2.DeleteViewRequest) + com.google.logging.v2.DeleteViewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_DeleteViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_DeleteViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.DeleteViewRequest.class, + com.google.logging.v2.DeleteViewRequest.Builder.class); + } + + // Construct using com.google.logging.v2.DeleteViewRequest.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_DeleteViewRequest_descriptor; + } + + @java.lang.Override + public com.google.logging.v2.DeleteViewRequest getDefaultInstanceForType() { + return com.google.logging.v2.DeleteViewRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.logging.v2.DeleteViewRequest build() { + com.google.logging.v2.DeleteViewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.logging.v2.DeleteViewRequest buildPartial() { + com.google.logging.v2.DeleteViewRequest result = + new com.google.logging.v2.DeleteViewRequest(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.DeleteViewRequest) { + return mergeFrom((com.google.logging.v2.DeleteViewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.logging.v2.DeleteViewRequest other) { + if (other == com.google.logging.v2.DeleteViewRequest.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.DeleteViewRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.logging.v2.DeleteViewRequest) 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 view to delete:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+     * Example:
+     *    `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-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 full resource name of the view to delete:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+     * Example:
+     *    `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-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 full resource name of the view to delete:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+     * Example:
+     *    `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-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 full resource name of the view to delete:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+     * Example:
+     *    `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-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 full resource name of the view to delete:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+     * Example:
+     *    `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-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.DeleteViewRequest) + } + + // @@protoc_insertion_point(class_scope:google.logging.v2.DeleteViewRequest) + private static final com.google.logging.v2.DeleteViewRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.logging.v2.DeleteViewRequest(); + } + + public static com.google.logging.v2.DeleteViewRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteViewRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteViewRequest(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.DeleteViewRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteViewRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteViewRequestOrBuilder.java new file mode 100644 index 000000000..5e9385db1 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteViewRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * 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 DeleteViewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.logging.v2.DeleteViewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The full resource name of the view to delete:
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+   * Example:
+   *    `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`.
+   * 
+ * + * + * 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 view to delete:
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+   * Example:
+   *    `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-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/GetBucketRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetBucketRequest.java index 7eb3d4f03..4fa579651 100644 --- 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 @@ -22,7 +22,7 @@ * * *
- * The parameters to `GetBucket` (Beta).
+ * The parameters to `GetBucket`.
  * 
* * Protobuf type {@code google.logging.v2.GetBucketRequest} @@ -338,7 +338,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The parameters to `GetBucket` (Beta).
+   * The parameters to `GetBucket`.
    * 
* * Protobuf type {@code google.logging.v2.GetBucketRequest} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetViewRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetViewRequest.java new file mode 100644 index 000000000..ce1f2b817 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetViewRequest.java @@ -0,0 +1,666 @@ +/* + * 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 `GetView`.
+ * 
+ * + * Protobuf type {@code google.logging.v2.GetViewRequest} + */ +public final class GetViewRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.logging.v2.GetViewRequest) + GetViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetViewRequest.newBuilder() to construct. + private GetViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetViewRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetViewRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetViewRequest( + 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_GetViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_GetViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.GetViewRequest.class, + com.google.logging.v2.GetViewRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the policy:
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+   * Example:
+   * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-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 policy:
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+   * Example:
+   * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-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.GetViewRequest)) { + return super.equals(obj); + } + com.google.logging.v2.GetViewRequest other = (com.google.logging.v2.GetViewRequest) 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.GetViewRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.GetViewRequest 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.GetViewRequest parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.GetViewRequest 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.GetViewRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.GetViewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.logging.v2.GetViewRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.GetViewRequest 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.GetViewRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.logging.v2.GetViewRequest 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.GetViewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.GetViewRequest 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.GetViewRequest 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 `GetView`.
+   * 
+ * + * Protobuf type {@code google.logging.v2.GetViewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.logging.v2.GetViewRequest) + com.google.logging.v2.GetViewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_GetViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_GetViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.GetViewRequest.class, + com.google.logging.v2.GetViewRequest.Builder.class); + } + + // Construct using com.google.logging.v2.GetViewRequest.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_GetViewRequest_descriptor; + } + + @java.lang.Override + public com.google.logging.v2.GetViewRequest getDefaultInstanceForType() { + return com.google.logging.v2.GetViewRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.logging.v2.GetViewRequest build() { + com.google.logging.v2.GetViewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.logging.v2.GetViewRequest buildPartial() { + com.google.logging.v2.GetViewRequest result = new com.google.logging.v2.GetViewRequest(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.GetViewRequest) { + return mergeFrom((com.google.logging.v2.GetViewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.logging.v2.GetViewRequest other) { + if (other == com.google.logging.v2.GetViewRequest.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.GetViewRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.logging.v2.GetViewRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the policy:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+     * Example:
+     * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-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 policy:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+     * Example:
+     * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-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 policy:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+     * Example:
+     * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-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 policy:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+     * Example:
+     * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-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 policy:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+     * Example:
+     * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-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.GetViewRequest) + } + + // @@protoc_insertion_point(class_scope:google.logging.v2.GetViewRequest) + private static final com.google.logging.v2.GetViewRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.logging.v2.GetViewRequest(); + } + + public static com.google.logging.v2.GetViewRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetViewRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetViewRequest(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.GetViewRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetViewRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetViewRequestOrBuilder.java new file mode 100644 index 000000000..76cf02e7e --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetViewRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * 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 GetViewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.logging.v2.GetViewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the policy:
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+   * Example:
+   * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-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 policy:
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+   * Example:
+   * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-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/LifecycleState.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LifecycleState.java index dacd152d2..f19d1e1ab 100644 --- 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 @@ -22,7 +22,7 @@ * * *
- * LogBucket lifecycle states (Beta).
+ * LogBucket lifecycle states.
  * 
* * Protobuf enum {@code 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 index 64839373f..5a998b204 100644 --- 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 @@ -22,7 +22,7 @@ * * *
- * The parameters to `ListBuckets` (Beta).
+ * The parameters to `ListBuckets`.
  * 
* * Protobuf type {@code google.logging.v2.ListBucketsRequest} @@ -446,7 +446,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The parameters to `ListBuckets` (Beta).
+   * The parameters to `ListBuckets`.
    * 
* * Protobuf type {@code google.logging.v2.ListBucketsRequest} 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 index 52c5b9fff..42f44d2fd 100644 --- 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 @@ -22,7 +22,7 @@ * * *
- * The response from ListBuckets (Beta).
+ * The response from ListBuckets.
  * 
* * Protobuf type {@code google.logging.v2.ListBucketsResponse} @@ -422,7 +422,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The response from ListBuckets (Beta).
+   * The response from ListBuckets.
    * 
* * Protobuf type {@code google.logging.v2.ListBucketsResponse} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsRequest.java new file mode 100644 index 000000000..1c6de6011 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsRequest.java @@ -0,0 +1,938 @@ +/* + * 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 `ListViews`.
+ * 
+ * + * Protobuf type {@code google.logging.v2.ListViewsRequest} + */ +public final class ListViewsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.logging.v2.ListViewsRequest) + ListViewsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListViewsRequest.newBuilder() to construct. + private ListViewsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListViewsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListViewsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListViewsRequest( + 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_ListViewsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_ListViewsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.ListViewsRequest.class, + com.google.logging.v2.ListViewsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The bucket whose views are to be listed:
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The bucket whose views are to be listed:
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_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.ListViewsRequest)) { + return super.equals(obj); + } + com.google.logging.v2.ListViewsRequest other = (com.google.logging.v2.ListViewsRequest) 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.ListViewsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.ListViewsRequest 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.ListViewsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.ListViewsRequest 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.ListViewsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.ListViewsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.logging.v2.ListViewsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.ListViewsRequest 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.ListViewsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.logging.v2.ListViewsRequest 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.ListViewsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.ListViewsRequest 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.ListViewsRequest 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 `ListViews`.
+   * 
+ * + * Protobuf type {@code google.logging.v2.ListViewsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.logging.v2.ListViewsRequest) + com.google.logging.v2.ListViewsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_ListViewsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_ListViewsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.ListViewsRequest.class, + com.google.logging.v2.ListViewsRequest.Builder.class); + } + + // Construct using com.google.logging.v2.ListViewsRequest.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_ListViewsRequest_descriptor; + } + + @java.lang.Override + public com.google.logging.v2.ListViewsRequest getDefaultInstanceForType() { + return com.google.logging.v2.ListViewsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.logging.v2.ListViewsRequest build() { + com.google.logging.v2.ListViewsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.logging.v2.ListViewsRequest buildPartial() { + com.google.logging.v2.ListViewsRequest result = + new com.google.logging.v2.ListViewsRequest(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.ListViewsRequest) { + return mergeFrom((com.google.logging.v2.ListViewsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.logging.v2.ListViewsRequest other) { + if (other == com.google.logging.v2.ListViewsRequest.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.ListViewsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.logging.v2.ListViewsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The bucket whose views are to be listed:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The bucket whose views are to be listed:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The bucket whose views are to be listed:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The bucket whose views are to be listed:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The bucket whose views are to be listed:
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + 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.ListViewsRequest) + } + + // @@protoc_insertion_point(class_scope:google.logging.v2.ListViewsRequest) + private static final com.google.logging.v2.ListViewsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.logging.v2.ListViewsRequest(); + } + + public static com.google.logging.v2.ListViewsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListViewsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListViewsRequest(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.ListViewsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsRequestOrBuilder.java new file mode 100644 index 000000000..101411177 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsRequestOrBuilder.java @@ -0,0 +1,98 @@ +/* + * 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 ListViewsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.logging.v2.ListViewsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The bucket whose views are to be listed:
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The bucket whose views are to be listed:
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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/ListViewsResponse.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsResponse.java new file mode 100644 index 000000000..ac2c3c4c4 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsResponse.java @@ -0,0 +1,1132 @@ +/* + * 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 ListViews.
+ * 
+ * + * Protobuf type {@code google.logging.v2.ListViewsResponse} + */ +public final class ListViewsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.logging.v2.ListViewsResponse) + ListViewsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListViewsResponse.newBuilder() to construct. + private ListViewsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListViewsResponse() { + views_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListViewsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListViewsResponse( + 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)) { + views_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + views_.add( + input.readMessage(com.google.logging.v2.LogView.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)) { + views_ = java.util.Collections.unmodifiableList(views_); + } + 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_ListViewsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_ListViewsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.ListViewsResponse.class, + com.google.logging.v2.ListViewsResponse.Builder.class); + } + + public static final int VIEWS_FIELD_NUMBER = 1; + private java.util.List views_; + /** + * + * + *
+   * A list of views.
+   * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + @java.lang.Override + public java.util.List getViewsList() { + return views_; + } + /** + * + * + *
+   * A list of views.
+   * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + @java.lang.Override + public java.util.List getViewsOrBuilderList() { + return views_; + } + /** + * + * + *
+   * A list of views.
+   * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + @java.lang.Override + public int getViewsCount() { + return views_.size(); + } + /** + * + * + *
+   * A list of views.
+   * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + @java.lang.Override + public com.google.logging.v2.LogView getViews(int index) { + return views_.get(index); + } + /** + * + * + *
+   * A list of views.
+   * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + @java.lang.Override + public com.google.logging.v2.LogViewOrBuilder getViewsOrBuilder(int index) { + return views_.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 < views_.size(); i++) { + output.writeMessage(1, views_.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 < views_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, views_.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.ListViewsResponse)) { + return super.equals(obj); + } + com.google.logging.v2.ListViewsResponse other = (com.google.logging.v2.ListViewsResponse) obj; + + if (!getViewsList().equals(other.getViewsList())) 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 (getViewsCount() > 0) { + hash = (37 * hash) + VIEWS_FIELD_NUMBER; + hash = (53 * hash) + getViewsList().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.ListViewsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.ListViewsResponse 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.ListViewsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.ListViewsResponse 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.ListViewsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.ListViewsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.logging.v2.ListViewsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.ListViewsResponse 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.ListViewsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.logging.v2.ListViewsResponse 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.ListViewsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.ListViewsResponse 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.ListViewsResponse 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 ListViews.
+   * 
+ * + * Protobuf type {@code google.logging.v2.ListViewsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.logging.v2.ListViewsResponse) + com.google.logging.v2.ListViewsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_ListViewsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_ListViewsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.ListViewsResponse.class, + com.google.logging.v2.ListViewsResponse.Builder.class); + } + + // Construct using com.google.logging.v2.ListViewsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getViewsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (viewsBuilder_ == null) { + views_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + viewsBuilder_.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_ListViewsResponse_descriptor; + } + + @java.lang.Override + public com.google.logging.v2.ListViewsResponse getDefaultInstanceForType() { + return com.google.logging.v2.ListViewsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.logging.v2.ListViewsResponse build() { + com.google.logging.v2.ListViewsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.logging.v2.ListViewsResponse buildPartial() { + com.google.logging.v2.ListViewsResponse result = + new com.google.logging.v2.ListViewsResponse(this); + int from_bitField0_ = bitField0_; + if (viewsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + views_ = java.util.Collections.unmodifiableList(views_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.views_ = views_; + } else { + result.views_ = viewsBuilder_.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.ListViewsResponse) { + return mergeFrom((com.google.logging.v2.ListViewsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.logging.v2.ListViewsResponse other) { + if (other == com.google.logging.v2.ListViewsResponse.getDefaultInstance()) return this; + if (viewsBuilder_ == null) { + if (!other.views_.isEmpty()) { + if (views_.isEmpty()) { + views_ = other.views_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureViewsIsMutable(); + views_.addAll(other.views_); + } + onChanged(); + } + } else { + if (!other.views_.isEmpty()) { + if (viewsBuilder_.isEmpty()) { + viewsBuilder_.dispose(); + viewsBuilder_ = null; + views_ = other.views_; + bitField0_ = (bitField0_ & ~0x00000001); + viewsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getViewsFieldBuilder() + : null; + } else { + viewsBuilder_.addAllMessages(other.views_); + } + } + } + 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.ListViewsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.logging.v2.ListViewsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List views_ = + java.util.Collections.emptyList(); + + private void ensureViewsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + views_ = new java.util.ArrayList(views_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.logging.v2.LogView, + com.google.logging.v2.LogView.Builder, + com.google.logging.v2.LogViewOrBuilder> + viewsBuilder_; + + /** + * + * + *
+     * A list of views.
+     * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + public java.util.List getViewsList() { + if (viewsBuilder_ == null) { + return java.util.Collections.unmodifiableList(views_); + } else { + return viewsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of views.
+     * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + public int getViewsCount() { + if (viewsBuilder_ == null) { + return views_.size(); + } else { + return viewsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of views.
+     * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + public com.google.logging.v2.LogView getViews(int index) { + if (viewsBuilder_ == null) { + return views_.get(index); + } else { + return viewsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of views.
+     * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + public Builder setViews(int index, com.google.logging.v2.LogView value) { + if (viewsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureViewsIsMutable(); + views_.set(index, value); + onChanged(); + } else { + viewsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of views.
+     * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + public Builder setViews(int index, com.google.logging.v2.LogView.Builder builderForValue) { + if (viewsBuilder_ == null) { + ensureViewsIsMutable(); + views_.set(index, builderForValue.build()); + onChanged(); + } else { + viewsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of views.
+     * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + public Builder addViews(com.google.logging.v2.LogView value) { + if (viewsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureViewsIsMutable(); + views_.add(value); + onChanged(); + } else { + viewsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of views.
+     * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + public Builder addViews(int index, com.google.logging.v2.LogView value) { + if (viewsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureViewsIsMutable(); + views_.add(index, value); + onChanged(); + } else { + viewsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of views.
+     * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + public Builder addViews(com.google.logging.v2.LogView.Builder builderForValue) { + if (viewsBuilder_ == null) { + ensureViewsIsMutable(); + views_.add(builderForValue.build()); + onChanged(); + } else { + viewsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of views.
+     * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + public Builder addViews(int index, com.google.logging.v2.LogView.Builder builderForValue) { + if (viewsBuilder_ == null) { + ensureViewsIsMutable(); + views_.add(index, builderForValue.build()); + onChanged(); + } else { + viewsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of views.
+     * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + public Builder addAllViews(java.lang.Iterable values) { + if (viewsBuilder_ == null) { + ensureViewsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, views_); + onChanged(); + } else { + viewsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of views.
+     * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + public Builder clearViews() { + if (viewsBuilder_ == null) { + views_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + viewsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of views.
+     * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + public Builder removeViews(int index) { + if (viewsBuilder_ == null) { + ensureViewsIsMutable(); + views_.remove(index); + onChanged(); + } else { + viewsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of views.
+     * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + public com.google.logging.v2.LogView.Builder getViewsBuilder(int index) { + return getViewsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of views.
+     * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + public com.google.logging.v2.LogViewOrBuilder getViewsOrBuilder(int index) { + if (viewsBuilder_ == null) { + return views_.get(index); + } else { + return viewsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of views.
+     * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + public java.util.List + getViewsOrBuilderList() { + if (viewsBuilder_ != null) { + return viewsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(views_); + } + } + /** + * + * + *
+     * A list of views.
+     * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + public com.google.logging.v2.LogView.Builder addViewsBuilder() { + return getViewsFieldBuilder().addBuilder(com.google.logging.v2.LogView.getDefaultInstance()); + } + /** + * + * + *
+     * A list of views.
+     * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + public com.google.logging.v2.LogView.Builder addViewsBuilder(int index) { + return getViewsFieldBuilder() + .addBuilder(index, com.google.logging.v2.LogView.getDefaultInstance()); + } + /** + * + * + *
+     * A list of views.
+     * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + public java.util.List getViewsBuilderList() { + return getViewsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.logging.v2.LogView, + com.google.logging.v2.LogView.Builder, + com.google.logging.v2.LogViewOrBuilder> + getViewsFieldBuilder() { + if (viewsBuilder_ == null) { + viewsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.logging.v2.LogView, + com.google.logging.v2.LogView.Builder, + com.google.logging.v2.LogViewOrBuilder>( + views_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + views_ = null; + } + return viewsBuilder_; + } + + 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.ListViewsResponse) + } + + // @@protoc_insertion_point(class_scope:google.logging.v2.ListViewsResponse) + private static final com.google.logging.v2.ListViewsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.logging.v2.ListViewsResponse(); + } + + public static com.google.logging.v2.ListViewsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListViewsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListViewsResponse(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.ListViewsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsResponseOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsResponseOrBuilder.java new file mode 100644 index 000000000..87d2f7198 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsResponseOrBuilder.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 ListViewsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.logging.v2.ListViewsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of views.
+   * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + java.util.List getViewsList(); + /** + * + * + *
+   * A list of views.
+   * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + com.google.logging.v2.LogView getViews(int index); + /** + * + * + *
+   * A list of views.
+   * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + int getViewsCount(); + /** + * + * + *
+   * A list of views.
+   * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + java.util.List getViewsOrBuilderList(); + /** + * + * + *
+   * A list of views.
+   * 
+ * + * repeated .google.logging.v2.LogView views = 1; + */ + com.google.logging.v2.LogViewOrBuilder getViewsOrBuilder(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/LogBucket.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogBucket.java index 578e0d7f3..abab04234 100644 --- 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 @@ -22,7 +22,7 @@ * * *
- * Describes a repository of logs (Beta).
+ * Describes a repository of logs.
  * 
* * Protobuf type {@code google.logging.v2.LogBucket} @@ -114,6 +114,11 @@ private LogBucket( updateTime_ = subBuilder.buildPartial(); } + break; + } + case 72: + { + locked_ = input.readBool(); break; } case 88: @@ -172,7 +177,6 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * "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. @@ -203,7 +207,6 @@ public java.lang.String getName() { * "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. @@ -397,6 +400,26 @@ public int getRetentionDays() { return retentionDays_; } + public static final int LOCKED_FIELD_NUMBER = 9; + private boolean locked_; + /** + * + * + *
+   * Whether the bucket has been locked.
+   * The retention period on a locked bucket may not be changed.
+   * Locked buckets may only be deleted if they are empty.
+   * 
+ * + * bool locked = 9; + * + * @return The locked. + */ + @java.lang.Override + public boolean getLocked() { + return locked_; + } + public static final int LIFECYCLE_STATE_FIELD_NUMBER = 12; private int lifecycleState_; /** @@ -463,6 +486,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateTime_ != null) { output.writeMessage(5, getUpdateTime()); } + if (locked_ != false) { + output.writeBool(9, locked_); + } if (retentionDays_ != 0) { output.writeInt32(11, retentionDays_); } @@ -491,6 +517,9 @@ public int getSerializedSize() { if (updateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); } + if (locked_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, locked_); + } if (retentionDays_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(11, retentionDays_); } @@ -524,6 +553,7 @@ public boolean equals(final java.lang.Object obj) { if (!getUpdateTime().equals(other.getUpdateTime())) return false; } if (getRetentionDays() != other.getRetentionDays()) return false; + if (getLocked() != other.getLocked()) return false; if (lifecycleState_ != other.lifecycleState_) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -550,6 +580,8 @@ public int hashCode() { } hash = (37 * hash) + RETENTION_DAYS_FIELD_NUMBER; hash = (53 * hash) + getRetentionDays(); + hash = (37 * hash) + LOCKED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getLocked()); hash = (37 * hash) + LIFECYCLE_STATE_FIELD_NUMBER; hash = (53 * hash) + lifecycleState_; hash = (29 * hash) + unknownFields.hashCode(); @@ -655,7 +687,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Describes a repository of logs (Beta).
+   * Describes a repository of logs.
    * 
* * Protobuf type {@code google.logging.v2.LogBucket} @@ -713,6 +745,8 @@ public Builder clear() { } retentionDays_ = 0; + locked_ = false; + lifecycleState_ = 0; return this; @@ -754,6 +788,7 @@ public com.google.logging.v2.LogBucket buildPartial() { result.updateTime_ = updateTimeBuilder_.build(); } result.retentionDays_ = retentionDays_; + result.locked_ = locked_; result.lifecycleState_ = lifecycleState_; onBuilt(); return result; @@ -821,6 +856,9 @@ public Builder mergeFrom(com.google.logging.v2.LogBucket other) { if (other.getRetentionDays() != 0) { setRetentionDays(other.getRetentionDays()); } + if (other.getLocked() != false) { + setLocked(other.getLocked()); + } if (other.lifecycleState_ != 0) { setLifecycleStateValue(other.getLifecycleStateValue()); } @@ -863,7 +901,6 @@ public Builder mergeFrom( * "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. @@ -893,7 +930,6 @@ public java.lang.String getName() { * "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. @@ -923,7 +959,6 @@ public com.google.protobuf.ByteString getNameBytes() { * "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. @@ -952,7 +987,6 @@ public Builder setName(java.lang.String value) { * "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. @@ -977,7 +1011,6 @@ public Builder clearName() { * "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. @@ -1577,6 +1610,64 @@ public Builder clearRetentionDays() { return this; } + private boolean locked_; + /** + * + * + *
+     * Whether the bucket has been locked.
+     * The retention period on a locked bucket may not be changed.
+     * Locked buckets may only be deleted if they are empty.
+     * 
+ * + * bool locked = 9; + * + * @return The locked. + */ + @java.lang.Override + public boolean getLocked() { + return locked_; + } + /** + * + * + *
+     * Whether the bucket has been locked.
+     * The retention period on a locked bucket may not be changed.
+     * Locked buckets may only be deleted if they are empty.
+     * 
+ * + * bool locked = 9; + * + * @param value The locked to set. + * @return This builder for chaining. + */ + public Builder setLocked(boolean value) { + + locked_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether the bucket has been locked.
+     * The retention period on a locked bucket may not be changed.
+     * Locked buckets may only be deleted if they are empty.
+     * 
+ * + * bool locked = 9; + * + * @return This builder for chaining. + */ + public Builder clearLocked() { + + locked_ = false; + onChanged(); + return this; + } + private int lifecycleState_ = 0; /** * 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 index d67d519b6..74a5888d6 100644 --- 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 @@ -32,7 +32,6 @@ public interface LogBucketOrBuilder * "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. @@ -52,7 +51,6 @@ public interface LogBucketOrBuilder * "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. @@ -184,6 +182,21 @@ public interface LogBucketOrBuilder */ int getRetentionDays(); + /** + * + * + *
+   * Whether the bucket has been locked.
+   * The retention period on a locked bucket may not be changed.
+   * Locked buckets may only be deleted if they are empty.
+   * 
+ * + * bool locked = 9; + * + * @return The locked. + */ + boolean getLocked(); + /** * * 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 ea7ee6bce..168a00a60 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 @@ -24,8 +24,8 @@ *
  * Describes a logs-based metric. The value of the metric is the number of log
  * entries that match a logs filter in a given time interval.
- * Logs-based metric can also be used to extract values from logs and create a
- * a distribution of the values. The distribution records the statistics of the
+ * Logs-based metrics can also be used to extract values from logs and create a
+ * distribution of the values. The distribution records the statistics of the
  * extracted values along with an optional histogram of the values as specified
  * by the bucket options.
  * 
@@ -1357,8 +1357,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
    * Describes a logs-based metric. The value of the metric is the number of log
    * entries that match a logs filter in a given time interval.
-   * Logs-based metric can also be used to extract values from logs and create a
-   * a distribution of the values. The distribution records the statistics of the
+   * Logs-based metrics can also be used to extract values from logs and create a
+   * distribution of the values. The distribution records the statistics of the
    * extracted values along with an optional histogram of the values as specified
    * by the bucket options.
    * 
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 8a8741f89..cd2def7fb 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 @@ -46,6 +46,7 @@ private LogSink() { destination_ = ""; filter_ = ""; description_ = ""; + exclusions_ = java.util.Collections.emptyList(); outputVersionFormat_ = 0; writerIdentity_ = ""; } @@ -69,6 +70,7 @@ private LogSink( if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } + int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -165,6 +167,17 @@ private LogSink( break; } + case 130: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + exclusions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + exclusions_.add( + input.readMessage( + com.google.logging.v2.LogExclusion.parser(), extensionRegistry)); + break; + } case 146: { java.lang.String s = input.readStringRequireUtf8(); @@ -191,6 +204,9 @@ private LogSink( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + exclusions_ = java.util.Collections.unmodifiableList(exclusions_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -664,6 +680,95 @@ public boolean getDisabled() { return disabled_; } + public static final int EXCLUSIONS_FIELD_NUMBER = 16; + private java.util.List exclusions_; + /** + * + * + *
+   * Optional. Log entries that match any of the exclusion filters will not be exported.
+   * If a log entry is matched by both `filter` and one of `exclusion_filters`
+   * it will not be exported.
+   * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getExclusionsList() { + return exclusions_; + } + /** + * + * + *
+   * Optional. Log entries that match any of the exclusion filters will not be exported.
+   * If a log entry is matched by both `filter` and one of `exclusion_filters`
+   * it will not be exported.
+   * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getExclusionsOrBuilderList() { + return exclusions_; + } + /** + * + * + *
+   * Optional. Log entries that match any of the exclusion filters will not be exported.
+   * If a log entry is matched by both `filter` and one of `exclusion_filters`
+   * it will not be exported.
+   * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getExclusionsCount() { + return exclusions_.size(); + } + /** + * + * + *
+   * Optional. Log entries that match any of the exclusion filters will not be exported.
+   * If a log entry is matched by both `filter` and one of `exclusion_filters`
+   * it will not be exported.
+   * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.logging.v2.LogExclusion getExclusions(int index) { + return exclusions_.get(index); + } + /** + * + * + *
+   * Optional. Log entries that match any of the exclusion filters will not be exported.
+   * If a log entry is matched by both `filter` and one of `exclusion_filters`
+   * it will not be exported.
+   * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.logging.v2.LogExclusionOrBuilder getExclusionsOrBuilder(int index) { + return exclusions_.get(index); + } + public static final int OUTPUT_VERSION_FORMAT_FIELD_NUMBER = 6; private int outputVersionFormat_; /** @@ -710,7 +815,7 @@ public com.google.logging.v2.LogSink.VersionFormat getOutputVersionFormat() { * * *
-   * Output only. An IAM identity–a service account or group&mdash;under which Logging
+   * 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
@@ -743,7 +848,7 @@ public java.lang.String getWriterIdentity() {
    *
    *
    * 
-   * Output only. An IAM identity–a service account or group&mdash;under which Logging
+   * 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
@@ -1005,6 +1110,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     if (updateTime_ != null) {
       output.writeMessage(14, getUpdateTime());
     }
+    for (int i = 0; i < exclusions_.size(); i++) {
+      output.writeMessage(16, exclusions_.get(i));
+    }
     if (!getDescriptionBytes().isEmpty()) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 18, description_);
     }
@@ -1050,6 +1158,9 @@ public int getSerializedSize() {
     if (updateTime_ != null) {
       size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getUpdateTime());
     }
+    for (int i = 0; i < exclusions_.size(); i++) {
+      size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, exclusions_.get(i));
+    }
     if (!getDescriptionBytes().isEmpty()) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, description_);
     }
@@ -1076,6 +1187,7 @@ public boolean equals(final java.lang.Object obj) {
     if (!getFilter().equals(other.getFilter())) return false;
     if (!getDescription().equals(other.getDescription())) return false;
     if (getDisabled() != other.getDisabled()) return false;
+    if (!getExclusionsList().equals(other.getExclusionsList())) return false;
     if (outputVersionFormat_ != other.outputVersionFormat_) return false;
     if (!getWriterIdentity().equals(other.getWriterIdentity())) return false;
     if (getIncludeChildren() != other.getIncludeChildren()) return false;
@@ -1116,6 +1228,10 @@ public int hashCode() {
     hash = (53 * hash) + getDescription().hashCode();
     hash = (37 * hash) + DISABLED_FIELD_NUMBER;
     hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisabled());
+    if (getExclusionsCount() > 0) {
+      hash = (37 * hash) + EXCLUSIONS_FIELD_NUMBER;
+      hash = (53 * hash) + getExclusionsList().hashCode();
+    }
     hash = (37 * hash) + OUTPUT_VERSION_FORMAT_FIELD_NUMBER;
     hash = (53 * hash) + outputVersionFormat_;
     hash = (37 * hash) + WRITER_IDENTITY_FIELD_NUMBER;
@@ -1279,7 +1395,9 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
     }
 
     private void maybeForceBuilderInitialization() {
-      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
+      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
+        getExclusionsFieldBuilder();
+      }
     }
 
     @java.lang.Override
@@ -1295,6 +1413,12 @@ public Builder clear() {
 
       disabled_ = false;
 
+      if (exclusionsBuilder_ == null) {
+        exclusions_ = java.util.Collections.emptyList();
+        bitField0_ = (bitField0_ & ~0x00000001);
+      } else {
+        exclusionsBuilder_.clear();
+      }
       outputVersionFormat_ = 0;
 
       writerIdentity_ = "";
@@ -1341,11 +1465,21 @@ public com.google.logging.v2.LogSink build() {
     @java.lang.Override
     public com.google.logging.v2.LogSink buildPartial() {
       com.google.logging.v2.LogSink result = new com.google.logging.v2.LogSink(this);
+      int from_bitField0_ = bitField0_;
       result.name_ = name_;
       result.destination_ = destination_;
       result.filter_ = filter_;
       result.description_ = description_;
       result.disabled_ = disabled_;
+      if (exclusionsBuilder_ == null) {
+        if (((bitField0_ & 0x00000001) != 0)) {
+          exclusions_ = java.util.Collections.unmodifiableList(exclusions_);
+          bitField0_ = (bitField0_ & ~0x00000001);
+        }
+        result.exclusions_ = exclusions_;
+      } else {
+        result.exclusions_ = exclusionsBuilder_.build();
+      }
       result.outputVersionFormat_ = outputVersionFormat_;
       result.writerIdentity_ = writerIdentity_;
       result.includeChildren_ = includeChildren_;
@@ -1435,6 +1569,33 @@ public Builder mergeFrom(com.google.logging.v2.LogSink other) {
       if (other.getDisabled() != false) {
         setDisabled(other.getDisabled());
       }
+      if (exclusionsBuilder_ == null) {
+        if (!other.exclusions_.isEmpty()) {
+          if (exclusions_.isEmpty()) {
+            exclusions_ = other.exclusions_;
+            bitField0_ = (bitField0_ & ~0x00000001);
+          } else {
+            ensureExclusionsIsMutable();
+            exclusions_.addAll(other.exclusions_);
+          }
+          onChanged();
+        }
+      } else {
+        if (!other.exclusions_.isEmpty()) {
+          if (exclusionsBuilder_.isEmpty()) {
+            exclusionsBuilder_.dispose();
+            exclusionsBuilder_ = null;
+            exclusions_ = other.exclusions_;
+            bitField0_ = (bitField0_ & ~0x00000001);
+            exclusionsBuilder_ =
+                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
+                    ? getExclusionsFieldBuilder()
+                    : null;
+          } else {
+            exclusionsBuilder_.addAllMessages(other.exclusions_);
+          }
+        }
+      }
       if (other.outputVersionFormat_ != 0) {
         setOutputVersionFormatValue(other.getOutputVersionFormatValue());
       }
@@ -1505,6 +1666,8 @@ public Builder clearOptions() {
       return this;
     }
 
+    private int bitField0_;
+
     private java.lang.Object name_ = "";
     /**
      *
@@ -2079,6 +2242,426 @@ public Builder clearDisabled() {
       return this;
     }
 
+    private java.util.List exclusions_ =
+        java.util.Collections.emptyList();
+
+    private void ensureExclusionsIsMutable() {
+      if (!((bitField0_ & 0x00000001) != 0)) {
+        exclusions_ = new java.util.ArrayList(exclusions_);
+        bitField0_ |= 0x00000001;
+      }
+    }
+
+    private com.google.protobuf.RepeatedFieldBuilderV3<
+            com.google.logging.v2.LogExclusion,
+            com.google.logging.v2.LogExclusion.Builder,
+            com.google.logging.v2.LogExclusionOrBuilder>
+        exclusionsBuilder_;
+
+    /**
+     *
+     *
+     * 
+     * Optional. Log entries that match any of the exclusion filters will not be exported.
+     * If a log entry is matched by both `filter` and one of `exclusion_filters`
+     * it will not be exported.
+     * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getExclusionsList() { + if (exclusionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(exclusions_); + } else { + return exclusionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. Log entries that match any of the exclusion filters will not be exported.
+     * If a log entry is matched by both `filter` and one of `exclusion_filters`
+     * it will not be exported.
+     * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getExclusionsCount() { + if (exclusionsBuilder_ == null) { + return exclusions_.size(); + } else { + return exclusionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. Log entries that match any of the exclusion filters will not be exported.
+     * If a log entry is matched by both `filter` and one of `exclusion_filters`
+     * it will not be exported.
+     * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.logging.v2.LogExclusion getExclusions(int index) { + if (exclusionsBuilder_ == null) { + return exclusions_.get(index); + } else { + return exclusionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. Log entries that match any of the exclusion filters will not be exported.
+     * If a log entry is matched by both `filter` and one of `exclusion_filters`
+     * it will not be exported.
+     * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExclusions(int index, com.google.logging.v2.LogExclusion value) { + if (exclusionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExclusionsIsMutable(); + exclusions_.set(index, value); + onChanged(); + } else { + exclusionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Log entries that match any of the exclusion filters will not be exported.
+     * If a log entry is matched by both `filter` and one of `exclusion_filters`
+     * it will not be exported.
+     * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExclusions( + int index, com.google.logging.v2.LogExclusion.Builder builderForValue) { + if (exclusionsBuilder_ == null) { + ensureExclusionsIsMutable(); + exclusions_.set(index, builderForValue.build()); + onChanged(); + } else { + exclusionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Log entries that match any of the exclusion filters will not be exported.
+     * If a log entry is matched by both `filter` and one of `exclusion_filters`
+     * it will not be exported.
+     * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addExclusions(com.google.logging.v2.LogExclusion value) { + if (exclusionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExclusionsIsMutable(); + exclusions_.add(value); + onChanged(); + } else { + exclusionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. Log entries that match any of the exclusion filters will not be exported.
+     * If a log entry is matched by both `filter` and one of `exclusion_filters`
+     * it will not be exported.
+     * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addExclusions(int index, com.google.logging.v2.LogExclusion value) { + if (exclusionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExclusionsIsMutable(); + exclusions_.add(index, value); + onChanged(); + } else { + exclusionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Log entries that match any of the exclusion filters will not be exported.
+     * If a log entry is matched by both `filter` and one of `exclusion_filters`
+     * it will not be exported.
+     * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addExclusions(com.google.logging.v2.LogExclusion.Builder builderForValue) { + if (exclusionsBuilder_ == null) { + ensureExclusionsIsMutable(); + exclusions_.add(builderForValue.build()); + onChanged(); + } else { + exclusionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Log entries that match any of the exclusion filters will not be exported.
+     * If a log entry is matched by both `filter` and one of `exclusion_filters`
+     * it will not be exported.
+     * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addExclusions( + int index, com.google.logging.v2.LogExclusion.Builder builderForValue) { + if (exclusionsBuilder_ == null) { + ensureExclusionsIsMutable(); + exclusions_.add(index, builderForValue.build()); + onChanged(); + } else { + exclusionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Log entries that match any of the exclusion filters will not be exported.
+     * If a log entry is matched by both `filter` and one of `exclusion_filters`
+     * it will not be exported.
+     * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllExclusions( + java.lang.Iterable values) { + if (exclusionsBuilder_ == null) { + ensureExclusionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exclusions_); + onChanged(); + } else { + exclusionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. Log entries that match any of the exclusion filters will not be exported.
+     * If a log entry is matched by both `filter` and one of `exclusion_filters`
+     * it will not be exported.
+     * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearExclusions() { + if (exclusionsBuilder_ == null) { + exclusions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + exclusionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Log entries that match any of the exclusion filters will not be exported.
+     * If a log entry is matched by both `filter` and one of `exclusion_filters`
+     * it will not be exported.
+     * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeExclusions(int index) { + if (exclusionsBuilder_ == null) { + ensureExclusionsIsMutable(); + exclusions_.remove(index); + onChanged(); + } else { + exclusionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. Log entries that match any of the exclusion filters will not be exported.
+     * If a log entry is matched by both `filter` and one of `exclusion_filters`
+     * it will not be exported.
+     * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.logging.v2.LogExclusion.Builder getExclusionsBuilder(int index) { + return getExclusionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. Log entries that match any of the exclusion filters will not be exported.
+     * If a log entry is matched by both `filter` and one of `exclusion_filters`
+     * it will not be exported.
+     * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.logging.v2.LogExclusionOrBuilder getExclusionsOrBuilder(int index) { + if (exclusionsBuilder_ == null) { + return exclusions_.get(index); + } else { + return exclusionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. Log entries that match any of the exclusion filters will not be exported.
+     * If a log entry is matched by both `filter` and one of `exclusion_filters`
+     * it will not be exported.
+     * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getExclusionsOrBuilderList() { + if (exclusionsBuilder_ != null) { + return exclusionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(exclusions_); + } + } + /** + * + * + *
+     * Optional. Log entries that match any of the exclusion filters will not be exported.
+     * If a log entry is matched by both `filter` and one of `exclusion_filters`
+     * it will not be exported.
+     * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.logging.v2.LogExclusion.Builder addExclusionsBuilder() { + return getExclusionsFieldBuilder() + .addBuilder(com.google.logging.v2.LogExclusion.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Log entries that match any of the exclusion filters will not be exported.
+     * If a log entry is matched by both `filter` and one of `exclusion_filters`
+     * it will not be exported.
+     * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.logging.v2.LogExclusion.Builder addExclusionsBuilder(int index) { + return getExclusionsFieldBuilder() + .addBuilder(index, com.google.logging.v2.LogExclusion.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Log entries that match any of the exclusion filters will not be exported.
+     * If a log entry is matched by both `filter` and one of `exclusion_filters`
+     * it will not be exported.
+     * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getExclusionsBuilderList() { + return getExclusionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.logging.v2.LogExclusion, + com.google.logging.v2.LogExclusion.Builder, + com.google.logging.v2.LogExclusionOrBuilder> + getExclusionsFieldBuilder() { + if (exclusionsBuilder_ == null) { + exclusionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.logging.v2.LogExclusion, + com.google.logging.v2.LogExclusion.Builder, + com.google.logging.v2.LogExclusionOrBuilder>( + exclusions_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + exclusions_ = null; + } + return exclusionsBuilder_; + } + private int outputVersionFormat_ = 0; /** * @@ -2185,7 +2768,7 @@ public Builder clearOutputVersionFormat() { * * *
-     * Output only. An IAM identity–a service account or group&mdash;under which Logging
+     * 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
@@ -2217,7 +2800,7 @@ public java.lang.String getWriterIdentity() {
      *
      *
      * 
-     * Output only. An IAM identity–a service account or group&mdash;under which Logging
+     * 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
@@ -2249,7 +2832,7 @@ public com.google.protobuf.ByteString getWriterIdentityBytes() {
      *
      *
      * 
-     * Output only. An IAM identity–a service account or group&mdash;under which Logging
+     * 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
@@ -2280,7 +2863,7 @@ public Builder setWriterIdentity(java.lang.String value) {
      *
      *
      * 
-     * Output only. An IAM identity–a service account or group&mdash;under which Logging
+     * 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
@@ -2307,7 +2890,7 @@ public Builder clearWriterIdentity() {
      *
      *
      * 
-     * Output only. An IAM identity–a service account or group&mdash;under which Logging
+     * 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
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 c24f12e89..081eab350 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
@@ -175,6 +175,78 @@ public interface LogSinkOrBuilder
    */
   boolean getDisabled();
 
+  /**
+   *
+   *
+   * 
+   * Optional. Log entries that match any of the exclusion filters will not be exported.
+   * If a log entry is matched by both `filter` and one of `exclusion_filters`
+   * it will not be exported.
+   * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getExclusionsList(); + /** + * + * + *
+   * Optional. Log entries that match any of the exclusion filters will not be exported.
+   * If a log entry is matched by both `filter` and one of `exclusion_filters`
+   * it will not be exported.
+   * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.logging.v2.LogExclusion getExclusions(int index); + /** + * + * + *
+   * Optional. Log entries that match any of the exclusion filters will not be exported.
+   * If a log entry is matched by both `filter` and one of `exclusion_filters`
+   * it will not be exported.
+   * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getExclusionsCount(); + /** + * + * + *
+   * Optional. Log entries that match any of the exclusion filters will not be exported.
+   * If a log entry is matched by both `filter` and one of `exclusion_filters`
+   * it will not be exported.
+   * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getExclusionsOrBuilderList(); + /** + * + * + *
+   * Optional. Log entries that match any of the exclusion filters will not be exported.
+   * If a log entry is matched by both `filter` and one of `exclusion_filters`
+   * it will not be exported.
+   * 
+ * + * + * repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.logging.v2.LogExclusionOrBuilder getExclusionsOrBuilder(int index); + /** * * @@ -208,7 +280,7 @@ public interface LogSinkOrBuilder * * *
-   * Output only. An IAM identity–a service account or group&mdash;under which Logging
+   * 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
@@ -230,7 +302,7 @@ public interface LogSinkOrBuilder
    *
    *
    * 
-   * Output only. An IAM identity–a service account or group&mdash;under which Logging
+   * 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
diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogView.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogView.java
new file mode 100644
index 000000000..1856b0c4c
--- /dev/null
+++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogView.java
@@ -0,0 +1,1636 @@
+/*
+ * 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 view over logs in a bucket.
+ * 
+ * + * Protobuf type {@code google.logging.v2.LogView} + */ +public final class LogView extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.logging.v2.LogView) + LogViewOrBuilder { + private static final long serialVersionUID = 0L; + // Use LogView.newBuilder() to construct. + private LogView(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LogView() { + name_ = ""; + description_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LogView(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LogView( + 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 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = 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_LogView_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_LogView_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.LogView.class, com.google.logging.v2.LogView.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The resource name of the view.
+   * For example
+   * "projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view
+   * 
+ * + * 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 view.
+   * For example
+   * "projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view
+   * 
+ * + * 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 view.
+   * 
+ * + * 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 view.
+   * 
+ * + * 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 view.
+   * 
+ * + * .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 view.
+   * 
+ * + * .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 view.
+   * 
+ * + * .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 view.
+   * 
+ * + * .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 view.
+   * 
+ * + * .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 view.
+   * 
+ * + * .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 FILTER_FIELD_NUMBER = 7; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Filter that restricts which log entries in a bucket are visible in this
+   * view. Filters are restricted to be a logical AND of ==/!= of any of the
+   * following:
+   *   originating project/folder/organization/billing account.
+   *   resource type
+   *   log id
+   * Example: SOURCE("projects/myproject") AND resource.type = "gce_instance"
+   *             AND LOG_ID("stdout")
+   * 
+ * + * string filter = 7; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filter that restricts which log entries in a bucket are visible in this
+   * view. Filters are restricted to be a logical AND of ==/!= of any of the
+   * following:
+   *   originating project/folder/organization/billing account.
+   *   resource type
+   *   log id
+   * Example: SOURCE("projects/myproject") AND resource.type = "gce_instance"
+   *             AND LOG_ID("stdout")
+   * 
+ * + * string filter = 7; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!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 (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, filter_); + } + 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 (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, filter_); + } + 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.LogView)) { + return super.equals(obj); + } + com.google.logging.v2.LogView other = (com.google.logging.v2.LogView) 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 (!getFilter().equals(other.getFilter())) 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) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.logging.v2.LogView parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.LogView 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.LogView parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.LogView 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.LogView parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.LogView parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.logging.v2.LogView parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.LogView 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.LogView parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.logging.v2.LogView 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.LogView parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.LogView 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.LogView 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 view over logs in a bucket.
+   * 
+ * + * Protobuf type {@code google.logging.v2.LogView} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.logging.v2.LogView) + com.google.logging.v2.LogViewOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_LogView_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_LogView_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.LogView.class, com.google.logging.v2.LogView.Builder.class); + } + + // Construct using com.google.logging.v2.LogView.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; + } + filter_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_LogView_descriptor; + } + + @java.lang.Override + public com.google.logging.v2.LogView getDefaultInstanceForType() { + return com.google.logging.v2.LogView.getDefaultInstance(); + } + + @java.lang.Override + public com.google.logging.v2.LogView build() { + com.google.logging.v2.LogView result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.logging.v2.LogView buildPartial() { + com.google.logging.v2.LogView result = new com.google.logging.v2.LogView(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.filter_ = filter_; + 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.LogView) { + return mergeFrom((com.google.logging.v2.LogView) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.logging.v2.LogView other) { + if (other == com.google.logging.v2.LogView.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.getFilter().isEmpty()) { + filter_ = other.filter_; + 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.LogView parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.logging.v2.LogView) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name of the view.
+     * For example
+     * "projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view
+     * 
+ * + * 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 view.
+     * For example
+     * "projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view
+     * 
+ * + * 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 view.
+     * For example
+     * "projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view
+     * 
+ * + * 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 view.
+     * For example
+     * "projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the view.
+     * For example
+     * "projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view
+     * 
+ * + * 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 view.
+     * 
+ * + * 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 view.
+     * 
+ * + * 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 view.
+     * 
+ * + * 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 view.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Describes this view.
+     * 
+ * + * 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 view.
+     * 
+ * + * + * .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 view.
+     * 
+ * + * + * .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 view.
+     * 
+ * + * + * .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 view.
+     * 
+ * + * + * .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 view.
+     * 
+ * + * + * .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 view.
+     * 
+ * + * + * .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 view.
+     * 
+ * + * + * .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 view.
+     * 
+ * + * + * .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 view.
+     * 
+ * + * + * .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 view.
+     * 
+ * + * + * .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 view.
+     * 
+ * + * + * .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 view.
+     * 
+ * + * + * .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 view.
+     * 
+ * + * + * .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 view.
+     * 
+ * + * + * .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 view.
+     * 
+ * + * + * .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 view.
+     * 
+ * + * + * .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 view.
+     * 
+ * + * + * .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 view.
+     * 
+ * + * + * .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 java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filter that restricts which log entries in a bucket are visible in this
+     * view. Filters are restricted to be a logical AND of ==/!= of any of the
+     * following:
+     *   originating project/folder/organization/billing account.
+     *   resource type
+     *   log id
+     * Example: SOURCE("projects/myproject") AND resource.type = "gce_instance"
+     *             AND LOG_ID("stdout")
+     * 
+ * + * string filter = 7; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filter that restricts which log entries in a bucket are visible in this
+     * view. Filters are restricted to be a logical AND of ==/!= of any of the
+     * following:
+     *   originating project/folder/organization/billing account.
+     *   resource type
+     *   log id
+     * Example: SOURCE("projects/myproject") AND resource.type = "gce_instance"
+     *             AND LOG_ID("stdout")
+     * 
+ * + * string filter = 7; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filter that restricts which log entries in a bucket are visible in this
+     * view. Filters are restricted to be a logical AND of ==/!= of any of the
+     * following:
+     *   originating project/folder/organization/billing account.
+     *   resource type
+     *   log id
+     * Example: SOURCE("projects/myproject") AND resource.type = "gce_instance"
+     *             AND LOG_ID("stdout")
+     * 
+ * + * string filter = 7; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Filter that restricts which log entries in a bucket are visible in this
+     * view. Filters are restricted to be a logical AND of ==/!= of any of the
+     * following:
+     *   originating project/folder/organization/billing account.
+     *   resource type
+     *   log id
+     * Example: SOURCE("projects/myproject") AND resource.type = "gce_instance"
+     *             AND LOG_ID("stdout")
+     * 
+ * + * string filter = 7; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Filter that restricts which log entries in a bucket are visible in this
+     * view. Filters are restricted to be a logical AND of ==/!= of any of the
+     * following:
+     *   originating project/folder/organization/billing account.
+     *   resource type
+     *   log id
+     * Example: SOURCE("projects/myproject") AND resource.type = "gce_instance"
+     *             AND LOG_ID("stdout")
+     * 
+ * + * string filter = 7; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + 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.LogView) + } + + // @@protoc_insertion_point(class_scope:google.logging.v2.LogView) + private static final com.google.logging.v2.LogView DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.logging.v2.LogView(); + } + + public static com.google.logging.v2.LogView getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LogView parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LogView(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.LogView getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogViewName.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogViewName.java new file mode 100644 index 000000000..878ce0021 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogViewName.java @@ -0,0 +1,634 @@ +/* + * 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 LogViewName implements ResourceName { + + @Deprecated + protected LogViewName() {} + + private static final PathTemplate PROJECT_LOCATION_BUCKET_VIEW_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/buckets/{bucket}/views/{view}"); + private static final PathTemplate ORGANIZATION_LOCATION_BUCKET_VIEW_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}"); + private static final PathTemplate FOLDER_LOCATION_BUCKET_VIEW_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}"); + private static final PathTemplate BILLING_ACCOUNT_LOCATION_BUCKET_VIEW_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}"); + + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + + private String project; + private String location; + private String bucket; + private String view; + 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 getView() { + return view; + } + + public String getOrganization() { + return organization; + } + + public String getFolder() { + return folder; + } + + public String getBillingAccount() { + return billingAccount; + } + + private LogViewName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + bucket = Preconditions.checkNotNull(builder.getBucket()); + view = Preconditions.checkNotNull(builder.getView()); + pathTemplate = PROJECT_LOCATION_BUCKET_VIEW_PATH_TEMPLATE; + } + + private LogViewName(OrganizationLocationBucketViewBuilder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + location = Preconditions.checkNotNull(builder.getLocation()); + bucket = Preconditions.checkNotNull(builder.getBucket()); + view = Preconditions.checkNotNull(builder.getView()); + pathTemplate = ORGANIZATION_LOCATION_BUCKET_VIEW_PATH_TEMPLATE; + } + + private LogViewName(FolderLocationBucketViewBuilder builder) { + folder = Preconditions.checkNotNull(builder.getFolder()); + location = Preconditions.checkNotNull(builder.getLocation()); + bucket = Preconditions.checkNotNull(builder.getBucket()); + view = Preconditions.checkNotNull(builder.getView()); + pathTemplate = FOLDER_LOCATION_BUCKET_VIEW_PATH_TEMPLATE; + } + + private LogViewName(BillingAccountLocationBucketViewBuilder builder) { + billingAccount = Preconditions.checkNotNull(builder.getBillingAccount()); + location = Preconditions.checkNotNull(builder.getLocation()); + bucket = Preconditions.checkNotNull(builder.getBucket()); + view = Preconditions.checkNotNull(builder.getView()); + pathTemplate = BILLING_ACCOUNT_LOCATION_BUCKET_VIEW_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 newProjectLocationBucketViewBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static OrganizationLocationBucketViewBuilder newOrganizationLocationBucketViewBuilder() { + return new OrganizationLocationBucketViewBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static FolderLocationBucketViewBuilder newFolderLocationBucketViewBuilder() { + return new FolderLocationBucketViewBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static BillingAccountLocationBucketViewBuilder + newBillingAccountLocationBucketViewBuilder() { + return new BillingAccountLocationBucketViewBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LogViewName of(String project, String location, String bucket, String view) { + return newProjectLocationBucketViewBuilder() + .setProject(project) + .setLocation(location) + .setBucket(bucket) + .setView(view) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static LogViewName ofProjectLocationBucketViewName( + String project, String location, String bucket, String view) { + return newProjectLocationBucketViewBuilder() + .setProject(project) + .setLocation(location) + .setBucket(bucket) + .setView(view) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static LogViewName ofOrganizationLocationBucketViewName( + String organization, String location, String bucket, String view) { + return newOrganizationLocationBucketViewBuilder() + .setOrganization(organization) + .setLocation(location) + .setBucket(bucket) + .setView(view) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static LogViewName ofFolderLocationBucketViewName( + String folder, String location, String bucket, String view) { + return newFolderLocationBucketViewBuilder() + .setFolder(folder) + .setLocation(location) + .setBucket(bucket) + .setView(view) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static LogViewName ofBillingAccountLocationBucketViewName( + String billingAccount, String location, String bucket, String view) { + return newBillingAccountLocationBucketViewBuilder() + .setBillingAccount(billingAccount) + .setLocation(location) + .setBucket(bucket) + .setView(view) + .build(); + } + + public static String format(String project, String location, String bucket, String view) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBucket(bucket) + .setView(view) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationBucketViewName( + String project, String location, String bucket, String view) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBucket(bucket) + .setView(view) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatOrganizationLocationBucketViewName( + String organization, String location, String bucket, String view) { + return newOrganizationLocationBucketViewBuilder() + .setOrganization(organization) + .setLocation(location) + .setBucket(bucket) + .setView(view) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatFolderLocationBucketViewName( + String folder, String location, String bucket, String view) { + return newFolderLocationBucketViewBuilder() + .setFolder(folder) + .setLocation(location) + .setBucket(bucket) + .setView(view) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatBillingAccountLocationBucketViewName( + String billingAccount, String location, String bucket, String view) { + return newBillingAccountLocationBucketViewBuilder() + .setBillingAccount(billingAccount) + .setLocation(location) + .setBucket(bucket) + .setView(view) + .build() + .toString(); + } + + public static LogViewName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT_LOCATION_BUCKET_VIEW_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = + PROJECT_LOCATION_BUCKET_VIEW_PATH_TEMPLATE.match(formattedString); + return ofProjectLocationBucketViewName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("bucket"), + matchMap.get("view")); + } else if (ORGANIZATION_LOCATION_BUCKET_VIEW_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = + ORGANIZATION_LOCATION_BUCKET_VIEW_PATH_TEMPLATE.match(formattedString); + return ofOrganizationLocationBucketViewName( + matchMap.get("organization"), + matchMap.get("location"), + matchMap.get("bucket"), + matchMap.get("view")); + } else if (FOLDER_LOCATION_BUCKET_VIEW_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = + FOLDER_LOCATION_BUCKET_VIEW_PATH_TEMPLATE.match(formattedString); + return ofFolderLocationBucketViewName( + matchMap.get("folder"), + matchMap.get("location"), + matchMap.get("bucket"), + matchMap.get("view")); + } else if (BILLING_ACCOUNT_LOCATION_BUCKET_VIEW_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = + BILLING_ACCOUNT_LOCATION_BUCKET_VIEW_PATH_TEMPLATE.match(formattedString); + return ofBillingAccountLocationBucketViewName( + matchMap.get("billing_account"), + matchMap.get("location"), + matchMap.get("bucket"), + matchMap.get("view")); + } + 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 (LogViewName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_BUCKET_VIEW_PATH_TEMPLATE.matches(formattedString) + || ORGANIZATION_LOCATION_BUCKET_VIEW_PATH_TEMPLATE.matches(formattedString) + || FOLDER_LOCATION_BUCKET_VIEW_PATH_TEMPLATE.matches(formattedString) + || BILLING_ACCOUNT_LOCATION_BUCKET_VIEW_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 (view != null) { + fieldMapBuilder.put("view", view); + } + 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}/views/{view}. */ + public static class Builder { + + private String project; + private String location; + private String bucket; + private String view; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBucket() { + return bucket; + } + + public String getView() { + return view; + } + + 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; + } + + public Builder setView(String view) { + this.view = view; + return this; + } + + private Builder(LogViewName logViewName) { + Preconditions.checkArgument( + logViewName.pathTemplate == PROJECT_LOCATION_BUCKET_VIEW_PATH_TEMPLATE, + "toBuilder is only supported when LogViewName has the pattern of " + + "projects/{project}/locations/{location}/buckets/{bucket}/views/{view}."); + project = logViewName.project; + location = logViewName.location; + bucket = logViewName.bucket; + view = logViewName.view; + } + + public LogViewName build() { + return new LogViewName(this); + } + } + + /** + * Builder for organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}. + */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class OrganizationLocationBucketViewBuilder { + + private String organization; + private String location; + private String bucket; + private String view; + + private OrganizationLocationBucketViewBuilder() {} + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public String getBucket() { + return bucket; + } + + public String getView() { + return view; + } + + public OrganizationLocationBucketViewBuilder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public OrganizationLocationBucketViewBuilder setLocation(String location) { + this.location = location; + return this; + } + + public OrganizationLocationBucketViewBuilder setBucket(String bucket) { + this.bucket = bucket; + return this; + } + + public OrganizationLocationBucketViewBuilder setView(String view) { + this.view = view; + return this; + } + + public LogViewName build() { + return new LogViewName(this); + } + } + + /** Builder for folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class FolderLocationBucketViewBuilder { + + private String folder; + private String location; + private String bucket; + private String view; + + private FolderLocationBucketViewBuilder() {} + + public String getFolder() { + return folder; + } + + public String getLocation() { + return location; + } + + public String getBucket() { + return bucket; + } + + public String getView() { + return view; + } + + public FolderLocationBucketViewBuilder setFolder(String folder) { + this.folder = folder; + return this; + } + + public FolderLocationBucketViewBuilder setLocation(String location) { + this.location = location; + return this; + } + + public FolderLocationBucketViewBuilder setBucket(String bucket) { + this.bucket = bucket; + return this; + } + + public FolderLocationBucketViewBuilder setView(String view) { + this.view = view; + return this; + } + + public LogViewName build() { + return new LogViewName(this); + } + } + + /** + * Builder for + * billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}. + */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class BillingAccountLocationBucketViewBuilder { + + private String billingAccount; + private String location; + private String bucket; + private String view; + + private BillingAccountLocationBucketViewBuilder() {} + + public String getBillingAccount() { + return billingAccount; + } + + public String getLocation() { + return location; + } + + public String getBucket() { + return bucket; + } + + public String getView() { + return view; + } + + public BillingAccountLocationBucketViewBuilder setBillingAccount(String billingAccount) { + this.billingAccount = billingAccount; + return this; + } + + public BillingAccountLocationBucketViewBuilder setLocation(String location) { + this.location = location; + return this; + } + + public BillingAccountLocationBucketViewBuilder setBucket(String bucket) { + this.bucket = bucket; + return this; + } + + public BillingAccountLocationBucketViewBuilder setView(String view) { + this.view = view; + return this; + } + + public LogViewName build() { + return new LogViewName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + LogViewName that = (LogViewName) o; + return (Objects.equals(this.project, that.project)) + && (Objects.equals(this.location, that.location)) + && (Objects.equals(this.bucket, that.bucket)) + && (Objects.equals(this.view, that.view)) + && (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(view); + 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/LogViewOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogViewOrBuilder.java new file mode 100644 index 000000000..0a8cfbdc0 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogViewOrBuilder.java @@ -0,0 +1,194 @@ +/* + * 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 LogViewOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.logging.v2.LogView) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the view.
+   * For example
+   * "projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name of the view.
+   * For example
+   * "projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Describes this view.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Describes this view.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The creation timestamp of the view.
+   * 
+ * + * .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 view.
+   * 
+ * + * .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 view.
+   * 
+ * + * .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 view.
+   * 
+ * + * .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 view.
+   * 
+ * + * .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 view.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Filter that restricts which log entries in a bucket are visible in this
+   * view. Filters are restricted to be a logical AND of ==/!= of any of the
+   * following:
+   *   originating project/folder/organization/billing account.
+   *   resource type
+   *   log id
+   * Example: SOURCE("projects/myproject") AND resource.type = "gce_instance"
+   *             AND LOG_ID("stdout")
+   * 
+ * + * string filter = 7; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filter that restricts which log entries in a bucket are visible in this
+   * view. Filters are restricted to be a logical AND of ==/!= of any of the
+   * following:
+   *   originating project/folder/organization/billing account.
+   *   resource type
+   *   log id
+   * Example: SOURCE("projects/myproject") AND resource.type = "gce_instance"
+   *             AND LOG_ID("stdout")
+   * 
+ * + * string filter = 7; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} 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 1fcfb75a2..ce795e9e8 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 @@ -31,6 +31,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r 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_LogView_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_logging_v2_LogView_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_logging_v2_LogSink_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -47,6 +51,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r 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_CreateBucketRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_logging_v2_CreateBucketRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_logging_v2_UpdateBucketRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -55,6 +63,38 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r 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_DeleteBucketRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_logging_v2_DeleteBucketRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_logging_v2_UndeleteBucketRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_logging_v2_UndeleteBucketRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_logging_v2_ListViewsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_logging_v2_ListViewsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_logging_v2_ListViewsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_logging_v2_ListViewsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_logging_v2_CreateViewRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_logging_v2_CreateViewRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_logging_v2_UpdateViewRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_logging_v2_UpdateViewRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_logging_v2_GetViewRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_logging_v2_GetViewRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_logging_v2_DeleteViewRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_logging_v2_DeleteViewRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_logging_v2_ListSinksRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -135,256 +175,368 @@ 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\"\233\004\n\tLogBucket\022\014\n\004" + + "/api/annotations.proto\"\253\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" + + "\001(\005\022\016\n\006locked\030\t \001(\010\022?\n\017lifecycle_state\030\014" + + " \001(\0162!.google.logging.v2.LifecycleStateB" + + "\003\340A\003:\245\002\352A\241\002\n logging.googleapis.com/LogB" + + "ucket\0228projects/{project}/locations/{loc" + + "ation}/buckets/{bucket}\022Borganizations/{" + + "organization}/locations/{location}/bucke" + + "ts/{bucket}\0226folders/{folder}/locations/" + + "{location}/buckets/{bucket}\022GbillingAcco" + + "unts/{billing_account}/locations/{locati" + + "on}/buckets/{bucket}\"\202\004\n\007LogView\022\014\n\004name" + + "\030\001 \001(\t\022\023\n\013description\030\003 \001(\t\0224\n\013create_ti" + + "me\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340A" + + "\003\0224\n\013update_time\030\005 \001(\0132\032.google.protobuf" + + ".TimestampB\003\340A\003\022\016\n\006filter\030\007 \001(\t:\327\002\352A\323\002\n\036" + + "logging.googleapis.com/LogView\022Eprojects" + + "/{project}/locations/{location}/buckets/" + + "{bucket}/views/{view}\022Oorganizations/{or" + + "ganization}/locations/{location}/buckets" + + "/{bucket}/views/{view}\022Cfolders/{folder}" + + "/locations/{location}/buckets/{bucket}/v" + + "iews/{view}\022TbillingAccounts/{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\331\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\352\002\032Google::Cloud::Logging::" - + "V2\352A`\n+logging.googleapis.com/Organizati" - + "onLocation\0221organizations/{organization}" - + "/locations/{location}\352AN\n%logging.google" - + "apis.com/FolderLocation\022%folders/{folder" - + "}/locations/{location}\352Ag\n-logging.googl" - + "eapis.com/BillingAccountLocation\0226billin" - + "gAccounts/{billing_account}/locations/{l" - + "ocation}b\006proto3" + + "ket}/views/{view}\"\205\006\n\007LogSink\022\021\n\004name\030\001 " + + "\001(\tB\003\340A\002\022\036\n\013destination\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\010disabled\030\023 \001(\010B\003\340A\001\0228\n\nexclus" + + "ions\030\020 \003(\0132\037.google.logging.v2.LogExclus" + + "ionB\003\340A\001\022K\n\025output_version_format\030\006 \001(\0162" + + "(.google.logging.v2.LogSink.VersionForma" + + "tB\002\030\001\022\034\n\017writer_identity\030\010 \001(\tB\003\340A\003\022\035\n\020i" + + "nclude_children\030\t \001(\010B\003\340A\001\022C\n\020bigquery_o" + + "ptions\030\014 \001(\0132\".google.logging.v2.BigQuer" + + "yOptionsB\003\340A\001H\000\0224\n\013create_time\030\r \001(\0132\032.g" + + "oogle.protobuf.TimestampB\003\340A\003\0224\n\013update_" + + "time\030\016 \001(\0132\032.google.protobuf.TimestampB\003" + + "\340A\003\"?\n\rVersionFormat\022\036\n\032VERSION_FORMAT_U" + + "NSPECIFIED\020\000\022\006\n\002V2\020\001\022\006\n\002V1\020\002:\277\001\352A\273\001\n\036log" + + "ging.googleapis.com/LogSink\022\037projects/{p" + + "roject}/sinks/{sink}\022)organizations/{org" + + "anization}/sinks/{sink}\022\035folders/{folder" + + "}/sinks/{sink}\022.billingAccounts/{billing" + + "_account}/sinks/{sink}B\t\n\007options\"g\n\017Big" + + "QueryOptions\022#\n\026use_partitioned_tables\030\001" + + " \001(\010B\003\340A\001\022/\n\"uses_timestamp_column_parti" + + "tioning\030\003 \001(\010B\003\340A\003\"\177\n\022ListBucketsRequest" + + "\0228\n\006parent\030\001 \001(\tB(\340A\002\372A\"\022 logging.google" + + "apis.com/LogBucket\022\027\n\npage_token\030\002 \001(\tB\003" + + "\340A\001\022\026\n\tpage_size\030\003 \001(\005B\003\340A\001\"]\n\023ListBucke" + + "tsResponse\022-\n\007buckets\030\001 \003(\0132\034.google.log" + + "ging.v2.LogBucket\022\027\n\017next_page_token\030\002 \001" + + "(\t\"\232\001\n\023CreateBucketRequest\0228\n\006parent\030\001 \001" + + "(\tB(\340A\002\372A\"\022 logging.googleapis.com/LogBu" + + "cket\022\026\n\tbucket_id\030\002 \001(\tB\003\340A\002\0221\n\006bucket\030\003" + + " \001(\0132\034.google.logging.v2.LogBucketB\003\340A\002\"" + + "\266\001\n\023UpdateBucketRequest\0226\n\004name\030\001 \001(\tB(\340" + + "A\002\372A\"\n logging.googleapis.com/LogBucket\022" + + "1\n\006bucket\030\002 \001(\0132\034.google.logging.v2.LogB" + + "ucketB\003\340A\002\0224\n\013update_mask\030\004 \001(\0132\032.google" + + ".protobuf.FieldMaskB\003\340A\002\"J\n\020GetBucketReq" + + "uest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n logging.goog" + + "leapis.com/LogBucket\"M\n\023DeleteBucketRequ" + + "est\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n logging.googl" + + "eapis.com/LogBucket\"O\n\025UndeleteBucketReq" + + "uest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n logging.goog" + + "leapis.com/LogBucket\"X\n\020ListViewsRequest" + + "\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\027\n\npage_token\030\002 \001(" + + "\tB\003\340A\001\022\026\n\tpage_size\030\003 \001(\005B\003\340A\001\"W\n\021ListVi" + + "ewsResponse\022)\n\005views\030\001 \003(\0132\032.google.logg" + + "ing.v2.LogView\022\027\n\017next_page_token\030\002 \001(\t\"" + + "m\n\021CreateViewRequest\022\023\n\006parent\030\001 \001(\tB\003\340A" + + "\002\022\024\n\007view_id\030\002 \001(\tB\003\340A\002\022-\n\004view\030\003 \001(\0132\032." + + "google.logging.v2.LogViewB\003\340A\002\"\213\001\n\021Updat" + + "eViewRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002\022-\n\004view\030" + + "\002 \001(\0132\032.google.logging.v2.LogViewB\003\340A\002\0224" + + "\n\013update_mask\030\004 \001(\0132\032.google.protobuf.Fi" + + "eldMaskB\003\340A\001\"F\n\016GetViewRequest\0224\n\004name\030\001" + + " \001(\tB&\340A\002\372A \n\036logging.googleapis.com/Log" + + "View\"I\n\021DeleteViewRequest\0224\n\004name\030\001 \001(\tB" + + "&\340A\002\372A \n\036logging.googleapis.com/LogView\"" + + "{\n\020ListSinksRequest\0226\n\006parent\030\001 \001(\tB&\340A\002" + + "\372A \022\036logging.googleapis.com/LogSink\022\027\n\np" + + "age_token\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(\013" + + "2\032.google.logging.v2.LogSink\022\027\n\017next_pag" + + "e_token\030\002 \001(\t\"K\n\016GetSinkRequest\0229\n\tsink_" + + "name\030\001 \001(\tB&\340A\002\372A \n\036logging.googleapis.c" + + "om/LogSink\"\237\001\n\021CreateSinkRequest\0226\n\006pare" + + "nt\030\001 \001(\tB&\340A\002\372A \022\036logging.googleapis.com" + + "/LogSink\022-\n\004sink\030\002 \001(\0132\032.google.logging." + + "v2.LogSinkB\003\340A\002\022#\n\026unique_writer_identit" + + "y\030\003 \001(\010B\003\340A\001\"\330\001\n\021UpdateSinkRequest\0229\n\tsi" + + "nk_name\030\001 \001(\tB&\340A\002\372A \n\036logging.googleapi" + + "s.com/LogSink\022-\n\004sink\030\002 \001(\0132\032.google.log" + + "ging.v2.LogSinkB\003\340A\002\022#\n\026unique_writer_id" + + "entity\030\003 \001(\010B\003\340A\001\0224\n\013update_mask\030\004 \001(\0132\032" + + ".google.protobuf.FieldMaskB\003\340A\001\"N\n\021Delet" + + "eSinkRequest\0229\n\tsink_name\030\001 \001(\tB&\340A\002\372A \n" + + "\036logging.googleapis.com/LogSink\"\302\003\n\014LogE" + + "xclusion\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\030\n\013descripti" + + "on\030\002 \001(\tB\003\340A\001\022\023\n\006filter\030\003 \001(\tB\003\340A\002\022\025\n\010di" + + "sabled\030\004 \001(\010B\003\340A\001\0224\n\013create_time\030\005 \001(\0132\032" + + ".google.protobuf.TimestampB\003\340A\003\0224\n\013updat" + + "e_time\030\006 \001(\0132\032.google.protobuf.Timestamp" + + "B\003\340A\003:\354\001\352A\350\001\n#logging.googleapis.com/Log" + + "Exclusion\022)projects/{project}/exclusions" + + "/{exclusion}\0223organizations/{organizatio" + + "n}/exclusions/{exclusion}\022\'folders/{fold" + + "er}/exclusions/{exclusion}\0228billingAccou" + + "nts/{billing_account}/exclusions/{exclus" + + "ion}\"\205\001\n\025ListExclusionsRequest\022;\n\006parent" + + "\030\001 \001(\tB+\340A\002\372A%\022#logging.googleapis.com/L" + + "ogExclusion\022\027\n\npage_token\030\002 \001(\tB\003\340A\001\022\026\n\t" + + "page_size\030\003 \001(\005B\003\340A\001\"f\n\026ListExclusionsRe" + + "sponse\0223\n\nexclusions\030\001 \003(\0132\037.google.logg" + + "ing.v2.LogExclusion\022\027\n\017next_page_token\030\002" + + " \001(\t\"P\n\023GetExclusionRequest\0229\n\004name\030\001 \001(" + + "\tB+\340A\002\372A%\n#logging.googleapis.com/LogExc" + + "lusion\"\216\001\n\026CreateExclusionRequest\022;\n\006par" + + "ent\030\001 \001(\tB+\340A\002\372A%\022#logging.googleapis.co" + + "m/LogExclusion\0227\n\texclusion\030\002 \001(\0132\037.goog" + + "le.logging.v2.LogExclusionB\003\340A\002\"\302\001\n\026Upda" + + "teExclusionRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%" + + "\n#logging.googleapis.com/LogExclusion\0227\n" + + "\texclusion\030\002 \001(\0132\037.google.logging.v2.Log" + + "ExclusionB\003\340A\002\0224\n\013update_mask\030\003 \001(\0132\032.go" + + "ogle.protobuf.FieldMaskB\003\340A\002\"S\n\026DeleteEx" + + "clusionRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#lo" + + "gging.googleapis.com/LogExclusion\"S\n\026Get" + + "CmekSettingsRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A" + + "%\n#logging.googleapis.com/CmekSettings\"\241" + + "\001\n\031UpdateCmekSettingsRequest\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_m" + + "ask\030\003 \001(\0132\032.google.protobuf.FieldMaskB\003\340" + + "A\001\"\237\002\n\014CmekSettings\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\024" + + "\n\014kms_key_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/CmekSettings\022\037projects/{project}/cm" + + "ekSettings\022)organizations/{organization}" + + "/cmekSettings\022\035folders/{folder}/cmekSett" + + "ings\022.billingAccounts/{billing_account}/" + + "cmekSettings*S\n\016LifecycleState\022\037\n\033LIFECY" + + "CLE_STATE_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\024\n\020D" + + "ELETE_REQUESTED\020\0022\334>\n\017ConfigServiceV2\022\334\002" + + "\n\013ListBuckets\022%.google.logging.v2.ListBu" + + "cketsRequest\032&.google.logging.v2.ListBuc" + + "ketsResponse\"\375\001\202\323\344\223\002\355\001\022$/v2/{parent=*/*/" + + "locations/*}/bucketsZ-\022+/v2/{parent=proj" + + "ects/*/locations/*}/bucketsZ2\0220/v2/{pare" + + "nt=organizations/*/locations/*}/bucketsZ" + + ",\022*/v2/{parent=folders/*/locations/*}/bu" + + "cketsZ4\0222/v2/{parent=billingAccounts/*/l" + + "ocations/*}/buckets\332A\006parent\022\271\002\n\tGetBuck" + + "et\022#.google.logging.v2.GetBucketRequest\032" + + "\034.google.logging.v2.LogBucket\"\350\001\202\323\344\223\002\341\001\022" + + "$/v2/{name=*/*/locations/*/buckets/*}Z-\022" + + "+/v2/{name=projects/*/locations/*/bucket" + + "s/*}Z2\0220/v2/{name=organizations/*/locati" + + "ons/*/buckets/*}Z,\022*/v2/{name=folders/*/" + + "locations/*/buckets/*}Z(\022&/v2/{name=bill" + + "ingAccounts/*/buckets/*}\022\363\002\n\014CreateBucke" + + "t\022&.google.logging.v2.CreateBucketReques" + + "t\032\034.google.logging.v2.LogBucket\"\234\002\202\323\344\223\002\225" + + "\002\"$/v2/{parent=*/*/locations/*}/buckets:" + + "\006bucketZ5\"+/v2/{parent=projects/*/locati" + + "ons/*}/buckets:\006bucketZ:\"0/v2/{parent=or" + + "ganizations/*/locations/*}/buckets:\006buck" + + "etZ4\"*/v2/{parent=folders/*/locations/*}" + + "/buckets:\006bucketZ<\"2/v2/{parent=billingA" + + "ccounts/*/locations/*}/buckets:\006bucket\022\363" + + "\002\n\014UpdateBucket\022&.google.logging.v2.Upda" + + "teBucketRequest\032\034.google.logging.v2.LogB" + + "ucket\"\234\002\202\323\344\223\002\225\0022$/v2/{name=*/*/locations" + + "/*/buckets/*}:\006bucketZ52+/v2/{name=proje" + + "cts/*/locations/*/buckets/*}:\006bucketZ:20" + + "/v2/{name=organizations/*/locations/*/bu" + + "ckets/*}:\006bucketZ42*/v2/{name=folders/*/" + + "locations/*/buckets/*}:\006bucketZ<22/v2/{n" + + "ame=billingAccounts/*/locations/*/bucket" + + "s/*}:\006bucket\022\305\002\n\014DeleteBucket\022&.google.l" + + "ogging.v2.DeleteBucketRequest\032\026.google.p" + + "rotobuf.Empty\"\364\001\202\323\344\223\002\355\001*$/v2/{name=*/*/l" + + "ocations/*/buckets/*}Z-*+/v2/{name=proje" + + "cts/*/locations/*/buckets/*}Z2*0/v2/{nam" + + "e=organizations/*/locations/*/buckets/*}" + + "Z,**/v2/{name=folders/*/locations/*/buck" + + "ets/*}Z4*2/v2/{name=billingAccounts/*/lo" + + "cations/*/buckets/*}\022\205\003\n\016UndeleteBucket\022" + + "(.google.logging.v2.UndeleteBucketReques" + + "t\032\026.google.protobuf.Empty\"\260\002\202\323\344\223\002\251\002\"-/v2" + + "/{name=*/*/locations/*/buckets/*}:undele" + + "te:\001*Z9\"4/v2/{name=projects/*/locations/" + + "*/buckets/*}:undelete:\001*Z>\"9/v2/{name=or" + + "ganizations/*/locations/*/buckets/*}:und" + + "elete:\001*Z8\"3/v2/{name=folders/*/location" + + "s/*/buckets/*}:undelete:\001*Z@\";/v2/{name=" + + "billingAccounts/*/locations/*/buckets/*}" + + ":undelete:\001*\022\376\002\n\tListViews\022#.google.logg" + + "ing.v2.ListViewsRequest\032$.google.logging" + + ".v2.ListViewsResponse\"\245\002\202\323\344\223\002\225\002\022,/v2/{pa" + + "rent=*/*/locations/*/buckets/*}/viewsZ5\022" + + "3/v2/{parent=projects/*/locations/*/buck" + + "ets/*}/viewsZ:\0228/v2/{parent=organization" + + "s/*/locations/*/buckets/*}/viewsZ4\0222/v2/" + + "{parent=folders/*/locations/*/buckets/*}" + + "/viewsZ<\022:/v2/{parent=billingAccounts/*/" + + "locations/*/buckets/*}/views\332A\006parent\022\333\002" + + "\n\007GetView\022!.google.logging.v2.GetViewReq" + + "uest\032\032.google.logging.v2.LogView\"\220\002\202\323\344\223\002" + + "\211\002\022,/v2/{name=*/*/locations/*/buckets/*/" + + "views/*}Z5\0223/v2/{name=projects/*/locatio" + + "ns/*/buckets/*/views/*}Z:\0228/v2/{name=org" + + "anizations/*/locations/*/buckets/*/views" + + "/*}Z4\0222/v2/{name=folders/*/locations/*/b" + + "uckets/*/views/*}Z0\022./v2/{name=billingAc" + + "counts/*/buckets/*/views/*}\022\213\003\n\nCreateVi" + + "ew\022$.google.logging.v2.CreateViewRequest" + + "\032\032.google.logging.v2.LogView\"\272\002\202\323\344\223\002\263\002\"," + + "/v2/{parent=*/*/locations/*/buckets/*}/v" + + "iews:\004viewZ;\"3/v2/{parent=projects/*/loc" + + "ations/*/buckets/*}/views:\004viewZ@\"8/v2/{" + + "parent=organizations/*/locations/*/bucke" + + "ts/*}/views:\004viewZ:\"2/v2/{parent=folders" + + "/*/locations/*/buckets/*}/views:\004viewZB\"" + + ":/v2/{parent=billingAccounts/*/locations" + + "/*/buckets/*}/views:\004view\022\213\003\n\nUpdateView" + + "\022$.google.logging.v2.UpdateViewRequest\032\032" + + ".google.logging.v2.LogView\"\272\002\202\323\344\223\002\263\0022,/v" + + "2/{name=*/*/locations/*/buckets/*/views/" + + "*}:\004viewZ;23/v2/{name=projects/*/locatio" + + "ns/*/buckets/*/views/*}:\004viewZ@28/v2/{na" + + "me=organizations/*/locations/*/buckets/*" + + "/views/*}:\004viewZ:22/v2/{name=folders/*/l" + + "ocations/*/buckets/*/views/*}:\004viewZB2:/" + + "v2/{name=billingAccounts/*/locations/*/b" + + "uckets/*/views/*}:\004view\022\351\002\n\nDeleteView\022$" + + ".google.logging.v2.DeleteViewRequest\032\026.g" + + "oogle.protobuf.Empty\"\234\002\202\323\344\223\002\225\002*,/v2/{nam" + + "e=*/*/locations/*/buckets/*/views/*}Z5*3" + + "/v2/{name=projects/*/locations/*/buckets" + + "/*/views/*}Z:*8/v2/{name=organizations/*" + + "/locations/*/buckets/*/views/*}Z4*2/v2/{" + + "name=folders/*/locations/*/buckets/*/vie" + + "ws/*}Z<*:/v2/{name=billingAccounts/*/loc" + + "ations/*/buckets/*/views/*}\022\220\002\n\tListSink" + + "s\022#.google.logging.v2.ListSinksRequest\032$" + + ".google.logging.v2.ListSinksResponse\"\267\001\202" + + "\323\344\223\002\247\001\022\026/v2/{parent=*/*}/sinksZ\037\022\035/v2/{p" + + "arent=projects/*}/sinksZ$\022\"/v2/{parent=o" + + "rganizations/*}/sinksZ\036\022\034/v2/{parent=fol" + + "ders/*}/sinksZ&\022$/v2/{parent=billingAcco" + + "unts/*}/sinks\332A\006parent\022\236\002\n\007GetSink\022!.goo" + + "gle.logging.v2.GetSinkRequest\032\032.google.l" + + "ogging.v2.LogSink\"\323\001\202\323\344\223\002\300\001\022\033/v2/{sink_n" + + "ame=*/*/sinks/*}Z$\022\"/v2/{sink_name=proje" + + "cts/*/sinks/*}Z)\022\'/v2/{sink_name=organiz" + + "ations/*/sinks/*}Z#\022!/v2/{sink_name=fold" + + "ers/*/sinks/*}Z+\022)/v2/{sink_name=billing" + + "Accounts/*/sinks/*}\332A\tsink_name\022\253\002\n\nCrea" + + "teSink\022$.google.logging.v2.CreateSinkReq" + + "uest\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:\004sink\332" + + "A\013parent,sink\022\237\004\n\nUpdateSink\022$.google.lo" + + "gging.v2.UpdateSinkRequest\032\032.google.logg" + + "ing.v2.LogSink\"\316\003\202\323\344\223\002\231\003\032\033/v2/{sink_name" + + "=*/*/sinks/*}:\004sinkZ*\032\"/v2/{sink_name=pr" + + "ojects/*/sinks/*}:\004sinkZ/\032\'/v2/{sink_nam" + + "e=organizations/*/sinks/*}:\004sinkZ)\032!/v2/" + + "{sink_name=folders/*/sinks/*}:\004sinkZ1\032)/" + + "v2/{sink_name=billingAccounts/*/sinks/*}" + + ":\004sinkZ*2\"/v2/{sink_name=projects/*/sink" + + "s/*}:\004sinkZ/2\'/v2/{sink_name=organizatio" + + "ns/*/sinks/*}:\004sinkZ)2!/v2/{sink_name=fo" + + "lders/*/sinks/*}:\004sinkZ12)/v2/{sink_name" + + "=billingAccounts/*/sinks/*}:\004sink\332A\032sink" + + "_name,sink,update_mask\332A\016sink_name,sink\022" + + "\240\002\n\nDeleteSink\022$.google.logging.v2.Delet" + + "eSinkRequest\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(.google.l" + + "ogging.v2.ListExclusionsRequest\032).google" + + ".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!/v" + + "2/{parent=folders/*}/exclusionsZ+\022)/v2/{" + + "parent=billingAccounts/*}/exclusions\332A\006p" + + "arent\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/*/e" + + "xclusions/*}Z)\022\'/v2/{name=organizations/" + + "*/exclusions/*}Z#\022!/v2/{name=folders/*/e" + + "xclusions/*}Z+\022)/v2/{name=billingAccount" + + "s/*/exclusions/*}\332A\004name\022\361\002\n\017CreateExclu" + + "sion\022).google.logging.v2.CreateExclusion" + + "Request\032\037.google.logging.v2.LogExclusion" + + "\"\221\002\202\323\344\223\002\367\001\"\033/v2/{parent=*/*}/exclusions:" + + "\texclusionZ/\"\"/v2/{parent=projects/*}/ex" + + "clusions:\texclusionZ4\"\'/v2/{parent=organ" + + "izations/*}/exclusions:\texclusionZ.\"!/v2" + + "/{parent=folders/*}/exclusions:\texclusio" + + "nZ6\")/v2/{parent=billingAccounts/*}/excl" + + "usions:\texclusion\332A\020parent,exclusion\022\373\002\n" + + "\017UpdateExclusion\022).google.logging.v2.Upd" + + "ateExclusionRequest\032\037.google.logging.v2." + + "LogExclusion\"\233\002\202\323\344\223\002\367\0012\033/v2/{name=*/*/ex" + + "clusions/*}:\texclusionZ/2\"/v2/{name=proj" + + "ects/*/exclusions/*}:\texclusionZ42\'/v2/{" + + "name=organizations/*/exclusions/*}:\texcl" + + "usionZ.2!/v2/{name=folders/*/exclusions/" + + "*}:\texclusionZ62)/v2/{name=billingAccoun" + + "ts/*/exclusions/*}:\texclusion\332A\032name,exc" + + "lusion,update_mask\022\245\002\n\017DeleteExclusion\022)" + + ".google.logging.v2.DeleteExclusionReques" + + "t\032\026.google.protobuf.Empty\"\316\001\202\323\344\223\002\300\001*\033/v2" + + "/{name=*/*/exclusions/*}Z$*\"/v2/{name=pr" + + "ojects/*/exclusions/*}Z)*\'/v2/{name=orga" + + "nizations/*/exclusions/*}Z#*!/v2/{name=f" + + "olders/*/exclusions/*}Z+*)/v2/{name=bill" + + "ingAccounts/*/exclusions/*}\332A\004name\022\255\001\n\017G" + + "etCmekSettings\022).google.logging.v2.GetCm" + + "ekSettingsRequest\032\037.google.logging.v2.Cm" + + "ekSettings\"N\202\323\344\223\002H\022\033/v2/{name=*/*}/cmekS" + + "ettingsZ)\022\'/v2/{name=organizations/*}/cm" + + "ekSettings\022\321\001\n\022UpdateCmekSettings\022,.goog" + + "le.logging.v2.UpdateCmekSettingsRequest\032" + + "\037.google.logging.v2.CmekSettings\"l\202\323\344\223\002f" + + "2\033/v2/{name=*/*}/cmekSettings:\rcmek_sett" + + "ingsZ82\'/v2/{name=organizations/*}/cmekS" + + "ettings:\rcmek_settings\032\337\001\312A\026logging.goog" + + "leapis.com\322A\302\001https://www.googleapis.com" + + "/auth/cloud-platform,https://www.googlea" + + "pis.com/auth/cloud-platform.read-only,ht" + + "tps://www.googleapis.com/auth/logging.ad" + + "min,https://www.googleapis.com/auth/logg" + + "ing.readB\331\003\n\025com.google.logging.v2B\022Logg" + + "ingConfigProtoP\001Z8google.golang.org/genp" + + "roto/googleapis/logging/v2;logging\370\001\001\252\002\027" + + "Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\L" + + "ogging\\V2\352\002\032Google::Cloud::Logging::V2\352A" + + "`\n+logging.googleapis.com/OrganizationLo" + + "cation\0221organizations/{organization}/loc" + + "ations/{location}\352AN\n%logging.googleapis" + + ".com/FolderLocation\022%folders/{folder}/lo" + + "cations/{location}\352Ag\n-logging.googleapi" + + "s.com/BillingAccountLocation\0226billingAcc" + + "ounts/{billing_account}/locations/{locat" + + "ion}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -405,9 +557,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_LogBucket_descriptor, new java.lang.String[] { - "Name", "Description", "CreateTime", "UpdateTime", "RetentionDays", "LifecycleState", + "Name", + "Description", + "CreateTime", + "UpdateTime", + "RetentionDays", + "Locked", + "LifecycleState", + }); + internal_static_google_logging_v2_LogView_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_google_logging_v2_LogView_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_logging_v2_LogView_descriptor, + new java.lang.String[] { + "Name", "Description", "CreateTime", "UpdateTime", "Filter", }); - internal_static_google_logging_v2_LogSink_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_google_logging_v2_LogSink_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_google_logging_v2_LogSink_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_LogSink_descriptor, @@ -417,6 +582,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Filter", "Description", "Disabled", + "Exclusions", "OutputVersionFormat", "WriterIdentity", "IncludeChildren", @@ -426,7 +592,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Options", }); internal_static_google_logging_v2_BigQueryOptions_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(3); internal_static_google_logging_v2_BigQueryOptions_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_BigQueryOptions_descriptor, @@ -434,7 +600,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UsePartitionedTables", "UsesTimestampColumnPartitioning", }); internal_static_google_logging_v2_ListBucketsRequest_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(4); internal_static_google_logging_v2_ListBucketsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_ListBucketsRequest_descriptor, @@ -442,15 +608,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageToken", "PageSize", }); internal_static_google_logging_v2_ListBucketsResponse_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(5); 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_CreateBucketRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_logging_v2_CreateBucketRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_logging_v2_CreateBucketRequest_descriptor, + new java.lang.String[] { + "Parent", "BucketId", "Bucket", + }); internal_static_google_logging_v2_UpdateBucketRequest_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(7); internal_static_google_logging_v2_UpdateBucketRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_UpdateBucketRequest_descriptor, @@ -458,15 +632,79 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Bucket", "UpdateMask", }); internal_static_google_logging_v2_GetBucketRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(8); 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_DeleteBucketRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_logging_v2_DeleteBucketRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_logging_v2_DeleteBucketRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_logging_v2_UndeleteBucketRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_logging_v2_UndeleteBucketRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_logging_v2_UndeleteBucketRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_logging_v2_ListViewsRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_logging_v2_ListViewsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_logging_v2_ListViewsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageToken", "PageSize", + }); + internal_static_google_logging_v2_ListViewsResponse_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_logging_v2_ListViewsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_logging_v2_ListViewsResponse_descriptor, + new java.lang.String[] { + "Views", "NextPageToken", + }); + internal_static_google_logging_v2_CreateViewRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_logging_v2_CreateViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_logging_v2_CreateViewRequest_descriptor, + new java.lang.String[] { + "Parent", "ViewId", "View", + }); + internal_static_google_logging_v2_UpdateViewRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_logging_v2_UpdateViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_logging_v2_UpdateViewRequest_descriptor, + new java.lang.String[] { + "Name", "View", "UpdateMask", + }); + internal_static_google_logging_v2_GetViewRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_logging_v2_GetViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_logging_v2_GetViewRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_logging_v2_DeleteViewRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_logging_v2_DeleteViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_logging_v2_DeleteViewRequest_descriptor, + new java.lang.String[] { + "Name", + }); internal_static_google_logging_v2_ListSinksRequest_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(17); internal_static_google_logging_v2_ListSinksRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_ListSinksRequest_descriptor, @@ -474,7 +712,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageToken", "PageSize", }); internal_static_google_logging_v2_ListSinksResponse_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(18); internal_static_google_logging_v2_ListSinksResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_ListSinksResponse_descriptor, @@ -482,7 +720,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Sinks", "NextPageToken", }); internal_static_google_logging_v2_GetSinkRequest_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(19); internal_static_google_logging_v2_GetSinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_GetSinkRequest_descriptor, @@ -490,7 +728,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SinkName", }); internal_static_google_logging_v2_CreateSinkRequest_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(20); internal_static_google_logging_v2_CreateSinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_CreateSinkRequest_descriptor, @@ -498,7 +736,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Sink", "UniqueWriterIdentity", }); internal_static_google_logging_v2_UpdateSinkRequest_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(21); internal_static_google_logging_v2_UpdateSinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_UpdateSinkRequest_descriptor, @@ -506,7 +744,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SinkName", "Sink", "UniqueWriterIdentity", "UpdateMask", }); internal_static_google_logging_v2_DeleteSinkRequest_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(22); internal_static_google_logging_v2_DeleteSinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_DeleteSinkRequest_descriptor, @@ -514,7 +752,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SinkName", }); internal_static_google_logging_v2_LogExclusion_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(23); internal_static_google_logging_v2_LogExclusion_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_LogExclusion_descriptor, @@ -522,7 +760,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(14); + getDescriptor().getMessageTypes().get(24); internal_static_google_logging_v2_ListExclusionsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_ListExclusionsRequest_descriptor, @@ -530,7 +768,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageToken", "PageSize", }); internal_static_google_logging_v2_ListExclusionsResponse_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(25); internal_static_google_logging_v2_ListExclusionsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_ListExclusionsResponse_descriptor, @@ -538,7 +776,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Exclusions", "NextPageToken", }); internal_static_google_logging_v2_GetExclusionRequest_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(26); internal_static_google_logging_v2_GetExclusionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_GetExclusionRequest_descriptor, @@ -546,7 +784,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_logging_v2_CreateExclusionRequest_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(27); internal_static_google_logging_v2_CreateExclusionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_CreateExclusionRequest_descriptor, @@ -554,7 +792,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Exclusion", }); internal_static_google_logging_v2_UpdateExclusionRequest_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(28); internal_static_google_logging_v2_UpdateExclusionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_UpdateExclusionRequest_descriptor, @@ -562,7 +800,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Exclusion", "UpdateMask", }); internal_static_google_logging_v2_DeleteExclusionRequest_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(29); internal_static_google_logging_v2_DeleteExclusionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_DeleteExclusionRequest_descriptor, @@ -570,7 +808,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_logging_v2_GetCmekSettingsRequest_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(30); internal_static_google_logging_v2_GetCmekSettingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_GetCmekSettingsRequest_descriptor, @@ -578,7 +816,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_logging_v2_UpdateCmekSettingsRequest_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(31); internal_static_google_logging_v2_UpdateCmekSettingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_UpdateCmekSettingsRequest_descriptor, @@ -586,7 +824,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "CmekSettings", "UpdateMask", }); internal_static_google_logging_v2_CmekSettings_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(32); internal_static_google_logging_v2_CmekSettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_CmekSettings_descriptor, diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UndeleteBucketRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UndeleteBucketRequest.java new file mode 100644 index 000000000..f01854628 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UndeleteBucketRequest.java @@ -0,0 +1,690 @@ +/* + * 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 `UndeleteBucket`.
+ * 
+ * + * Protobuf type {@code google.logging.v2.UndeleteBucketRequest} + */ +public final class UndeleteBucketRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.logging.v2.UndeleteBucketRequest) + UndeleteBucketRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UndeleteBucketRequest.newBuilder() to construct. + private UndeleteBucketRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UndeleteBucketRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UndeleteBucketRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UndeleteBucketRequest( + 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_UndeleteBucketRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_UndeleteBucketRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.UndeleteBucketRequest.class, + com.google.logging.v2.UndeleteBucketRequest.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 undelete.
+   *     "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 full resource name of the bucket to undelete.
+   *     "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.UndeleteBucketRequest)) { + return super.equals(obj); + } + com.google.logging.v2.UndeleteBucketRequest other = + (com.google.logging.v2.UndeleteBucketRequest) 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.UndeleteBucketRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.UndeleteBucketRequest 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.UndeleteBucketRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.UndeleteBucketRequest 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.UndeleteBucketRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.UndeleteBucketRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.logging.v2.UndeleteBucketRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.UndeleteBucketRequest 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.UndeleteBucketRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.logging.v2.UndeleteBucketRequest 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.UndeleteBucketRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.UndeleteBucketRequest 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.UndeleteBucketRequest 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 `UndeleteBucket`.
+   * 
+ * + * Protobuf type {@code google.logging.v2.UndeleteBucketRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.logging.v2.UndeleteBucketRequest) + com.google.logging.v2.UndeleteBucketRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_UndeleteBucketRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_UndeleteBucketRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.UndeleteBucketRequest.class, + com.google.logging.v2.UndeleteBucketRequest.Builder.class); + } + + // Construct using com.google.logging.v2.UndeleteBucketRequest.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_UndeleteBucketRequest_descriptor; + } + + @java.lang.Override + public com.google.logging.v2.UndeleteBucketRequest getDefaultInstanceForType() { + return com.google.logging.v2.UndeleteBucketRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.logging.v2.UndeleteBucketRequest build() { + com.google.logging.v2.UndeleteBucketRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.logging.v2.UndeleteBucketRequest buildPartial() { + com.google.logging.v2.UndeleteBucketRequest result = + new com.google.logging.v2.UndeleteBucketRequest(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.UndeleteBucketRequest) { + return mergeFrom((com.google.logging.v2.UndeleteBucketRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.logging.v2.UndeleteBucketRequest other) { + if (other == com.google.logging.v2.UndeleteBucketRequest.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.UndeleteBucketRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.logging.v2.UndeleteBucketRequest) 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 undelete.
+     *     "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 full resource name of the bucket to undelete.
+     *     "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 full resource name of the bucket to undelete.
+     *     "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 full resource name of the bucket to undelete.
+     *     "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 full resource name of the bucket to undelete.
+     *     "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.UndeleteBucketRequest) + } + + // @@protoc_insertion_point(class_scope:google.logging.v2.UndeleteBucketRequest) + private static final com.google.logging.v2.UndeleteBucketRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.logging.v2.UndeleteBucketRequest(); + } + + public static com.google.logging.v2.UndeleteBucketRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UndeleteBucketRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UndeleteBucketRequest(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.UndeleteBucketRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UndeleteBucketRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UndeleteBucketRequestOrBuilder.java new file mode 100644 index 000000000..8002d3365 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UndeleteBucketRequestOrBuilder.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 UndeleteBucketRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.logging.v2.UndeleteBucketRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The full resource name of the bucket to undelete.
+   *     "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 full resource name of the bucket to undelete.
+   *     "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/UpdateBucketRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateBucketRequest.java index 0b76053fa..835ff5d77 100644 --- 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 @@ -22,7 +22,7 @@ * * *
- * The parameters to `UpdateBucket` (Beta).
+ * The parameters to `UpdateBucket`.
  * 
* * Protobuf type {@code google.logging.v2.UpdateBucketRequest} @@ -511,7 +511,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The parameters to `UpdateBucket` (Beta).
+   * The parameters to `UpdateBucket`.
    * 
* * Protobuf type {@code google.logging.v2.UpdateBucketRequest} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateViewRequest.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateViewRequest.java new file mode 100644 index 000000000..29ce94969 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateViewRequest.java @@ -0,0 +1,1264 @@ +/* + * 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 `UpdateView`.
+ * 
+ * + * Protobuf type {@code google.logging.v2.UpdateViewRequest} + */ +public final class UpdateViewRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.logging.v2.UpdateViewRequest) + UpdateViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateViewRequest.newBuilder() to construct. + private UpdateViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateViewRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateViewRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateViewRequest( + 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.LogView.Builder subBuilder = null; + if (view_ != null) { + subBuilder = view_.toBuilder(); + } + view_ = input.readMessage(com.google.logging.v2.LogView.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(view_); + view_ = 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_UpdateViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_UpdateViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.UpdateViewRequest.class, + com.google.logging.v2.UpdateViewRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The full resource name of the view to update
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+   * Example:
+   *   `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`.
+   * 
+ * + * 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) { + 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 view to update
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+   * Example:
+   *   `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`.
+   * 
+ * + * 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) { + 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 VIEW_FIELD_NUMBER = 2; + private com.google.logging.v2.LogView view_; + /** + * + * + *
+   * Required. The updated view.
+   * 
+ * + * .google.logging.v2.LogView view = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the view field is set. + */ + @java.lang.Override + public boolean hasView() { + return view_ != null; + } + /** + * + * + *
+   * Required. The updated view.
+   * 
+ * + * .google.logging.v2.LogView view = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The view. + */ + @java.lang.Override + public com.google.logging.v2.LogView getView() { + return view_ == null ? com.google.logging.v2.LogView.getDefaultInstance() : view_; + } + /** + * + * + *
+   * Required. The updated view.
+   * 
+ * + * .google.logging.v2.LogView view = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.logging.v2.LogViewOrBuilder getViewOrBuilder() { + return getView(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 4; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Optional. Field mask that specifies the fields in `view` that need
+   * an update. A 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=filter`.
+   * 
+ * + * .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; + } + /** + * + * + *
+   * Optional. Field mask that specifies the fields in `view` that need
+   * an update. A 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=filter`.
+   * 
+ * + * .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_; + } + /** + * + * + *
+   * Optional. Field mask that specifies the fields in `view` that need
+   * an update. A 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=filter`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @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 (view_ != null) { + output.writeMessage(2, getView()); + } + 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 (view_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getView()); + } + 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.UpdateViewRequest)) { + return super.equals(obj); + } + com.google.logging.v2.UpdateViewRequest other = (com.google.logging.v2.UpdateViewRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasView() != other.hasView()) return false; + if (hasView()) { + if (!getView().equals(other.getView())) 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 (hasView()) { + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + getView().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.UpdateViewRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.UpdateViewRequest 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.UpdateViewRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.UpdateViewRequest 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.UpdateViewRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.logging.v2.UpdateViewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.logging.v2.UpdateViewRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.UpdateViewRequest 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.UpdateViewRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.logging.v2.UpdateViewRequest 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.UpdateViewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.logging.v2.UpdateViewRequest 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.UpdateViewRequest 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 `UpdateView`.
+   * 
+ * + * Protobuf type {@code google.logging.v2.UpdateViewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.logging.v2.UpdateViewRequest) + com.google.logging.v2.UpdateViewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_UpdateViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.logging.v2.LoggingConfigProto + .internal_static_google_logging_v2_UpdateViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.logging.v2.UpdateViewRequest.class, + com.google.logging.v2.UpdateViewRequest.Builder.class); + } + + // Construct using com.google.logging.v2.UpdateViewRequest.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 (viewBuilder_ == null) { + view_ = null; + } else { + view_ = null; + viewBuilder_ = 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_UpdateViewRequest_descriptor; + } + + @java.lang.Override + public com.google.logging.v2.UpdateViewRequest getDefaultInstanceForType() { + return com.google.logging.v2.UpdateViewRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.logging.v2.UpdateViewRequest build() { + com.google.logging.v2.UpdateViewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.logging.v2.UpdateViewRequest buildPartial() { + com.google.logging.v2.UpdateViewRequest result = + new com.google.logging.v2.UpdateViewRequest(this); + result.name_ = name_; + if (viewBuilder_ == null) { + result.view_ = view_; + } else { + result.view_ = viewBuilder_.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.UpdateViewRequest) { + return mergeFrom((com.google.logging.v2.UpdateViewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.logging.v2.UpdateViewRequest other) { + if (other == com.google.logging.v2.UpdateViewRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasView()) { + mergeView(other.getView()); + } + 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.UpdateViewRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.logging.v2.UpdateViewRequest) 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 view to update
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+     * Example:
+     *   `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 view to update
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+     * Example:
+     *   `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 view to update
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+     * Example:
+     *   `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 view to update
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+     * Example:
+     *   `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The full resource name of the view to update
+     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+     * Example:
+     *   `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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.LogView view_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.logging.v2.LogView, + com.google.logging.v2.LogView.Builder, + com.google.logging.v2.LogViewOrBuilder> + viewBuilder_; + /** + * + * + *
+     * Required. The updated view.
+     * 
+ * + * .google.logging.v2.LogView view = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the view field is set. + */ + public boolean hasView() { + return viewBuilder_ != null || view_ != null; + } + /** + * + * + *
+     * Required. The updated view.
+     * 
+ * + * .google.logging.v2.LogView view = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The view. + */ + public com.google.logging.v2.LogView getView() { + if (viewBuilder_ == null) { + return view_ == null ? com.google.logging.v2.LogView.getDefaultInstance() : view_; + } else { + return viewBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The updated view.
+     * 
+ * + * .google.logging.v2.LogView view = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setView(com.google.logging.v2.LogView value) { + if (viewBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + view_ = value; + onChanged(); + } else { + viewBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The updated view.
+     * 
+ * + * .google.logging.v2.LogView view = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setView(com.google.logging.v2.LogView.Builder builderForValue) { + if (viewBuilder_ == null) { + view_ = builderForValue.build(); + onChanged(); + } else { + viewBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The updated view.
+     * 
+ * + * .google.logging.v2.LogView view = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeView(com.google.logging.v2.LogView value) { + if (viewBuilder_ == null) { + if (view_ != null) { + view_ = com.google.logging.v2.LogView.newBuilder(view_).mergeFrom(value).buildPartial(); + } else { + view_ = value; + } + onChanged(); + } else { + viewBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The updated view.
+     * 
+ * + * .google.logging.v2.LogView view = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearView() { + if (viewBuilder_ == null) { + view_ = null; + onChanged(); + } else { + view_ = null; + viewBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The updated view.
+     * 
+ * + * .google.logging.v2.LogView view = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.logging.v2.LogView.Builder getViewBuilder() { + + onChanged(); + return getViewFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The updated view.
+     * 
+ * + * .google.logging.v2.LogView view = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.logging.v2.LogViewOrBuilder getViewOrBuilder() { + if (viewBuilder_ != null) { + return viewBuilder_.getMessageOrBuilder(); + } else { + return view_ == null ? com.google.logging.v2.LogView.getDefaultInstance() : view_; + } + } + /** + * + * + *
+     * Required. The updated view.
+     * 
+ * + * .google.logging.v2.LogView view = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.logging.v2.LogView, + com.google.logging.v2.LogView.Builder, + com.google.logging.v2.LogViewOrBuilder> + getViewFieldBuilder() { + if (viewBuilder_ == null) { + viewBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.logging.v2.LogView, + com.google.logging.v2.LogView.Builder, + com.google.logging.v2.LogViewOrBuilder>( + getView(), getParentForChildren(), isClean()); + view_ = null; + } + return viewBuilder_; + } + + 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_; + /** + * + * + *
+     * Optional. Field mask that specifies the fields in `view` that need
+     * an update. A 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=filter`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Optional. Field mask that specifies the fields in `view` that need
+     * an update. A 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=filter`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Field mask that specifies the fields in `view` that need
+     * an update. A 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=filter`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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; + } + /** + * + * + *
+     * Optional. Field mask that specifies the fields in `view` that need
+     * an update. A 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=filter`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Field mask that specifies the fields in `view` that need
+     * an update. A 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=filter`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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; + } + /** + * + * + *
+     * Optional. Field mask that specifies the fields in `view` that need
+     * an update. A 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=filter`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Field mask that specifies the fields in `view` that need
+     * an update. A 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=filter`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Field mask that specifies the fields in `view` that need
+     * an update. A 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=filter`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Optional. Field mask that specifies the fields in `view` that need
+     * an update. A 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=filter`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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.UpdateViewRequest) + } + + // @@protoc_insertion_point(class_scope:google.logging.v2.UpdateViewRequest) + private static final com.google.logging.v2.UpdateViewRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.logging.v2.UpdateViewRequest(); + } + + public static com.google.logging.v2.UpdateViewRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateViewRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateViewRequest(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.UpdateViewRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateViewRequestOrBuilder.java b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateViewRequestOrBuilder.java new file mode 100644 index 000000000..062bd10e7 --- /dev/null +++ b/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateViewRequestOrBuilder.java @@ -0,0 +1,144 @@ +/* + * 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 UpdateViewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.logging.v2.UpdateViewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The full resource name of the view to update
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+   * Example:
+   *   `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The full resource name of the view to update
+   *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
+   * Example:
+   *   `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The updated view.
+   * 
+ * + * .google.logging.v2.LogView view = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the view field is set. + */ + boolean hasView(); + /** + * + * + *
+   * Required. The updated view.
+   * 
+ * + * .google.logging.v2.LogView view = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The view. + */ + com.google.logging.v2.LogView getView(); + /** + * + * + *
+   * Required. The updated view.
+   * 
+ * + * .google.logging.v2.LogView view = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.logging.v2.LogViewOrBuilder getViewOrBuilder(); + + /** + * + * + *
+   * Optional. Field mask that specifies the fields in `view` that need
+   * an update. A 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=filter`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Optional. Field mask that specifies the fields in `view` that need
+   * an update. A 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=filter`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Optional. Field mask that specifies the fields in `view` that need
+   * an update. A 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=filter`.
+   * 
+ * + * .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/proto/google/logging/v2/logging_config.proto b/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/logging_config.proto index 9486f4a9a..9b10932d6 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 @@ -55,7 +55,7 @@ service ConfigServiceV2 { "https://www.googleapis.com/auth/logging.admin," "https://www.googleapis.com/auth/logging.read"; - // Lists buckets (Beta). + // Lists buckets. rpc ListBuckets(ListBucketsRequest) returns (ListBucketsResponse) { option (google.api.http) = { get: "/v2/{parent=*/*/locations/*}/buckets" @@ -75,7 +75,7 @@ service ConfigServiceV2 { option (google.api.method_signature) = "parent"; } - // Gets a bucket (Beta). + // Gets a bucket. rpc GetBucket(GetBucketRequest) returns (LogBucket) { option (google.api.http) = { get: "/v2/{name=*/*/locations/*/buckets/*}" @@ -94,6 +94,31 @@ service ConfigServiceV2 { }; } + // Creates a bucket that can be used to store log entries. Once a bucket has + // been created, the region cannot be changed. + rpc CreateBucket(CreateBucketRequest) returns (LogBucket) { + option (google.api.http) = { + post: "/v2/{parent=*/*/locations/*}/buckets" + body: "bucket" + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/buckets" + body: "bucket" + } + additional_bindings { + post: "/v2/{parent=organizations/*/locations/*}/buckets" + body: "bucket" + } + additional_bindings { + post: "/v2/{parent=folders/*/locations/*}/buckets" + body: "bucket" + } + additional_bindings { + post: "/v2/{parent=billingAccounts/*/locations/*}/buckets" + body: "bucket" + } + }; + } + // Updates a bucket. This method replaces the following fields in the // existing bucket with values from the new bucket: `retention_period` // @@ -104,7 +129,6 @@ service ConfigServiceV2 { // 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/*}" @@ -128,6 +152,161 @@ service ConfigServiceV2 { }; } + // Deletes a bucket. + // Moves the bucket to the DELETE_REQUESTED state. After 7 days, the + // bucket will be purged and all logs in the bucket will be permanently + // deleted. + rpc DeleteBucket(DeleteBucketRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=*/*/locations/*/buckets/*}" + additional_bindings { + delete: "/v2/{name=projects/*/locations/*/buckets/*}" + } + additional_bindings { + delete: "/v2/{name=organizations/*/locations/*/buckets/*}" + } + additional_bindings { + delete: "/v2/{name=folders/*/locations/*/buckets/*}" + } + additional_bindings { + delete: "/v2/{name=billingAccounts/*/locations/*/buckets/*}" + } + }; + } + + // Undeletes a bucket. A bucket that has been deleted may be undeleted within + // the grace period of 7 days. + rpc UndeleteBucket(UndeleteBucketRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v2/{name=*/*/locations/*/buckets/*}:undelete" + body: "*" + additional_bindings { + post: "/v2/{name=projects/*/locations/*/buckets/*}:undelete" + body: "*" + } + additional_bindings { + post: "/v2/{name=organizations/*/locations/*/buckets/*}:undelete" + body: "*" + } + additional_bindings { + post: "/v2/{name=folders/*/locations/*/buckets/*}:undelete" + body: "*" + } + additional_bindings { + post: "/v2/{name=billingAccounts/*/locations/*/buckets/*}:undelete" + body: "*" + } + }; + } + + // Lists views on a bucket. + rpc ListViews(ListViewsRequest) returns (ListViewsResponse) { + option (google.api.http) = { + get: "/v2/{parent=*/*/locations/*/buckets/*}/views" + additional_bindings { + get: "/v2/{parent=projects/*/locations/*/buckets/*}/views" + } + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*/buckets/*}/views" + } + additional_bindings { + get: "/v2/{parent=folders/*/locations/*/buckets/*}/views" + } + additional_bindings { + get: "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a view. + rpc GetView(GetViewRequest) returns (LogView) { + option (google.api.http) = { + get: "/v2/{name=*/*/locations/*/buckets/*/views/*}" + additional_bindings { + get: "/v2/{name=projects/*/locations/*/buckets/*/views/*}" + } + additional_bindings { + get: "/v2/{name=organizations/*/locations/*/buckets/*/views/*}" + } + additional_bindings { + get: "/v2/{name=folders/*/locations/*/buckets/*/views/*}" + } + additional_bindings { + get: "/v2/{name=billingAccounts/*/buckets/*/views/*}" + } + }; + } + + // Creates a view over logs in a bucket. A bucket may contain a maximum of + // 50 views. + rpc CreateView(CreateViewRequest) returns (LogView) { + option (google.api.http) = { + post: "/v2/{parent=*/*/locations/*/buckets/*}/views" + body: "view" + additional_bindings { + post: "/v2/{parent=projects/*/locations/*/buckets/*}/views" + body: "view" + } + additional_bindings { + post: "/v2/{parent=organizations/*/locations/*/buckets/*}/views" + body: "view" + } + additional_bindings { + post: "/v2/{parent=folders/*/locations/*/buckets/*}/views" + body: "view" + } + additional_bindings { + post: "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views" + body: "view" + } + }; + } + + // Updates a view. This method replaces the following fields in the existing + // view with values from the new view: `filter`. + rpc UpdateView(UpdateViewRequest) returns (LogView) { + option (google.api.http) = { + patch: "/v2/{name=*/*/locations/*/buckets/*/views/*}" + body: "view" + additional_bindings { + patch: "/v2/{name=projects/*/locations/*/buckets/*/views/*}" + body: "view" + } + additional_bindings { + patch: "/v2/{name=organizations/*/locations/*/buckets/*/views/*}" + body: "view" + } + additional_bindings { + patch: "/v2/{name=folders/*/locations/*/buckets/*/views/*}" + body: "view" + } + additional_bindings { + patch: "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}" + body: "view" + } + }; + } + + // Deletes a view from a bucket. + rpc DeleteView(DeleteViewRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=*/*/locations/*/buckets/*/views/*}" + additional_bindings { + delete: "/v2/{name=projects/*/locations/*/buckets/*/views/*}" + } + additional_bindings { + delete: "/v2/{name=organizations/*/locations/*/buckets/*/views/*}" + } + additional_bindings { + delete: "/v2/{name=folders/*/locations/*/buckets/*/views/*}" + } + additional_bindings { + delete: "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}" + } + }; + } + // Lists sinks. rpc ListSinks(ListSinksRequest) returns (ListSinksResponse) { option (google.api.http) = { @@ -420,7 +599,7 @@ service ConfigServiceV2 { } } -// Describes a repository of logs (Beta). +// Describes a repository of logs. message LogBucket { option (google.api.resource) = { type: "logging.googleapis.com/LogBucket" @@ -435,7 +614,6 @@ message LogBucket { // "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. @@ -458,10 +636,63 @@ message LogBucket { // 30 days will be used. int32 retention_days = 11; + // Whether the bucket has been locked. + // The retention period on a locked bucket may not be changed. + // Locked buckets may only be deleted if they are empty. + bool locked = 9; + // Output only. The bucket lifecycle state. LifecycleState lifecycle_state = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// LogBucket lifecycle states. +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; +} + +// Describes a view over logs in a bucket. +message LogView { + option (google.api.resource) = { + type: "logging.googleapis.com/LogView" + pattern: "projects/{project}/locations/{location}/buckets/{bucket}/views/{view}" + pattern: "organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}" + pattern: "folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}" + pattern: "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}" + }; + + // The resource name of the view. + // For example + // "projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view + string name = 1; + + // Describes this view. + string description = 3; + + // Output only. The creation timestamp of the view. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update timestamp of the view. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Filter that restricts which log entries in a bucket are visible in this + // view. Filters are restricted to be a logical AND of ==/!= of any of the + // following: + // originating project/folder/organization/billing account. + // resource type + // log id + // Example: SOURCE("projects/myproject") AND resource.type = "gce_instance" + // AND LOG_ID("stdout") + string filter = 7; +} + // 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. @@ -529,10 +760,15 @@ message LogSink { // export any log entries. bool disabled = 19 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Log entries that match any of the exclusion filters will not be exported. + // If a log entry is matched by both `filter` and one of `exclusion_filters` + // it will not be exported. + repeated LogExclusion exclusions = 16 [(google.api.field_behavior) = OPTIONAL]; + // Deprecated. This field is unused. VersionFormat output_version_format = 6 [deprecated = true]; - // Output only. An IAM identity–a service account or group—under which Logging + // 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 @@ -599,20 +835,7 @@ 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). +// The parameters to `ListBuckets`. message ListBucketsRequest { // Required. The parent resource whose buckets are to be listed: // @@ -643,7 +866,7 @@ message ListBucketsRequest { int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; } -// The response from ListBuckets (Beta). +// The response from ListBuckets. message ListBucketsResponse { // A list of buckets. repeated LogBucket buckets = 1; @@ -654,7 +877,32 @@ message ListBucketsResponse { string next_page_token = 2; } -// The parameters to `UpdateBucket` (Beta). +// The parameters to `CreateBucket`. +message CreateBucketRequest { + // Required. The resource in which to create the bucket: + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + // + // Example: `"projects/my-logging-project/locations/global"` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "logging.googleapis.com/LogBucket" + } + ]; + + // Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are + // limited to 100 characters and can include only letters, digits, + // underscores, hyphens, and periods. + string bucket_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The new bucket. The region specified in the new bucket must be compliant + // with any Location Restriction Org Policy. The name field in the bucket is + // ignored. + LogBucket bucket = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The parameters to `UpdateBucket`. message UpdateBucketRequest { // Required. The full resource name of the bucket to update. // @@ -688,7 +936,7 @@ message UpdateBucketRequest { google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED]; } -// The parameters to `GetBucket` (Beta). +// The parameters to `GetBucket`. message GetBucketRequest { // Required. The resource name of the bucket: // @@ -707,6 +955,147 @@ message GetBucketRequest { ]; } +// The parameters to `DeleteBucket`. +message DeleteBucketRequest { + // Required. The full resource name of the bucket to delete. + // + // "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 `UndeleteBucket`. +message UndeleteBucketRequest { + // Required. The full resource name of the bucket to undelete. + // + // "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 `ListViews`. +message ListViewsRequest { + // Required. The bucket whose views are to be listed: + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // 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 ListViews. +message ListViewsResponse { + // A list of views. + repeated LogView views = 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 `CreateView`. +message CreateViewRequest { + // Required. The bucket in which to create the view + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // + // Example: + // `"projects/my-logging-project/locations/my-location/buckets/my-bucket"` + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The id to use for this view. + string view_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The new view. + LogView view = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The parameters to `UpdateView`. +message UpdateViewRequest { + // Required. The full resource name of the view to update + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + // + // Example: + // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The updated view. + LogView view = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Field mask that specifies the fields in `view` that need + // an update. A 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=filter`. + google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The parameters to `GetView`. +message GetViewRequest { + // Required. The resource name of the policy: + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + // + // Example: + // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/LogView" + } + ]; +} + +// The parameters to `DeleteView`. +message DeleteViewRequest { + // Required. The full resource name of the view to delete: + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + // + // Example: + // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/LogView" + } + ]; +} + // The parameters to `ListSinks`. message ListSinksRequest { // Required. The parent resource whose sinks are to be listed: diff --git a/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/logging_metrics.proto b/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/logging_metrics.proto index eb9f73ffa..09d629648 100644 --- a/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/logging_metrics.proto +++ b/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/logging_metrics.proto @@ -92,8 +92,8 @@ service MetricsServiceV2 { // Describes a logs-based metric. The value of the metric is the number of log // entries that match a logs filter in a given time interval. // -// Logs-based metric can also be used to extract values from logs and create a -// a distribution of the values. The distribution records the statistics of the +// Logs-based metrics can also be used to extract values from logs and create a +// distribution of the values. The distribution records the statistics of the // extracted values along with an optional histogram of the values as specified // by the bucket options. message LogMetric { diff --git a/synth.metadata b/synth.metadata index 214a11265..96f3d73e2 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "aba9760d6abc15f724753c26d6f306e0f76dd11a", - "internalRef": "320016414" + "sha": "be0bdf86cd31aa7c1a7b30a9a2e9f2fd53ee3d91", + "internalRef": "342353190" } }, { @@ -140,12 +140,18 @@ "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettings.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettingsName.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CmekSettingsOrBuilder.java", + "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateBucketRequest.java", + "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateBucketRequestOrBuilder.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateExclusionRequest.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateExclusionRequestOrBuilder.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLogMetricRequest.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLogMetricRequestOrBuilder.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateSinkRequest.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateSinkRequestOrBuilder.java", + "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateViewRequest.java", + "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateViewRequestOrBuilder.java", + "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteBucketRequest.java", + "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteBucketRequestOrBuilder.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteExclusionRequest.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteExclusionRequestOrBuilder.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogMetricRequest.java", @@ -154,6 +160,8 @@ "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogRequestOrBuilder.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteSinkRequest.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteSinkRequestOrBuilder.java", + "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteViewRequest.java", + "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteViewRequestOrBuilder.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderLocationName.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/FolderName.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetBucketRequest.java", @@ -166,6 +174,8 @@ "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLogMetricRequestOrBuilder.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSinkRequest.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSinkRequestOrBuilder.java", + "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetViewRequest.java", + "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetViewRequestOrBuilder.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LifecycleState.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsRequest.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListBucketsRequestOrBuilder.java", @@ -195,6 +205,10 @@ "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksRequestOrBuilder.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksResponse.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksResponseOrBuilder.java", + "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsRequest.java", + "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsRequestOrBuilder.java", + "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsResponse.java", + "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListViewsResponseOrBuilder.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LocationName.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogBucket.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogBucketName.java", @@ -216,12 +230,17 @@ "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSink.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSinkName.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSinkOrBuilder.java", + "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogView.java", + "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogViewName.java", + "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogViewOrBuilder.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingConfigProto.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingMetricsProto.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingProto.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationLocationName.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/OrganizationName.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ProjectName.java", + "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UndeleteBucketRequest.java", + "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UndeleteBucketRequestOrBuilder.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateBucketRequest.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateBucketRequestOrBuilder.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateCmekSettingsRequest.java", @@ -232,6 +251,8 @@ "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateLogMetricRequestOrBuilder.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSinkRequest.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSinkRequestOrBuilder.java", + "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateViewRequest.java", + "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateViewRequestOrBuilder.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesPartialErrors.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesPartialErrorsOrBuilder.java", "proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequest.java",