From 4fe556cd22ca704853c7553129b7b160d77fc319 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Wed, 21 Oct 2026 19:44:46 +0000 Subject: [PATCH] feat(google/cloud/observability/v1): add observability --- gapic-libraries-bom/pom.xml | 7 + java-observability/.repo-metadata.json | 15 + java-observability/README.md | 211 + .../google-cloud-observability-bom/pom.xml | 45 + .../google-cloud-observability/pom.xml | 118 + .../observability/v1/ObservabilityClient.java | 4209 +++++++++++++++++ .../v1/ObservabilitySettings.java | 578 +++ .../observability/v1/gapic_metadata.json | 90 + .../cloud/observability/v1/package-info.java | 43 + .../GrpcObservabilityCallableFactory.java | 115 + .../v1/stub/GrpcObservabilityStub.java | 1040 ++++ .../HttpJsonObservabilityCallableFactory.java | 103 + .../v1/stub/HttpJsonObservabilityStub.java | 1823 +++++++ .../v1/stub/ObservabilityStub.java | 248 + .../v1/stub/ObservabilityStubSettings.java | 1566 ++++++ .../cloud/observability/v1/stub/Version.java | 27 + .../reflect-config.json | 2243 +++++++++ .../cloud/observability/v1/MockLocations.java | 59 + .../observability/v1/MockLocationsImpl.java | 105 + .../observability/v1/MockObservability.java | 59 + .../v1/MockObservabilityImpl.java | 514 ++ .../v1/ObservabilityClientHttpJsonTest.java | 2257 +++++++++ .../v1/ObservabilityClientTest.java | 1971 ++++++++ .../pom.xml | 45 + .../observability/v1/ObservabilityGrpc.java | 3112 ++++++++++++ java-observability/pom.xml | 58 + .../clirr-ignored-differences.xml | 80 + .../pom.xml | 41 + .../google/cloud/observability/v1/Bucket.java | 2484 ++++++++++ .../cloud/observability/v1/BucketName.java | 226 + .../observability/v1/BucketOrBuilder.java | 313 ++ .../cloud/observability/v1/CmekSettings.java | 1099 +++++ .../v1/CmekSettingsOrBuilder.java | 142 + .../observability/v1/CreateBucketRequest.java | 1129 +++++ .../v1/CreateBucketRequestOrBuilder.java | 131 + .../observability/v1/CreateLinkRequest.java | 1108 +++++ .../v1/CreateLinkRequestOrBuilder.java | 128 + .../v1/CreateTraceScopeRequest.java | 1166 +++++ .../v1/CreateTraceScopeRequestOrBuilder.java | 141 + .../cloud/observability/v1/Dataset.java | 1883 ++++++++ .../cloud/observability/v1/DatasetName.java | 260 + .../observability/v1/DatasetOrBuilder.java | 230 + .../observability/v1/DeleteLinkRequest.java | 624 +++ .../v1/DeleteLinkRequestOrBuilder.java | 62 + .../v1/DeleteTraceScopeRequest.java | 653 +++ .../v1/DeleteTraceScopeRequestOrBuilder.java | 70 + .../observability/v1/GetBucketRequest.java | 624 +++ .../v1/GetBucketRequestOrBuilder.java | 62 + .../observability/v1/GetDatasetRequest.java | 624 +++ .../v1/GetDatasetRequestOrBuilder.java | 62 + .../observability/v1/GetLinkRequest.java | 624 +++ .../v1/GetLinkRequestOrBuilder.java | 62 + .../observability/v1/GetScopeRequest.java | 645 +++ .../v1/GetScopeRequestOrBuilder.java | 68 + .../observability/v1/GetSettingsRequest.java | 652 +++ .../v1/GetSettingsRequestOrBuilder.java | 70 + .../v1/GetTraceScopeRequest.java | 653 +++ .../v1/GetTraceScopeRequestOrBuilder.java | 70 + .../observability/v1/GetViewRequest.java | 624 +++ .../v1/GetViewRequestOrBuilder.java | 62 + .../google/cloud/observability/v1/Link.java | 1295 +++++ .../cloud/observability/v1/LinkName.java | 301 ++ .../cloud/observability/v1/LinkOrBuilder.java | 150 + .../observability/v1/ListBucketsRequest.java | 1022 ++++ .../v1/ListBucketsRequestOrBuilder.java | 118 + .../observability/v1/ListBucketsResponse.java | 1165 +++++ .../v1/ListBucketsResponseOrBuilder.java | 122 + .../observability/v1/ListDatasetsRequest.java | 1030 ++++ .../v1/ListDatasetsRequestOrBuilder.java | 120 + .../v1/ListDatasetsResponse.java | 1119 +++++ .../v1/ListDatasetsResponseOrBuilder.java | 112 + .../observability/v1/ListLinksRequest.java | 932 ++++ .../v1/ListLinksRequestOrBuilder.java | 107 + .../observability/v1/ListLinksResponse.java | 1117 +++++ .../v1/ListLinksResponseOrBuilder.java | 111 + .../v1/ListTraceScopesRequest.java | 972 ++++ .../v1/ListTraceScopesRequestOrBuilder.java | 118 + .../v1/ListTraceScopesResponse.java | 1175 +++++ .../v1/ListTraceScopesResponseOrBuilder.java | 124 + .../observability/v1/ListViewsRequest.java | 925 ++++ .../v1/ListViewsRequestOrBuilder.java | 105 + .../observability/v1/ListViewsResponse.java | 1117 +++++ .../v1/ListViewsResponseOrBuilder.java | 111 + .../cloud/observability/v1/LocationName.java | 195 + .../observability/v1/ObservabilityProto.java | 847 ++++ .../observability/v1/OperationMetadata.java | 1869 ++++++++ .../v1/OperationMetadataOrBuilder.java | 229 + .../google/cloud/observability/v1/Scope.java | 1398 ++++++ .../cloud/observability/v1/ScopeName.java | 226 + .../observability/v1/ScopeOrBuilder.java | 179 + .../cloud/observability/v1/Settings.java | 1253 +++++ .../cloud/observability/v1/SettingsName.java | 364 ++ .../observability/v1/SettingsOrBuilder.java | 158 + .../cloud/observability/v1/TraceScope.java | 1801 +++++++ .../observability/v1/TraceScopeName.java | 226 + .../observability/v1/TraceScopeOrBuilder.java | 250 + .../observability/v1/UpdateBucketRequest.java | 1035 ++++ .../v1/UpdateBucketRequestOrBuilder.java | 117 + .../observability/v1/UpdateLinkRequest.java | 1014 ++++ .../v1/UpdateLinkRequestOrBuilder.java | 114 + .../observability/v1/UpdateScopeRequest.java | 1063 +++++ .../v1/UpdateScopeRequestOrBuilder.java | 123 + .../v1/UpdateSettingsRequest.java | 1048 ++++ .../v1/UpdateSettingsRequestOrBuilder.java | 120 + .../v1/UpdateTraceScopeRequest.java | 1013 ++++ .../v1/UpdateTraceScopeRequestOrBuilder.java | 111 + .../google/cloud/observability/v1/View.java | 1595 +++++++ .../cloud/observability/v1/ViewName.java | 301 ++ .../cloud/observability/v1/ViewOrBuilder.java | 190 + .../observability/v1/observability.proto | 1004 ++++ .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../SyncCreateUseHttpJsonTransport.java | 40 + .../createbucket/AsyncCreateBucket.java | 52 + .../createbucket/AsyncCreateBucketLRO.java | 53 + .../createbucket/SyncCreateBucket.java | 48 + ...cCreateBucketLocationnameBucketString.java | 44 + .../SyncCreateBucketStringBucketString.java | 44 + .../createlink/AsyncCreateLink.java | 53 + .../createlink/AsyncCreateLinkLRO.java | 54 + .../createlink/SyncCreateLink.java | 49 + .../SyncCreateLinkDatasetnameLinkString.java | 44 + .../SyncCreateLinkStringLinkString.java | 44 + .../AsyncCreateTraceScope.java | 52 + .../SyncCreateTraceScope.java | 48 + ...raceScopeLocationnameTracescopeString.java | 44 + ...reateTraceScopeStringTracescopeString.java | 44 + .../deletelink/AsyncDeleteLink.java | 51 + .../deletelink/AsyncDeleteLinkLRO.java | 53 + .../deletelink/SyncDeleteLink.java | 48 + .../deletelink/SyncDeleteLinkLinkname.java | 42 + .../deletelink/SyncDeleteLinkString.java | 43 + .../AsyncDeleteTraceScope.java | 49 + .../SyncDeleteTraceScope.java | 46 + .../SyncDeleteTraceScopeString.java | 42 + .../SyncDeleteTraceScopeTracescopename.java | 42 + .../getbucket/AsyncGetBucket.java | 49 + .../getbucket/SyncGetBucket.java | 46 + .../getbucket/SyncGetBucketBucketname.java | 42 + .../getbucket/SyncGetBucketString.java | 42 + .../getdataset/AsyncGetDataset.java | 50 + .../getdataset/SyncGetDataset.java | 47 + .../getdataset/SyncGetDatasetDatasetname.java | 42 + .../getdataset/SyncGetDatasetString.java | 42 + .../observability/getlink/AsyncGetLink.java | 51 + .../v1/observability/getlink/SyncGetLink.java | 48 + .../getlink/SyncGetLinkLinkname.java | 42 + .../getlink/SyncGetLinkString.java | 43 + .../getlocation/AsyncGetLocation.java | 45 + .../getlocation/SyncGetLocation.java | 42 + .../observability/getscope/AsyncGetScope.java | 49 + .../observability/getscope/SyncGetScope.java | 46 + .../getscope/SyncGetScopeScopename.java | 42 + .../getscope/SyncGetScopeString.java | 42 + .../getsettings/AsyncGetSettings.java | 49 + .../getsettings/SyncGetSettings.java | 46 + .../SyncGetSettingsSettingsname.java | 42 + .../getsettings/SyncGetSettingsString.java | 42 + .../gettracescope/AsyncGetTraceScope.java | 50 + .../gettracescope/SyncGetTraceScope.java | 46 + .../SyncGetTraceScopeString.java | 42 + .../SyncGetTraceScopeTracescopename.java | 42 + .../observability/getview/AsyncGetView.java | 51 + .../v1/observability/getview/SyncGetView.java | 48 + .../getview/SyncGetViewString.java | 43 + .../getview/SyncGetViewViewname.java | 42 + .../listbuckets/AsyncListBuckets.java | 54 + .../listbuckets/AsyncListBucketsPaged.java | 62 + .../listbuckets/SyncListBuckets.java | 51 + .../SyncListBucketsLocationname.java | 44 + .../listbuckets/SyncListBucketsString.java | 44 + .../listdatasets/AsyncListDatasets.java | 55 + .../listdatasets/AsyncListDatasetsPaged.java | 62 + .../listdatasets/SyncListDatasets.java | 51 + .../SyncListDatasetsBucketname.java | 44 + .../listdatasets/SyncListDatasetsString.java | 44 + .../listlinks/AsyncListLinks.java | 54 + .../listlinks/AsyncListLinksPaged.java | 62 + .../listlinks/SyncListLinks.java | 51 + .../listlinks/SyncListLinksDatasetname.java | 44 + .../listlinks/SyncListLinksString.java | 44 + .../listlocations/AsyncListLocations.java | 54 + .../AsyncListLocationsPaged.java | 61 + .../listlocations/SyncListLocations.java | 50 + .../listtracescopes/AsyncListTraceScopes.java | 54 + .../AsyncListTraceScopesPaged.java | 62 + .../listtracescopes/SyncListTraceScopes.java | 50 + .../SyncListTraceScopesLocationname.java | 44 + .../SyncListTraceScopesString.java | 44 + .../listviews/AsyncListViews.java | 54 + .../listviews/AsyncListViewsPaged.java | 62 + .../listviews/SyncListViews.java | 51 + .../listviews/SyncListViewsDatasetname.java | 44 + .../listviews/SyncListViewsString.java | 44 + .../updatebucket/AsyncUpdateBucket.java | 51 + .../updatebucket/AsyncUpdateBucketLRO.java | 52 + .../updatebucket/SyncUpdateBucket.java | 47 + .../SyncUpdateBucketBucketFieldmask.java | 43 + .../updatelink/AsyncUpdateLink.java | 51 + .../updatelink/AsyncUpdateLinkLRO.java | 52 + .../updatelink/SyncUpdateLink.java | 47 + .../SyncUpdateLinkLinkFieldmask.java | 43 + .../updatescope/AsyncUpdateScope.java | 50 + .../updatescope/SyncUpdateScope.java | 47 + .../SyncUpdateScopeScopeFieldmask.java | 43 + .../updatesettings/AsyncUpdateSettings.java | 52 + .../AsyncUpdateSettingsLRO.java | 52 + .../updatesettings/SyncUpdateSettings.java | 47 + .../SyncUpdateSettingsSettingsFieldmask.java | 43 + .../AsyncUpdateTraceScope.java | 51 + .../SyncUpdateTraceScope.java | 47 + ...ncUpdateTraceScopeTracescopeFieldmask.java | 43 + .../createbucket/SyncCreateBucket.java | 53 + .../getscope/SyncGetScope.java | 55 + .../createbucket/SyncCreateBucket.java | 54 + .../getscope/SyncGetScope.java | 56 + librarian.yaml | 7 + pom.xml | 1 + versions.txt | 5 + 219 files changed, 73943 insertions(+) create mode 100644 java-observability/.repo-metadata.json create mode 100644 java-observability/README.md create mode 100644 java-observability/google-cloud-observability-bom/pom.xml create mode 100644 java-observability/google-cloud-observability/pom.xml create mode 100644 java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/ObservabilityClient.java create mode 100644 java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/ObservabilitySettings.java create mode 100644 java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/gapic_metadata.json create mode 100644 java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/package-info.java create mode 100644 java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/GrpcObservabilityCallableFactory.java create mode 100644 java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/GrpcObservabilityStub.java create mode 100644 java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/HttpJsonObservabilityCallableFactory.java create mode 100644 java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/HttpJsonObservabilityStub.java create mode 100644 java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/ObservabilityStub.java create mode 100644 java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/ObservabilityStubSettings.java create mode 100644 java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/Version.java create mode 100644 java-observability/google-cloud-observability/src/main/resources/META-INF/native-image/com.google.cloud.observability.v1/reflect-config.json create mode 100644 java-observability/google-cloud-observability/src/test/java/com/google/cloud/observability/v1/MockLocations.java create mode 100644 java-observability/google-cloud-observability/src/test/java/com/google/cloud/observability/v1/MockLocationsImpl.java create mode 100644 java-observability/google-cloud-observability/src/test/java/com/google/cloud/observability/v1/MockObservability.java create mode 100644 java-observability/google-cloud-observability/src/test/java/com/google/cloud/observability/v1/MockObservabilityImpl.java create mode 100644 java-observability/google-cloud-observability/src/test/java/com/google/cloud/observability/v1/ObservabilityClientHttpJsonTest.java create mode 100644 java-observability/google-cloud-observability/src/test/java/com/google/cloud/observability/v1/ObservabilityClientTest.java create mode 100644 java-observability/grpc-google-cloud-observability-v1/pom.xml create mode 100644 java-observability/grpc-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ObservabilityGrpc.java create mode 100644 java-observability/pom.xml create mode 100644 java-observability/proto-google-cloud-observability-v1/clirr-ignored-differences.xml create mode 100644 java-observability/proto-google-cloud-observability-v1/pom.xml create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/Bucket.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/BucketName.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/BucketOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CmekSettings.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CmekSettingsOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CreateBucketRequest.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CreateBucketRequestOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CreateLinkRequest.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CreateLinkRequestOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CreateTraceScopeRequest.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CreateTraceScopeRequestOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/Dataset.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/DatasetName.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/DatasetOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/DeleteLinkRequest.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/DeleteLinkRequestOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/DeleteTraceScopeRequest.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/DeleteTraceScopeRequestOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetBucketRequest.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetBucketRequestOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetDatasetRequest.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetDatasetRequestOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetLinkRequest.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetLinkRequestOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetScopeRequest.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetScopeRequestOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetSettingsRequest.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetSettingsRequestOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetTraceScopeRequest.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetTraceScopeRequestOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetViewRequest.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetViewRequestOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/Link.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/LinkName.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/LinkOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListBucketsRequest.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListBucketsRequestOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListBucketsResponse.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListBucketsResponseOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListDatasetsRequest.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListDatasetsRequestOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListDatasetsResponse.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListDatasetsResponseOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListLinksRequest.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListLinksRequestOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListLinksResponse.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListLinksResponseOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListTraceScopesRequest.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListTraceScopesRequestOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListTraceScopesResponse.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListTraceScopesResponseOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListViewsRequest.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListViewsRequestOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListViewsResponse.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListViewsResponseOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/LocationName.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ObservabilityProto.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/OperationMetadata.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/OperationMetadataOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/Scope.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ScopeName.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ScopeOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/Settings.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/SettingsName.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/SettingsOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/TraceScope.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/TraceScopeName.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/TraceScopeOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateBucketRequest.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateBucketRequestOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateLinkRequest.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateLinkRequestOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateScopeRequest.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateScopeRequestOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateSettingsRequest.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateSettingsRequestOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateTraceScopeRequest.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateTraceScopeRequestOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/View.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ViewName.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ViewOrBuilder.java create mode 100644 java-observability/proto-google-cloud-observability-v1/src/main/proto/google/cloud/observability/v1/observability.proto create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/create/SyncCreateSetEndpoint.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/create/SyncCreateUseHttpJsonTransport.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createbucket/AsyncCreateBucket.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createbucket/AsyncCreateBucketLRO.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createbucket/SyncCreateBucket.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createbucket/SyncCreateBucketLocationnameBucketString.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createbucket/SyncCreateBucketStringBucketString.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createlink/AsyncCreateLink.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createlink/AsyncCreateLinkLRO.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createlink/SyncCreateLink.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createlink/SyncCreateLinkDatasetnameLinkString.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createlink/SyncCreateLinkStringLinkString.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createtracescope/AsyncCreateTraceScope.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createtracescope/SyncCreateTraceScope.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createtracescope/SyncCreateTraceScopeLocationnameTracescopeString.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createtracescope/SyncCreateTraceScopeStringTracescopeString.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletelink/AsyncDeleteLink.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletelink/AsyncDeleteLinkLRO.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletelink/SyncDeleteLink.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletelink/SyncDeleteLinkLinkname.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletelink/SyncDeleteLinkString.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletetracescope/AsyncDeleteTraceScope.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletetracescope/SyncDeleteTraceScope.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletetracescope/SyncDeleteTraceScopeString.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletetracescope/SyncDeleteTraceScopeTracescopename.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getbucket/AsyncGetBucket.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getbucket/SyncGetBucket.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getbucket/SyncGetBucketBucketname.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getbucket/SyncGetBucketString.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getdataset/AsyncGetDataset.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getdataset/SyncGetDataset.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getdataset/SyncGetDatasetDatasetname.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getdataset/SyncGetDatasetString.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getlink/AsyncGetLink.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getlink/SyncGetLink.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getlink/SyncGetLinkLinkname.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getlink/SyncGetLinkString.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getlocation/AsyncGetLocation.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getlocation/SyncGetLocation.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getscope/AsyncGetScope.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getscope/SyncGetScope.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getscope/SyncGetScopeScopename.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getscope/SyncGetScopeString.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getsettings/AsyncGetSettings.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getsettings/SyncGetSettings.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getsettings/SyncGetSettingsSettingsname.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getsettings/SyncGetSettingsString.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/gettracescope/AsyncGetTraceScope.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/gettracescope/SyncGetTraceScope.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/gettracescope/SyncGetTraceScopeString.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/gettracescope/SyncGetTraceScopeTracescopename.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getview/AsyncGetView.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getview/SyncGetView.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getview/SyncGetViewString.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getview/SyncGetViewViewname.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listbuckets/AsyncListBuckets.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listbuckets/AsyncListBucketsPaged.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listbuckets/SyncListBuckets.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listbuckets/SyncListBucketsLocationname.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listbuckets/SyncListBucketsString.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listdatasets/AsyncListDatasets.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listdatasets/AsyncListDatasetsPaged.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listdatasets/SyncListDatasets.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listdatasets/SyncListDatasetsBucketname.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listdatasets/SyncListDatasetsString.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlinks/AsyncListLinks.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlinks/AsyncListLinksPaged.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlinks/SyncListLinks.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlinks/SyncListLinksDatasetname.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlinks/SyncListLinksString.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlocations/AsyncListLocations.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlocations/AsyncListLocationsPaged.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlocations/SyncListLocations.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listtracescopes/AsyncListTraceScopes.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listtracescopes/AsyncListTraceScopesPaged.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listtracescopes/SyncListTraceScopes.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listtracescopes/SyncListTraceScopesLocationname.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listtracescopes/SyncListTraceScopesString.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listviews/AsyncListViews.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listviews/AsyncListViewsPaged.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listviews/SyncListViews.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listviews/SyncListViewsDatasetname.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listviews/SyncListViewsString.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatebucket/AsyncUpdateBucket.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatebucket/AsyncUpdateBucketLRO.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatebucket/SyncUpdateBucket.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatebucket/SyncUpdateBucketBucketFieldmask.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatelink/AsyncUpdateLink.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatelink/AsyncUpdateLinkLRO.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatelink/SyncUpdateLink.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatelink/SyncUpdateLinkLinkFieldmask.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatescope/AsyncUpdateScope.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatescope/SyncUpdateScope.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatescope/SyncUpdateScopeScopeFieldmask.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatesettings/AsyncUpdateSettings.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatesettings/AsyncUpdateSettingsLRO.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatesettings/SyncUpdateSettings.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatesettings/SyncUpdateSettingsSettingsFieldmask.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatetracescope/AsyncUpdateTraceScope.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatetracescope/SyncUpdateTraceScope.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatetracescope/SyncUpdateTraceScopeTracescopeFieldmask.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observabilitysettings/createbucket/SyncCreateBucket.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observabilitysettings/getscope/SyncGetScope.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/stub/observabilitystubsettings/createbucket/SyncCreateBucket.java create mode 100644 java-observability/samples/snippets/generated/com/google/cloud/observability/v1/stub/observabilitystubsettings/getscope/SyncGetScope.java diff --git a/gapic-libraries-bom/pom.xml b/gapic-libraries-bom/pom.xml index f9532bbf23df..065893203af4 100644 --- a/gapic-libraries-bom/pom.xml +++ b/gapic-libraries-bom/pom.xml @@ -1038,6 +1038,13 @@ google-cloud-notification 0.218.0-beta-SNAPSHOT + + com.google.cloud + google-cloud-observability-bom + 0.1.0-SNAPSHOT + pom + import + com.google.cloud google-cloud-optimization-bom diff --git a/java-observability/.repo-metadata.json b/java-observability/.repo-metadata.json new file mode 100644 index 000000000000..8ac16eebf023 --- /dev/null +++ b/java-observability/.repo-metadata.json @@ -0,0 +1,15 @@ +{ + "api_shortname": "observability", + "name_pretty": "Observability", + "product_documentation": "https://cloud.google.com/stackdriver/", + "api_description": "Provides functionality for configuring the observability scope, which\ncontrols the log, metric, and trace data that you can view.", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-observability/latest/overview", + "release_level": "preview", + "transport": "grpc+rest", + "language": "java", + "repo": "googleapis/google-cloud-java", + "repo_short": "java-observability", + "distribution_name": "com.google.cloud:google-cloud-observability", + "api_id": "observability.googleapis.com", + "library_type": "GAPIC_AUTO" +} \ No newline at end of file diff --git a/java-observability/README.md b/java-observability/README.md new file mode 100644 index 000000000000..cea3c6b57484 --- /dev/null +++ b/java-observability/README.md @@ -0,0 +1,211 @@ +# Google Observability Client for Java + +Java idiomatic client for [Observability][product-docs]. + +[![Maven][maven-version-image]][maven-version-link] +![Stability][stability-image] + +- [Product Documentation][product-docs] +- [Client Library Documentation][javadocs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + + +## Quickstart + +If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: + +```xml + + + + com.google.cloud + libraries-bom + 26.90.0 + pom + import + + + + + + + com.google.cloud + google-cloud-observability + + +``` + +If you are using Maven without the BOM, add this to your dependencies: + + +```xml + + com.google.cloud + google-cloud-observability + 0.0.0 + +``` + +If you are using Gradle 5.x or later, add this to your dependencies: + +```Groovy +implementation platform('com.google.cloud:libraries-bom:26.90.0') + +implementation 'com.google.cloud:google-cloud-observability' +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.cloud:google-cloud-observability:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-observability" % "0.0.0" +``` + +## Authentication + +See the [Authentication][authentication] section in the base directory's README. + +## Authorization + +The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired Observability APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Observability API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Observability [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Observability. +[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by +[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line: +`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +### Installation and setup + +You'll need to obtain the `google-cloud-observability` library. See the [Quickstart](#quickstart) section +to add `google-cloud-observability` as a dependency in your code. + +## About Observability + + +[Observability][product-docs] Provides functionality for configuring the observability scope, which +controls the log, metric, and trace data that you can view. + +See the [Observability client library docs][javadocs] to learn how to +use this Observability Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Observability uses both gRPC and HTTP/JSON for the transport layer. + +## Supported Java Versions + +Java 8 or above is required for using this client. + +Google's Java client libraries, +[Google Cloud Client Libraries][cloudlibs] +and +[Google Cloud API Libraries][apilibs], +follow the +[Oracle Java SE support roadmap][oracle] +(see the Oracle Java SE Product Releases section). + +### For new development + +In general, new feature development occurs with support for the lowest Java +LTS version covered by Oracle's Premier Support (which typically lasts 5 years +from initial General Availability). If the minimum required JVM for a given +library is changed, it is accompanied by a [semver][semver] major release. + +Java 11 and (in September 2021) Java 17 are the best choices for new +development. + +### Keeping production systems current + +Google tests its client libraries with all current LTS versions covered by +Oracle's Extended Support (which typically lasts 8 years from initial +General Availability). + +#### Legacy support + +Google's client libraries support legacy versions of Java runtimes with long +term stable libraries that don't receive feature updates on a best efforts basis +as it may not be possible to backport all patches. + +Google provides updates on a best efforts basis to apps that continue to use +Java 7, though apps might need to upgrade to current versions of the library +that supports their JVM. + +#### Where to find specific information + +The latest versions and the supported Java versions are identified on +the individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME` +and on [google-cloud-java][g-c-j]. + +## Versioning +This library follows [Semantic Versioning](http://semver.org/). + + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time +and the public API should not be considered stable. + + +## Contributing + + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING][contributing] for more information how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in +this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more +information. + + +## License + +Apache 2.0 - See [LICENSE][license] for more information. + +Java is a registered trademark of Oracle and/or its affiliates. + +[product-docs]: https://cloud.google.com/stackdriver/ +[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-observability/latest/overview +[stability-image]: https://img.shields.io/badge/stability-preview-yellow +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-observability.svg +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-observability/0.0.0 +[authentication]: https://github.com/googleapis/google-cloud-java#authentication +[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes +[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles +[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy +[developer-console]: https://console.developers.google.com/ +[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects +[cloud-cli]: https://cloud.google.com/cli +[troubleshooting]: https://github.com/googleapis/google-cloud-java/blob/main/TROUBLESHOOTING.md +[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE +[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing +[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=observability.googleapis.com +[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png + +[semver]: https://semver.org/ +[cloudlibs]: https://cloud.google.com/apis/docs/client-libraries-explained +[apilibs]: https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries +[oracle]: https://www.oracle.com/java/technologies/java-se-support-roadmap.html +[g-c-j]: http://github.com/googleapis/google-cloud-java diff --git a/java-observability/google-cloud-observability-bom/pom.xml b/java-observability/google-cloud-observability-bom/pom.xml new file mode 100644 index 000000000000..6503c8ba8032 --- /dev/null +++ b/java-observability/google-cloud-observability-bom/pom.xml @@ -0,0 +1,45 @@ + + + 4.0.0 + com.google.cloud + google-cloud-observability-bom + 0.1.0-SNAPSHOT + pom + + com.google.cloud + google-cloud-pom-parent + 1.94.0-SNAPSHOT + ../../google-cloud-pom-parent/pom.xml + + + Google Observability BOM + + BOM for Observability + + + + true + + + + + + + com.google.cloud + google-cloud-observability + 0.1.0-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-observability-v1 + 0.1.0-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-observability-v1 + 0.1.0-SNAPSHOT + + + + + \ No newline at end of file diff --git a/java-observability/google-cloud-observability/pom.xml b/java-observability/google-cloud-observability/pom.xml new file mode 100644 index 000000000000..7012477aa4c6 --- /dev/null +++ b/java-observability/google-cloud-observability/pom.xml @@ -0,0 +1,118 @@ + + + 4.0.0 + com.google.cloud + google-cloud-observability + 0.1.0-SNAPSHOT + jar + Google Observability + Observability Provides functionality for configuring the observability scope, which +controls the log, metric, and trace data that you can view. + + com.google.cloud + google-cloud-observability-parent + 0.1.0-SNAPSHOT + + + google-cloud-observability + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.api + api-common + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + + com.google.api.grpc + proto-google-cloud-observability-v1 + + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + com.google.api + gax-httpjson + + + com.google.api.grpc + proto-google-iam-v1 + + + org.threeten + threetenbp + + + + + com.google.api.grpc + grpc-google-common-protos + test + + + com.google.api.grpc + grpc-google-iam-v1 + test + + + junit + junit + test + + + + com.google.api.grpc + grpc-google-cloud-observability-v1 + test + + + + + com.google.api + gax + testlib + test + + + com.google.api + gax-grpc + testlib + test + + + com.google.api + gax-httpjson + testlib + test + + + \ No newline at end of file diff --git a/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/ObservabilityClient.java b/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/ObservabilityClient.java new file mode 100644 index 000000000000..8b28ded6f4dc --- /dev/null +++ b/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/ObservabilityClient.java @@ -0,0 +1,4209 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.cloud.observability.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.observability.v1.stub.ObservabilityStub; +import com.google.cloud.observability.v1.stub.ObservabilityStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service describing handlers for resources + * + *

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

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

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

GetScope

Gets details of a single Scope.

+ *

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

+ *
    + *
  • getScope(GetScopeRequest request) + *

+ *

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

+ *
    + *
  • getScope(ScopeName name) + *

  • getScope(String name) + *

+ *

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

+ *
    + *
  • getScopeCallable() + *

+ *

UpdateScope

Updates the parameters of a single Scope.

+ *

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

+ *
    + *
  • updateScope(UpdateScopeRequest request) + *

+ *

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

+ *
    + *
  • updateScope(Scope scope, FieldMask updateMask) + *

+ *

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

+ *
    + *
  • updateScopeCallable() + *

+ *

GetBucket

Get bucket resource.

+ *

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

+ *
    + *
  • getBucket(GetBucketRequest request) + *

+ *

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

+ *
    + *
  • getBucket(BucketName name) + *

  • getBucket(String name) + *

+ *

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

+ *
    + *
  • getBucketCallable() + *

+ *

ListBuckets

List buckets of a project in a particular location.

+ *

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

+ *
    + *
  • listBuckets(ListBucketsRequest request) + *

+ *

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

+ *
    + *
  • listBuckets(LocationName parent) + *

  • listBuckets(String parent) + *

+ *

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

+ *
    + *
  • listBucketsPagedCallable() + *

  • listBucketsCallable() + *

+ *

CreateBucket

Create a new bucket.

+ *

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

+ *
    + *
  • createBucketAsync(CreateBucketRequest request) + *

+ *

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

+ *
    + *
  • createBucketAsync(LocationName parent, Bucket bucket, String bucketId) + *

  • createBucketAsync(String parent, Bucket bucket, String bucketId) + *

+ *

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

+ *
    + *
  • createBucketOperationCallable() + *

  • createBucketCallable() + *

+ *

UpdateBucket

Update a bucket.

+ *

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

+ *
    + *
  • updateBucketAsync(UpdateBucketRequest request) + *

+ *

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

+ *
    + *
  • updateBucketAsync(Bucket bucket, FieldMask updateMask) + *

+ *

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

+ *
    + *
  • updateBucketOperationCallable() + *

  • updateBucketCallable() + *

+ *

GetDataset

Get a dataset.

+ *

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

+ *
    + *
  • getDataset(GetDatasetRequest request) + *

+ *

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

+ *
    + *
  • getDataset(DatasetName name) + *

  • getDataset(String name) + *

+ *

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

+ *
    + *
  • getDatasetCallable() + *

+ *

ListDatasets

List datasets of a bucket.

+ *

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

+ *
    + *
  • listDatasets(ListDatasetsRequest request) + *

+ *

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

+ *
    + *
  • listDatasets(BucketName parent) + *

  • listDatasets(String parent) + *

+ *

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

+ *
    + *
  • listDatasetsPagedCallable() + *

  • listDatasetsCallable() + *

+ *

GetView

Get a view.

+ *

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

+ *
    + *
  • getView(GetViewRequest request) + *

+ *

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

+ *
    + *
  • getView(ViewName name) + *

  • getView(String name) + *

+ *

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

+ *
    + *
  • getViewCallable() + *

+ *

ListViews

List views of a dataset.

+ *

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

+ *
    + *
  • listViews(ListViewsRequest request) + *

+ *

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

+ *
    + *
  • listViews(DatasetName parent) + *

  • listViews(String parent) + *

+ *

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

+ *
    + *
  • listViewsPagedCallable() + *

  • listViewsCallable() + *

+ *

GetLink

Get a link.

+ *

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

+ *
    + *
  • getLink(GetLinkRequest request) + *

+ *

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

+ *
    + *
  • getLink(LinkName name) + *

  • getLink(String name) + *

+ *

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

+ *
    + *
  • getLinkCallable() + *

+ *

ListLinks

List links of a dataset.

+ *

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

+ *
    + *
  • listLinks(ListLinksRequest request) + *

+ *

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

+ *
    + *
  • listLinks(DatasetName parent) + *

  • listLinks(String parent) + *

+ *

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

+ *
    + *
  • listLinksPagedCallable() + *

  • listLinksCallable() + *

+ *

CreateLink

Create a new link.

+ *

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

+ *
    + *
  • createLinkAsync(CreateLinkRequest request) + *

+ *

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

+ *
    + *
  • createLinkAsync(DatasetName parent, Link link, String linkId) + *

  • createLinkAsync(String parent, Link link, String linkId) + *

+ *

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

+ *
    + *
  • createLinkOperationCallable() + *

  • createLinkCallable() + *

+ *

UpdateLink

Update a link.

+ *

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

+ *
    + *
  • updateLinkAsync(UpdateLinkRequest request) + *

+ *

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

+ *
    + *
  • updateLinkAsync(Link link, FieldMask updateMask) + *

+ *

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

+ *
    + *
  • updateLinkOperationCallable() + *

  • updateLinkCallable() + *

+ *

DeleteLink

Delete a link.

+ *

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

+ *
    + *
  • deleteLinkAsync(DeleteLinkRequest request) + *

+ *

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

+ *
    + *
  • deleteLinkAsync(LinkName name) + *

  • deleteLinkAsync(String name) + *

+ *

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

+ *
    + *
  • deleteLinkOperationCallable() + *

  • deleteLinkCallable() + *

+ *

GetTraceScope

Get TraceScope resource.

+ *

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

+ *
    + *
  • getTraceScope(GetTraceScopeRequest request) + *

+ *

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

+ *
    + *
  • getTraceScope(TraceScopeName name) + *

  • getTraceScope(String name) + *

+ *

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

+ *
    + *
  • getTraceScopeCallable() + *

+ *

ListTraceScopes

List TraceScopes of a project in a particular location.

+ *

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

+ *
    + *
  • listTraceScopes(ListTraceScopesRequest request) + *

+ *

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

+ *
    + *
  • listTraceScopes(LocationName parent) + *

  • listTraceScopes(String parent) + *

+ *

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

+ *
    + *
  • listTraceScopesPagedCallable() + *

  • listTraceScopesCallable() + *

+ *

CreateTraceScope

Create a new TraceScope.

+ *

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

+ *
    + *
  • createTraceScope(CreateTraceScopeRequest request) + *

+ *

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

+ *
    + *
  • createTraceScope(LocationName parent, TraceScope traceScope, String traceScopeId) + *

  • createTraceScope(String parent, TraceScope traceScope, String traceScopeId) + *

+ *

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

+ *
    + *
  • createTraceScopeCallable() + *

+ *

UpdateTraceScope

Update a TraceScope.

+ *

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

+ *
    + *
  • updateTraceScope(UpdateTraceScopeRequest request) + *

+ *

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

+ *
    + *
  • updateTraceScope(TraceScope traceScope, FieldMask updateMask) + *

+ *

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

+ *
    + *
  • updateTraceScopeCallable() + *

+ *

DeleteTraceScope

Delete a TraceScope.

+ *

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

+ *
    + *
  • deleteTraceScope(DeleteTraceScopeRequest request) + *

+ *

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

+ *
    + *
  • deleteTraceScope(TraceScopeName name) + *

  • deleteTraceScope(String name) + *

+ *

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

+ *
    + *
  • deleteTraceScopeCallable() + *

+ *

GetSettings

Get Settings

+ *

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

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

+ *

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

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

  • getSettings(String name) + *

+ *

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

+ *
    + *
  • getSettingsCallable() + *

+ *

UpdateSettings

Update Settings

+ *

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

+ *
    + *
  • updateSettingsAsync(UpdateSettingsRequest request) + *

+ *

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

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

+ *

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

+ *
    + *
  • updateSettingsOperationCallable() + *

  • updateSettingsCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service. + *

This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: ***Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project. + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.

+ *

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

+ *
    + *
  • listLocations(ListLocationsRequest request) + *

+ *

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

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

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

+ *
    + *
  • getLocation(GetLocationRequest request) + *

+ *

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

+ *
    + *
  • getLocationCallable() + *

+ *
+ * + *

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

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

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

To customize credentials: + * + *

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

To customize the endpoint: + * + *

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

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

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

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   ScopeName name = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]");
+   *   Scope response = observabilityClient.getScope(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. The format is: + *

projects/{project}/locations/{location}/scopes/{scope} + *

The `{location}` field must be set to `global`. The `{scope}` field must be set to + * `_Default`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Scope getScope(@Nullable ScopeName name) { + GetScopeRequest request = + GetScopeRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getScope(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Scope. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   String name = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString();
+   *   Scope response = observabilityClient.getScope(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. The format is: + *

projects/{project}/locations/{location}/scopes/{scope} + *

The `{location}` field must be set to `global`. The `{scope}` field must be set to + * `_Default`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Scope getScope(String name) { + GetScopeRequest request = GetScopeRequest.newBuilder().setName(name).build(); + return getScope(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Scope. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   GetScopeRequest request =
+   *       GetScopeRequest.newBuilder()
+   *           .setName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
+   *           .build();
+   *   Scope response = observabilityClient.getScope(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 Scope getScope(GetScopeRequest request) { + return getScopeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Scope. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   GetScopeRequest request =
+   *       GetScopeRequest.newBuilder()
+   *           .setName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
+   *           .build();
+   *   ApiFuture future = observabilityClient.getScopeCallable().futureCall(request);
+   *   // Do something.
+   *   Scope response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getScopeCallable() { + return stub.getScopeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Scope. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   Scope scope = Scope.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Scope response = observabilityClient.updateScope(scope, updateMask);
+   * }
+   * }
+ * + * @param scope Required. The resource being updated. + * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * Scope resource by the update. The fields specified in the update_mask are relative to the + * resource, not the full request. A field is overwritten when it is in the mask. If the user + * does not provide a mask, then all fields present in the request are overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Scope updateScope(Scope scope, FieldMask updateMask) { + UpdateScopeRequest request = + UpdateScopeRequest.newBuilder().setScope(scope).setUpdateMask(updateMask).build(); + return updateScope(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Scope. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   UpdateScopeRequest request =
+   *       UpdateScopeRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setScope(Scope.newBuilder().build())
+   *           .build();
+   *   Scope response = observabilityClient.updateScope(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 Scope updateScope(UpdateScopeRequest request) { + return updateScopeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Scope. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   BucketName name = BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]");
+   *   Bucket response = observabilityClient.getBucket(name);
+   * }
+   * }
+ * + * @param name Required. Name of the bucket to retrieve. The format is: + *

projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID] + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Bucket getBucket(@Nullable BucketName name) { + GetBucketRequest request = + GetBucketRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getBucket(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get bucket resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   String name = BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString();
+   *   Bucket response = observabilityClient.getBucket(name);
+   * }
+   * }
+ * + * @param name Required. Name of the bucket to retrieve. The format is: + *

projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID] + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Bucket getBucket(String name) { + GetBucketRequest request = GetBucketRequest.newBuilder().setName(name).build(); + return getBucket(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get bucket resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   GetBucketRequest request =
+   *       GetBucketRequest.newBuilder()
+   *           .setName(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString())
+   *           .build();
+   *   Bucket response = observabilityClient.getBucket(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Bucket getBucket(GetBucketRequest request) { + return getBucketCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get bucket resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   GetBucketRequest request =
+   *       GetBucketRequest.newBuilder()
+   *           .setName(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString())
+   *           .build();
+   *   ApiFuture future = observabilityClient.getBucketCallable().futureCall(request);
+   *   // Do something.
+   *   Bucket response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getBucketCallable() { + return stub.getBucketCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List buckets of a project in a particular location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Bucket element : observabilityClient.listBuckets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of buckets. The format is: + *

projects/[PROJECT_ID]/locations/[LOCATION] + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBucketsPagedResponse listBuckets(@Nullable LocationName parent) { + ListBucketsRequest request = + ListBucketsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listBuckets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List buckets of a project in a particular location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Bucket element : observabilityClient.listBuckets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of buckets. The format is: + *

projects/[PROJECT_ID]/locations/[LOCATION] + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBucketsPagedResponse listBuckets(String parent) { + ListBucketsRequest request = ListBucketsRequest.newBuilder().setParent(parent).build(); + return listBuckets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List buckets of a project in a particular location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   ListBucketsRequest request =
+   *       ListBucketsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   for (Bucket element : observabilityClient.listBuckets(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBucketsPagedResponse listBuckets(ListBucketsRequest request) { + return listBucketsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List buckets of a project in a particular location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   ListBucketsRequest request =
+   *       ListBucketsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   ApiFuture future = observabilityClient.listBucketsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Bucket element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listBucketsPagedCallable() { + return stub.listBucketsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List buckets of a project in a particular location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   ListBucketsRequest request =
+   *       ListBucketsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   while (true) {
+   *     ListBucketsResponse response = observabilityClient.listBucketsCallable().call(request);
+   *     for (Bucket element : response.getBucketsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listBucketsCallable() { + return stub.listBucketsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a new bucket. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Bucket bucket = Bucket.newBuilder().build();
+   *   String bucketId = "bucketId-1603305307";
+   *   Bucket response = observabilityClient.createBucketAsync(parent, bucket, bucketId).get();
+   * }
+   * }
+ * + * @param parent Required. Name of the project and location for the bucket. The format is: + *

projects/[PROJECT_ID]/locations/[LOCATION] + * @param bucket Required. Bucket to create. + * @param bucketId Required. Id of the bucket to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createBucketAsync( + @Nullable LocationName parent, Bucket bucket, String bucketId) { + CreateBucketRequest request = + CreateBucketRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setBucket(bucket) + .setBucketId(bucketId) + .build(); + return createBucketAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a new bucket. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Bucket bucket = Bucket.newBuilder().build();
+   *   String bucketId = "bucketId-1603305307";
+   *   Bucket response = observabilityClient.createBucketAsync(parent, bucket, bucketId).get();
+   * }
+   * }
+ * + * @param parent Required. Name of the project and location for the bucket. The format is: + *

projects/[PROJECT_ID]/locations/[LOCATION] + * @param bucket Required. Bucket to create. + * @param bucketId Required. Id of the bucket to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createBucketAsync( + String parent, Bucket bucket, String bucketId) { + CreateBucketRequest request = + CreateBucketRequest.newBuilder() + .setParent(parent) + .setBucket(bucket) + .setBucketId(bucketId) + .build(); + return createBucketAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a new bucket. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   CreateBucketRequest request =
+   *       CreateBucketRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setBucketId("bucketId-1603305307")
+   *           .setBucket(Bucket.newBuilder().build())
+   *           .build();
+   *   Bucket response = observabilityClient.createBucketAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createBucketAsync( + CreateBucketRequest request) { + return createBucketOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a new bucket. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   CreateBucketRequest request =
+   *       CreateBucketRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setBucketId("bucketId-1603305307")
+   *           .setBucket(Bucket.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       observabilityClient.createBucketOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Bucket response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createBucketOperationCallable() { + return stub.createBucketOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a new bucket. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   CreateBucketRequest request =
+   *       CreateBucketRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setBucketId("bucketId-1603305307")
+   *           .setBucket(Bucket.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = observabilityClient.createBucketCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createBucketCallable() { + return stub.createBucketCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a bucket. + * + *

Sample code: + * + *

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

The name field of bucket identifies the resource to update. + * @param updateMask Optional. The list of fields to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateBucketAsync( + Bucket bucket, FieldMask updateMask) { + UpdateBucketRequest request = + UpdateBucketRequest.newBuilder().setBucket(bucket).setUpdateMask(updateMask).build(); + return updateBucketAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a bucket. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   UpdateBucketRequest request =
+   *       UpdateBucketRequest.newBuilder()
+   *           .setBucket(Bucket.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Bucket response = observabilityClient.updateBucketAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateBucketAsync( + UpdateBucketRequest request) { + return updateBucketOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a bucket. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   UpdateBucketRequest request =
+   *       UpdateBucketRequest.newBuilder()
+   *           .setBucket(Bucket.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       observabilityClient.updateBucketOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Bucket response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateBucketOperationCallable() { + return stub.updateBucketOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a bucket. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]");
+   *   Dataset response = observabilityClient.getDataset(name);
+   * }
+   * }
+ * + * @param name Required. Name of the dataset to retrieve. The format is: + *

projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID] + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Dataset getDataset(@Nullable DatasetName name) { + GetDatasetRequest request = + GetDatasetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getDataset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a dataset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   String name = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString();
+   *   Dataset response = observabilityClient.getDataset(name);
+   * }
+   * }
+ * + * @param name Required. Name of the dataset to retrieve. The format is: + *

projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID] + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Dataset getDataset(String name) { + GetDatasetRequest request = GetDatasetRequest.newBuilder().setName(name).build(); + return getDataset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a dataset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   GetDatasetRequest request =
+   *       GetDatasetRequest.newBuilder()
+   *           .setName(
+   *               DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString())
+   *           .build();
+   *   Dataset response = observabilityClient.getDataset(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 Dataset getDataset(GetDatasetRequest request) { + return getDatasetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a dataset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   GetDatasetRequest request =
+   *       GetDatasetRequest.newBuilder()
+   *           .setName(
+   *               DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString())
+   *           .build();
+   *   ApiFuture future = observabilityClient.getDatasetCallable().futureCall(request);
+   *   // Do something.
+   *   Dataset response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getDatasetCallable() { + return stub.getDatasetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List datasets of a bucket. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   BucketName parent = BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]");
+   *   for (Dataset element : observabilityClient.listDatasets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent bucket that owns this collection of datasets. The format is: + *

projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID] + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDatasetsPagedResponse listDatasets(@Nullable BucketName parent) { + ListDatasetsRequest request = + ListDatasetsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDatasets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List datasets of a bucket. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   String parent = BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString();
+   *   for (Dataset element : observabilityClient.listDatasets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent bucket that owns this collection of datasets. The format is: + *

projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID] + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDatasetsPagedResponse listDatasets(String parent) { + ListDatasetsRequest request = ListDatasetsRequest.newBuilder().setParent(parent).build(); + return listDatasets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List datasets of a bucket. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   ListDatasetsRequest request =
+   *       ListDatasetsRequest.newBuilder()
+   *           .setParent(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   for (Dataset element : observabilityClient.listDatasets(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 ListDatasetsPagedResponse listDatasets(ListDatasetsRequest request) { + return listDatasetsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List datasets of a bucket. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   ListDatasetsRequest request =
+   *       ListDatasetsRequest.newBuilder()
+   *           .setParent(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   ApiFuture future =
+   *       observabilityClient.listDatasetsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Dataset element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDatasetsPagedCallable() { + return stub.listDatasetsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List datasets of a bucket. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   ListDatasetsRequest request =
+   *       ListDatasetsRequest.newBuilder()
+   *           .setParent(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   while (true) {
+   *     ListDatasetsResponse response = observabilityClient.listDatasetsCallable().call(request);
+   *     for (Dataset element : response.getDatasetsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listDatasetsCallable() { + return stub.listDatasetsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a view. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   ViewName name = ViewName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[VIEW]");
+   *   View response = observabilityClient.getView(name);
+   * }
+   * }
+ * + * @param name Required. Name of the view to retrieve. The format is: + *

projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[VIEW_ID] + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final View getView(@Nullable ViewName name) { + GetViewRequest request = + GetViewRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getView(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a view. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   String name =
+   *       ViewName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[VIEW]").toString();
+   *   View response = observabilityClient.getView(name);
+   * }
+   * }
+ * + * @param name Required. Name of the view to retrieve. The format is: + *

projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[VIEW_ID] + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final View getView(String name) { + GetViewRequest request = GetViewRequest.newBuilder().setName(name).build(); + return getView(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a view. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   GetViewRequest request =
+   *       GetViewRequest.newBuilder()
+   *           .setName(
+   *               ViewName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[VIEW]")
+   *                   .toString())
+   *           .build();
+   *   View response = observabilityClient.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 View getView(GetViewRequest request) { + return getViewCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a view. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   GetViewRequest request =
+   *       GetViewRequest.newBuilder()
+   *           .setName(
+   *               ViewName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[VIEW]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = observabilityClient.getViewCallable().futureCall(request);
+   *   // Do something.
+   *   View response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getViewCallable() { + return stub.getViewCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List views of a dataset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]");
+   *   for (View element : observabilityClient.listViews(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Dataset whose views are to be listed. The format is: + *

projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID] + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListViewsPagedResponse listViews(@Nullable DatasetName parent) { + ListViewsRequest request = + ListViewsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listViews(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List views of a dataset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   String parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString();
+   *   for (View element : observabilityClient.listViews(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Dataset whose views are to be listed. The format is: + *

projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_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. + /** + * List views of a dataset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   ListViewsRequest request =
+   *       ListViewsRequest.newBuilder()
+   *           .setParent(
+   *               DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (View element : observabilityClient.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. + /** + * List views of a dataset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   ListViewsRequest request =
+   *       ListViewsRequest.newBuilder()
+   *           .setParent(
+   *               DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = observabilityClient.listViewsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (View element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listViewsPagedCallable() { + return stub.listViewsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List views of a dataset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   ListViewsRequest request =
+   *       ListViewsRequest.newBuilder()
+   *           .setParent(
+   *               DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListViewsResponse response = observabilityClient.listViewsCallable().call(request);
+   *     for (View 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. + /** + * Get a link. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   LinkName name = LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]");
+   *   Link response = observabilityClient.getLink(name);
+   * }
+   * }
+ * + * @param name Required. Name of the link to retrieve. The format is: + *

projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID] + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Link getLink(@Nullable LinkName name) { + GetLinkRequest request = + GetLinkRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getLink(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a link. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   String name =
+   *       LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]").toString();
+   *   Link response = observabilityClient.getLink(name);
+   * }
+   * }
+ * + * @param name Required. Name of the link to retrieve. The format is: + *

projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID] + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Link getLink(String name) { + GetLinkRequest request = GetLinkRequest.newBuilder().setName(name).build(); + return getLink(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a link. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   GetLinkRequest request =
+   *       GetLinkRequest.newBuilder()
+   *           .setName(
+   *               LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]")
+   *                   .toString())
+   *           .build();
+   *   Link response = observabilityClient.getLink(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 Link getLink(GetLinkRequest request) { + return getLinkCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a link. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   GetLinkRequest request =
+   *       GetLinkRequest.newBuilder()
+   *           .setName(
+   *               LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = observabilityClient.getLinkCallable().futureCall(request);
+   *   // Do something.
+   *   Link response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLinkCallable() { + return stub.getLinkCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List links of a dataset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]");
+   *   for (Link element : observabilityClient.listLinks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent dataset that owns this collection of links. The format is: + *

projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID] + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLinksPagedResponse listLinks(@Nullable DatasetName parent) { + ListLinksRequest request = + ListLinksRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listLinks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List links of a dataset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   String parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString();
+   *   for (Link element : observabilityClient.listLinks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent dataset that owns this collection of links. The format is: + *

projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID] + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLinksPagedResponse listLinks(String parent) { + ListLinksRequest request = ListLinksRequest.newBuilder().setParent(parent).build(); + return listLinks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List links of a dataset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   ListLinksRequest request =
+   *       ListLinksRequest.newBuilder()
+   *           .setParent(
+   *               DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Link element : observabilityClient.listLinks(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 ListLinksPagedResponse listLinks(ListLinksRequest request) { + return listLinksPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List links of a dataset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   ListLinksRequest request =
+   *       ListLinksRequest.newBuilder()
+   *           .setParent(
+   *               DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = observabilityClient.listLinksPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Link element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLinksPagedCallable() { + return stub.listLinksPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List links of a dataset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   ListLinksRequest request =
+   *       ListLinksRequest.newBuilder()
+   *           .setParent(
+   *               DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLinksResponse response = observabilityClient.listLinksCallable().call(request);
+   *     for (Link element : response.getLinksList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLinksCallable() { + return stub.listLinksCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a new link. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]");
+   *   Link link = Link.newBuilder().build();
+   *   String linkId = "linkId-1102667083";
+   *   Link response = observabilityClient.createLinkAsync(parent, link, linkId).get();
+   * }
+   * }
+ * + * @param parent Required. Name of the containing dataset for this link. The format is: + *

projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID] + * @param link Required. Link to create. + * @param linkId Required. Id of the link to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createLinkAsync( + @Nullable DatasetName parent, Link link, String linkId) { + CreateLinkRequest request = + CreateLinkRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setLink(link) + .setLinkId(linkId) + .build(); + return createLinkAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a new link. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   String parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString();
+   *   Link link = Link.newBuilder().build();
+   *   String linkId = "linkId-1102667083";
+   *   Link response = observabilityClient.createLinkAsync(parent, link, linkId).get();
+   * }
+   * }
+ * + * @param parent Required. Name of the containing dataset for this link. The format is: + *

projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID] + * @param link Required. Link to create. + * @param linkId Required. Id of the link to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createLinkAsync( + String parent, Link link, String linkId) { + CreateLinkRequest request = + CreateLinkRequest.newBuilder().setParent(parent).setLink(link).setLinkId(linkId).build(); + return createLinkAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a new link. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   CreateLinkRequest request =
+   *       CreateLinkRequest.newBuilder()
+   *           .setParent(
+   *               DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString())
+   *           .setLinkId("linkId-1102667083")
+   *           .setLink(Link.newBuilder().build())
+   *           .build();
+   *   Link response = observabilityClient.createLinkAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createLinkAsync(CreateLinkRequest request) { + return createLinkOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a new link. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   CreateLinkRequest request =
+   *       CreateLinkRequest.newBuilder()
+   *           .setParent(
+   *               DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString())
+   *           .setLinkId("linkId-1102667083")
+   *           .setLink(Link.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       observabilityClient.createLinkOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Link response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createLinkOperationCallable() { + return stub.createLinkOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a new link. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   CreateLinkRequest request =
+   *       CreateLinkRequest.newBuilder()
+   *           .setParent(
+   *               DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString())
+   *           .setLinkId("linkId-1102667083")
+   *           .setLink(Link.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = observabilityClient.createLinkCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createLinkCallable() { + return stub.createLinkCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a link. + * + *

Sample code: + * + *

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

The name field of link identifies the resource to update. + * @param updateMask Optional. The list of fields to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateLinkAsync( + Link link, FieldMask updateMask) { + UpdateLinkRequest request = + UpdateLinkRequest.newBuilder().setLink(link).setUpdateMask(updateMask).build(); + return updateLinkAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a link. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   UpdateLinkRequest request =
+   *       UpdateLinkRequest.newBuilder()
+   *           .setLink(Link.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Link response = observabilityClient.updateLinkAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateLinkAsync(UpdateLinkRequest request) { + return updateLinkOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a link. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   UpdateLinkRequest request =
+   *       UpdateLinkRequest.newBuilder()
+   *           .setLink(Link.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       observabilityClient.updateLinkOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Link response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateLinkOperationCallable() { + return stub.updateLinkOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a link. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   LinkName name = LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]");
+   *   observabilityClient.deleteLinkAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the link to delete. The format is: + *

projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID] + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteLinkAsync(@Nullable LinkName name) { + DeleteLinkRequest request = + DeleteLinkRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteLinkAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a link. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   String name =
+   *       LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]").toString();
+   *   observabilityClient.deleteLinkAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the link to delete. The format is: + *

projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID] + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteLinkAsync(String name) { + DeleteLinkRequest request = DeleteLinkRequest.newBuilder().setName(name).build(); + return deleteLinkAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a link. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   DeleteLinkRequest request =
+   *       DeleteLinkRequest.newBuilder()
+   *           .setName(
+   *               LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]")
+   *                   .toString())
+   *           .build();
+   *   observabilityClient.deleteLinkAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteLinkAsync( + DeleteLinkRequest request) { + return deleteLinkOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a link. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   DeleteLinkRequest request =
+   *       DeleteLinkRequest.newBuilder()
+   *           .setName(
+   *               LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       observabilityClient.deleteLinkOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteLinkOperationCallable() { + return stub.deleteLinkOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a link. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   DeleteLinkRequest request =
+   *       DeleteLinkRequest.newBuilder()
+   *           .setName(
+   *               LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = observabilityClient.deleteLinkCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteLinkCallable() { + return stub.deleteLinkCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get TraceScope resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   TraceScopeName name = TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]");
+   *   TraceScope response = observabilityClient.getTraceScope(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the trace scope: + *

projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID] + *

For example: + *

projects/my-project/locations/global/traceScopes/my-trace-scope + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TraceScope getTraceScope(@Nullable TraceScopeName name) { + GetTraceScopeRequest request = + GetTraceScopeRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getTraceScope(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get TraceScope resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   String name = TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString();
+   *   TraceScope response = observabilityClient.getTraceScope(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the trace scope: + *

projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID] + *

For example: + *

projects/my-project/locations/global/traceScopes/my-trace-scope + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TraceScope getTraceScope(String name) { + GetTraceScopeRequest request = GetTraceScopeRequest.newBuilder().setName(name).build(); + return getTraceScope(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get TraceScope resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   GetTraceScopeRequest request =
+   *       GetTraceScopeRequest.newBuilder()
+   *           .setName(TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString())
+   *           .build();
+   *   TraceScope response = observabilityClient.getTraceScope(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 TraceScope getTraceScope(GetTraceScopeRequest request) { + return getTraceScopeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get TraceScope resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   GetTraceScopeRequest request =
+   *       GetTraceScopeRequest.newBuilder()
+   *           .setName(TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       observabilityClient.getTraceScopeCallable().futureCall(request);
+   *   // Do something.
+   *   TraceScope response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getTraceScopeCallable() { + return stub.getTraceScopeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List TraceScopes of a project in a particular location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (TraceScope element : observabilityClient.listTraceScopes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The full resource name of the location to look for trace scopes: + *

projects/[PROJECT_ID]/locations/[LOCATION_ID] + *

For example: + *

projects/my-project/locations/global + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTraceScopesPagedResponse listTraceScopes(@Nullable LocationName parent) { + ListTraceScopesRequest request = + ListTraceScopesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listTraceScopes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List TraceScopes of a project in a particular location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (TraceScope element : observabilityClient.listTraceScopes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The full resource name of the location to look for trace scopes: + *

projects/[PROJECT_ID]/locations/[LOCATION_ID] + *

For example: + *

projects/my-project/locations/global + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTraceScopesPagedResponse listTraceScopes(String parent) { + ListTraceScopesRequest request = ListTraceScopesRequest.newBuilder().setParent(parent).build(); + return listTraceScopes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List TraceScopes of a project in a particular location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   ListTraceScopesRequest request =
+   *       ListTraceScopesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (TraceScope element : observabilityClient.listTraceScopes(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 ListTraceScopesPagedResponse listTraceScopes(ListTraceScopesRequest request) { + return listTraceScopesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List TraceScopes of a project in a particular location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   ListTraceScopesRequest request =
+   *       ListTraceScopesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       observabilityClient.listTraceScopesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (TraceScope element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listTraceScopesPagedCallable() { + return stub.listTraceScopesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List TraceScopes of a project in a particular location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   ListTraceScopesRequest request =
+   *       ListTraceScopesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListTraceScopesResponse response =
+   *         observabilityClient.listTraceScopesCallable().call(request);
+   *     for (TraceScope element : response.getTraceScopesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listTraceScopesCallable() { + return stub.listTraceScopesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a new TraceScope. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   TraceScope traceScope = TraceScope.newBuilder().build();
+   *   String traceScopeId = "traceScopeId-2107793014";
+   *   TraceScope response = observabilityClient.createTraceScope(parent, traceScope, traceScopeId);
+   * }
+   * }
+ * + * @param parent Required. The full resource name of the location where the trace scope should be + * created + *

projects/[PROJECT_ID]/locations/[LOCATION_ID] + *

For example: + *

projects/my-project/locations/global + * @param traceScope Required. The new trace scope. + * @param traceScopeId Required. A client-assigned identifier for the trace scope. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TraceScope createTraceScope( + @Nullable LocationName parent, TraceScope traceScope, String traceScopeId) { + CreateTraceScopeRequest request = + CreateTraceScopeRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTraceScope(traceScope) + .setTraceScopeId(traceScopeId) + .build(); + return createTraceScope(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a new TraceScope. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   TraceScope traceScope = TraceScope.newBuilder().build();
+   *   String traceScopeId = "traceScopeId-2107793014";
+   *   TraceScope response = observabilityClient.createTraceScope(parent, traceScope, traceScopeId);
+   * }
+   * }
+ * + * @param parent Required. The full resource name of the location where the trace scope should be + * created + *

projects/[PROJECT_ID]/locations/[LOCATION_ID] + *

For example: + *

projects/my-project/locations/global + * @param traceScope Required. The new trace scope. + * @param traceScopeId Required. A client-assigned identifier for the trace scope. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TraceScope createTraceScope( + String parent, TraceScope traceScope, String traceScopeId) { + CreateTraceScopeRequest request = + CreateTraceScopeRequest.newBuilder() + .setParent(parent) + .setTraceScope(traceScope) + .setTraceScopeId(traceScopeId) + .build(); + return createTraceScope(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a new TraceScope. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   CreateTraceScopeRequest request =
+   *       CreateTraceScopeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setTraceScopeId("traceScopeId-2107793014")
+   *           .setTraceScope(TraceScope.newBuilder().build())
+   *           .build();
+   *   TraceScope response = observabilityClient.createTraceScope(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 TraceScope createTraceScope(CreateTraceScopeRequest request) { + return createTraceScopeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a new TraceScope. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   CreateTraceScopeRequest request =
+   *       CreateTraceScopeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setTraceScopeId("traceScopeId-2107793014")
+   *           .setTraceScope(TraceScope.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       observabilityClient.createTraceScopeCallable().futureCall(request);
+   *   // Do something.
+   *   TraceScope response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createTraceScopeCallable() { + return stub.createTraceScopeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a TraceScope. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   UpdateTraceScopeRequest request =
+   *       UpdateTraceScopeRequest.newBuilder()
+   *           .setTraceScope(TraceScope.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   TraceScope response = observabilityClient.updateTraceScope(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 TraceScope updateTraceScope(UpdateTraceScopeRequest request) { + return updateTraceScopeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a TraceScope. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   TraceScopeName name = TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]");
+   *   observabilityClient.deleteTraceScope(name);
+   * }
+   * }
+ * + * @param name Required. The full resource name of the trace scope to delete: + *

projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID] + *

For example: + *

projects/my-project/locations/global/traceScopes/my-trace-scope + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTraceScope(@Nullable TraceScopeName name) { + DeleteTraceScopeRequest request = + DeleteTraceScopeRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteTraceScope(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a TraceScope. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   String name = TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString();
+   *   observabilityClient.deleteTraceScope(name);
+   * }
+   * }
+ * + * @param name Required. The full resource name of the trace scope to delete: + *

projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID] + *

For example: + *

projects/my-project/locations/global/traceScopes/my-trace-scope + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTraceScope(String name) { + DeleteTraceScopeRequest request = DeleteTraceScopeRequest.newBuilder().setName(name).build(); + deleteTraceScope(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a TraceScope. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   DeleteTraceScopeRequest request =
+   *       DeleteTraceScopeRequest.newBuilder()
+   *           .setName(TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString())
+   *           .build();
+   *   observabilityClient.deleteTraceScope(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 deleteTraceScope(DeleteTraceScopeRequest request) { + deleteTraceScopeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a TraceScope. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   DeleteTraceScopeRequest request =
+   *       DeleteTraceScopeRequest.newBuilder()
+   *           .setName(TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString())
+   *           .build();
+   *   ApiFuture future = observabilityClient.deleteTraceScopeCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteTraceScopeCallable() { + return stub.deleteTraceScopeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get Settings + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   SettingsName name = SettingsName.ofProjectLocationName("[PROJECT]", "[LOCATION]");
+   *   Settings response = observabilityClient.getSettings(name);
+   * }
+   * }
+ * + * @param name Required. Name of the settings to retrieve. + *

Name format: + *

"projects/[PROJECT_ID]/locations/[LOCATION]/settings" + * "folders/[FOLDER_ID]/locations/[LOCATION]/settings" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION]/settings" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Settings getSettings(@Nullable SettingsName name) { + GetSettingsRequest request = + GetSettingsRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getSettings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get Settings + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   String name = SettingsName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString();
+   *   Settings response = observabilityClient.getSettings(name);
+   * }
+   * }
+ * + * @param name Required. Name of the settings to retrieve. + *

Name format: + *

"projects/[PROJECT_ID]/locations/[LOCATION]/settings" + * "folders/[FOLDER_ID]/locations/[LOCATION]/settings" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION]/settings" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Settings getSettings(String name) { + GetSettingsRequest request = GetSettingsRequest.newBuilder().setName(name).build(); + return getSettings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get Settings + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

The name field of settings is used to identify the resource to be updated. + * @param updateMask Optional. The field mask specifying which fields of the settings are to be + * updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateSettingsAsync( + Settings settings, FieldMask updateMask) { + UpdateSettingsRequest request = + UpdateSettingsRequest.newBuilder().setSettings(settings).setUpdateMask(updateMask).build(); + return updateSettingsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update Settings + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

This method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : observabilityClient.listLocations(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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

This method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       observabilityClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

This method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response = observabilityClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = observabilityClient.getLocation(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 Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = observabilityClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListBucketsPagedResponse + extends AbstractPagedListResponse< + ListBucketsRequest, + ListBucketsResponse, + Bucket, + ListBucketsPage, + ListBucketsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListBucketsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListBucketsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListBucketsPagedResponse(ListBucketsPage page) { + super(page, ListBucketsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListBucketsPage + extends AbstractPage { + + private ListBucketsPage( + @Nullable PageContext context, + @Nullable ListBucketsResponse response) { + super(context, response); + } + + private static ListBucketsPage createEmptyPage() { + return new ListBucketsPage(null, null); + } + + @Override + protected ListBucketsPage createPage( + @Nullable PageContext context, + @Nullable ListBucketsResponse response) { + return new ListBucketsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListBucketsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListBucketsRequest, + ListBucketsResponse, + Bucket, + ListBucketsPage, + ListBucketsFixedSizeCollection> { + + private ListBucketsFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListBucketsFixedSizeCollection createEmptyCollection() { + return new ListBucketsFixedSizeCollection(null, 0); + } + + @Override + protected ListBucketsFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListBucketsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListDatasetsPagedResponse + extends AbstractPagedListResponse< + ListDatasetsRequest, + ListDatasetsResponse, + Dataset, + ListDatasetsPage, + ListDatasetsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDatasetsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListDatasetsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListDatasetsPagedResponse(ListDatasetsPage page) { + super(page, ListDatasetsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDatasetsPage + extends AbstractPage { + + private ListDatasetsPage( + @Nullable PageContext context, + @Nullable ListDatasetsResponse response) { + super(context, response); + } + + private static ListDatasetsPage createEmptyPage() { + return new ListDatasetsPage(null, null); + } + + @Override + protected ListDatasetsPage createPage( + @Nullable PageContext context, + @Nullable ListDatasetsResponse response) { + return new ListDatasetsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDatasetsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDatasetsRequest, + ListDatasetsResponse, + Dataset, + ListDatasetsPage, + ListDatasetsFixedSizeCollection> { + + private ListDatasetsFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDatasetsFixedSizeCollection createEmptyCollection() { + return new ListDatasetsFixedSizeCollection(null, 0); + } + + @Override + protected ListDatasetsFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListDatasetsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListViewsPagedResponse + extends AbstractPagedListResponse< + ListViewsRequest, ListViewsResponse, View, ListViewsPage, ListViewsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListViewsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListViewsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListViewsPagedResponse(ListViewsPage page) { + super(page, ListViewsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListViewsPage + extends AbstractPage { + + private ListViewsPage( + @Nullable PageContext context, + @Nullable ListViewsResponse response) { + super(context, response); + } + + private static ListViewsPage createEmptyPage() { + return new ListViewsPage(null, null); + } + + @Override + protected ListViewsPage createPage( + @Nullable PageContext context, + @Nullable ListViewsResponse response) { + return new ListViewsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListViewsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListViewsRequest, ListViewsResponse, View, ListViewsPage, ListViewsFixedSizeCollection> { + + private ListViewsFixedSizeCollection(@Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListViewsFixedSizeCollection createEmptyCollection() { + return new ListViewsFixedSizeCollection(null, 0); + } + + @Override + protected ListViewsFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListViewsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLinksPagedResponse + extends AbstractPagedListResponse< + ListLinksRequest, ListLinksResponse, Link, ListLinksPage, ListLinksFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLinksPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListLinksPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListLinksPagedResponse(ListLinksPage page) { + super(page, ListLinksFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLinksPage + extends AbstractPage { + + private ListLinksPage( + @Nullable PageContext context, + @Nullable ListLinksResponse response) { + super(context, response); + } + + private static ListLinksPage createEmptyPage() { + return new ListLinksPage(null, null); + } + + @Override + protected ListLinksPage createPage( + @Nullable PageContext context, + @Nullable ListLinksResponse response) { + return new ListLinksPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLinksFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLinksRequest, ListLinksResponse, Link, ListLinksPage, ListLinksFixedSizeCollection> { + + private ListLinksFixedSizeCollection(@Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLinksFixedSizeCollection createEmptyCollection() { + return new ListLinksFixedSizeCollection(null, 0); + } + + @Override + protected ListLinksFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListLinksFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListTraceScopesPagedResponse + extends AbstractPagedListResponse< + ListTraceScopesRequest, + ListTraceScopesResponse, + TraceScope, + ListTraceScopesPage, + ListTraceScopesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListTraceScopesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListTraceScopesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListTraceScopesPagedResponse(ListTraceScopesPage page) { + super(page, ListTraceScopesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListTraceScopesPage + extends AbstractPage< + ListTraceScopesRequest, ListTraceScopesResponse, TraceScope, ListTraceScopesPage> { + + private ListTraceScopesPage( + @Nullable PageContext context, + @Nullable ListTraceScopesResponse response) { + super(context, response); + } + + private static ListTraceScopesPage createEmptyPage() { + return new ListTraceScopesPage(null, null); + } + + @Override + protected ListTraceScopesPage createPage( + @Nullable PageContext context, + @Nullable ListTraceScopesResponse response) { + return new ListTraceScopesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListTraceScopesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListTraceScopesRequest, + ListTraceScopesResponse, + TraceScope, + ListTraceScopesPage, + ListTraceScopesFixedSizeCollection> { + + private ListTraceScopesFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListTraceScopesFixedSizeCollection createEmptyCollection() { + return new ListTraceScopesFixedSizeCollection(null, 0); + } + + @Override + protected ListTraceScopesFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListTraceScopesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + @Nullable PageContext context, + @Nullable ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + @Nullable PageContext context, + @Nullable ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/ObservabilitySettings.java b/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/ObservabilitySettings.java new file mode 100644 index 000000000000..a7187cd7c29a --- /dev/null +++ b/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/ObservabilitySettings.java @@ -0,0 +1,578 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.cloud.observability.v1; + +import static com.google.cloud.observability.v1.ObservabilityClient.ListBucketsPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListDatasetsPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListLinksPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListLocationsPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListTraceScopesPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListViewsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.observability.v1.stub.ObservabilityStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ObservabilityClient}. + * + *

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

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

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

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

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

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ObservabilitySettings.Builder observabilitySettingsBuilder = ObservabilitySettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * observabilitySettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@NullMarked +@Generated("by gapic-generator-java") +public class ObservabilitySettings extends ClientSettings { + + /** Returns the object with the settings used for calls to getScope. */ + public UnaryCallSettings getScopeSettings() { + return ((ObservabilityStubSettings) getStubSettings()).getScopeSettings(); + } + + /** Returns the object with the settings used for calls to updateScope. */ + public UnaryCallSettings updateScopeSettings() { + return ((ObservabilityStubSettings) getStubSettings()).updateScopeSettings(); + } + + /** Returns the object with the settings used for calls to getBucket. */ + public UnaryCallSettings getBucketSettings() { + return ((ObservabilityStubSettings) getStubSettings()).getBucketSettings(); + } + + /** Returns the object with the settings used for calls to listBuckets. */ + public PagedCallSettings + listBucketsSettings() { + return ((ObservabilityStubSettings) getStubSettings()).listBucketsSettings(); + } + + /** Returns the object with the settings used for calls to createBucket. */ + public UnaryCallSettings createBucketSettings() { + return ((ObservabilityStubSettings) getStubSettings()).createBucketSettings(); + } + + /** Returns the object with the settings used for calls to createBucket. */ + public OperationCallSettings + createBucketOperationSettings() { + return ((ObservabilityStubSettings) getStubSettings()).createBucketOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateBucket. */ + public UnaryCallSettings updateBucketSettings() { + return ((ObservabilityStubSettings) getStubSettings()).updateBucketSettings(); + } + + /** Returns the object with the settings used for calls to updateBucket. */ + public OperationCallSettings + updateBucketOperationSettings() { + return ((ObservabilityStubSettings) getStubSettings()).updateBucketOperationSettings(); + } + + /** Returns the object with the settings used for calls to getDataset. */ + public UnaryCallSettings getDatasetSettings() { + return ((ObservabilityStubSettings) getStubSettings()).getDatasetSettings(); + } + + /** Returns the object with the settings used for calls to listDatasets. */ + public PagedCallSettings + listDatasetsSettings() { + return ((ObservabilityStubSettings) getStubSettings()).listDatasetsSettings(); + } + + /** Returns the object with the settings used for calls to getView. */ + public UnaryCallSettings getViewSettings() { + return ((ObservabilityStubSettings) getStubSettings()).getViewSettings(); + } + + /** Returns the object with the settings used for calls to listViews. */ + public PagedCallSettings + listViewsSettings() { + return ((ObservabilityStubSettings) getStubSettings()).listViewsSettings(); + } + + /** Returns the object with the settings used for calls to getLink. */ + public UnaryCallSettings getLinkSettings() { + return ((ObservabilityStubSettings) getStubSettings()).getLinkSettings(); + } + + /** Returns the object with the settings used for calls to listLinks. */ + public PagedCallSettings + listLinksSettings() { + return ((ObservabilityStubSettings) getStubSettings()).listLinksSettings(); + } + + /** Returns the object with the settings used for calls to createLink. */ + public UnaryCallSettings createLinkSettings() { + return ((ObservabilityStubSettings) getStubSettings()).createLinkSettings(); + } + + /** Returns the object with the settings used for calls to createLink. */ + public OperationCallSettings + createLinkOperationSettings() { + return ((ObservabilityStubSettings) getStubSettings()).createLinkOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateLink. */ + public UnaryCallSettings updateLinkSettings() { + return ((ObservabilityStubSettings) getStubSettings()).updateLinkSettings(); + } + + /** Returns the object with the settings used for calls to updateLink. */ + public OperationCallSettings + updateLinkOperationSettings() { + return ((ObservabilityStubSettings) getStubSettings()).updateLinkOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteLink. */ + public UnaryCallSettings deleteLinkSettings() { + return ((ObservabilityStubSettings) getStubSettings()).deleteLinkSettings(); + } + + /** Returns the object with the settings used for calls to deleteLink. */ + public OperationCallSettings + deleteLinkOperationSettings() { + return ((ObservabilityStubSettings) getStubSettings()).deleteLinkOperationSettings(); + } + + /** Returns the object with the settings used for calls to getTraceScope. */ + public UnaryCallSettings getTraceScopeSettings() { + return ((ObservabilityStubSettings) getStubSettings()).getTraceScopeSettings(); + } + + /** Returns the object with the settings used for calls to listTraceScopes. */ + public PagedCallSettings< + ListTraceScopesRequest, ListTraceScopesResponse, ListTraceScopesPagedResponse> + listTraceScopesSettings() { + return ((ObservabilityStubSettings) getStubSettings()).listTraceScopesSettings(); + } + + /** Returns the object with the settings used for calls to createTraceScope. */ + public UnaryCallSettings createTraceScopeSettings() { + return ((ObservabilityStubSettings) getStubSettings()).createTraceScopeSettings(); + } + + /** Returns the object with the settings used for calls to updateTraceScope. */ + public UnaryCallSettings updateTraceScopeSettings() { + return ((ObservabilityStubSettings) getStubSettings()).updateTraceScopeSettings(); + } + + /** Returns the object with the settings used for calls to deleteTraceScope. */ + public UnaryCallSettings deleteTraceScopeSettings() { + return ((ObservabilityStubSettings) getStubSettings()).deleteTraceScopeSettings(); + } + + /** Returns the object with the settings used for calls to getSettings. */ + public UnaryCallSettings getSettingsSettings() { + return ((ObservabilityStubSettings) getStubSettings()).getSettingsSettings(); + } + + /** Returns the object with the settings used for calls to updateSettings. */ + public UnaryCallSettings updateSettingsSettings() { + return ((ObservabilityStubSettings) getStubSettings()).updateSettingsSettings(); + } + + /** Returns the object with the settings used for calls to updateSettings. */ + public OperationCallSettings + updateSettingsOperationSettings() { + return ((ObservabilityStubSettings) getStubSettings()).updateSettingsOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((ObservabilityStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((ObservabilityStubSettings) getStubSettings()).getLocationSettings(); + } + + public static final ObservabilitySettings create(ObservabilityStubSettings stub) + throws IOException { + return new ObservabilitySettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ObservabilityStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ObservabilityStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ObservabilityStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ObservabilityStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ObservabilityStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ObservabilityStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ObservabilityStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ObservabilityStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(@Nullable ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ObservabilitySettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ObservabilitySettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(@Nullable ClientContext clientContext) { + super(ObservabilityStubSettings.newBuilder(clientContext)); + } + + protected Builder(ObservabilitySettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ObservabilityStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ObservabilityStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(ObservabilityStubSettings.newHttpJsonBuilder()); + } + + public ObservabilityStubSettings.Builder getStubSettingsBuilder() { + return ((ObservabilityStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to getScope. */ + public UnaryCallSettings.Builder getScopeSettings() { + return getStubSettingsBuilder().getScopeSettings(); + } + + /** Returns the builder for the settings used for calls to updateScope. */ + public UnaryCallSettings.Builder updateScopeSettings() { + return getStubSettingsBuilder().updateScopeSettings(); + } + + /** Returns the builder for the settings used for calls to getBucket. */ + public UnaryCallSettings.Builder getBucketSettings() { + return getStubSettingsBuilder().getBucketSettings(); + } + + /** Returns the builder for the settings used for calls to listBuckets. */ + public PagedCallSettings.Builder< + ListBucketsRequest, ListBucketsResponse, ListBucketsPagedResponse> + listBucketsSettings() { + return getStubSettingsBuilder().listBucketsSettings(); + } + + /** 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 createBucket. */ + public OperationCallSettings.Builder + createBucketOperationSettings() { + return getStubSettingsBuilder().createBucketOperationSettings(); + } + + /** 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 updateBucket. */ + public OperationCallSettings.Builder + updateBucketOperationSettings() { + return getStubSettingsBuilder().updateBucketOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getDataset. */ + public UnaryCallSettings.Builder getDatasetSettings() { + return getStubSettingsBuilder().getDatasetSettings(); + } + + /** Returns the builder for the settings used for calls to listDatasets. */ + public PagedCallSettings.Builder< + ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse> + listDatasetsSettings() { + return getStubSettingsBuilder().listDatasetsSettings(); + } + + /** 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 listViews. */ + public PagedCallSettings.Builder + listViewsSettings() { + return getStubSettingsBuilder().listViewsSettings(); + } + + /** Returns the builder for the settings used for calls to getLink. */ + public UnaryCallSettings.Builder getLinkSettings() { + return getStubSettingsBuilder().getLinkSettings(); + } + + /** Returns the builder for the settings used for calls to listLinks. */ + public PagedCallSettings.Builder + listLinksSettings() { + return getStubSettingsBuilder().listLinksSettings(); + } + + /** Returns the builder for the settings used for calls to createLink. */ + public UnaryCallSettings.Builder createLinkSettings() { + return getStubSettingsBuilder().createLinkSettings(); + } + + /** Returns the builder for the settings used for calls to createLink. */ + public OperationCallSettings.Builder + createLinkOperationSettings() { + return getStubSettingsBuilder().createLinkOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateLink. */ + public UnaryCallSettings.Builder updateLinkSettings() { + return getStubSettingsBuilder().updateLinkSettings(); + } + + /** Returns the builder for the settings used for calls to updateLink. */ + public OperationCallSettings.Builder + updateLinkOperationSettings() { + return getStubSettingsBuilder().updateLinkOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteLink. */ + public UnaryCallSettings.Builder deleteLinkSettings() { + return getStubSettingsBuilder().deleteLinkSettings(); + } + + /** Returns the builder for the settings used for calls to deleteLink. */ + public OperationCallSettings.Builder + deleteLinkOperationSettings() { + return getStubSettingsBuilder().deleteLinkOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getTraceScope. */ + public UnaryCallSettings.Builder getTraceScopeSettings() { + return getStubSettingsBuilder().getTraceScopeSettings(); + } + + /** Returns the builder for the settings used for calls to listTraceScopes. */ + public PagedCallSettings.Builder< + ListTraceScopesRequest, ListTraceScopesResponse, ListTraceScopesPagedResponse> + listTraceScopesSettings() { + return getStubSettingsBuilder().listTraceScopesSettings(); + } + + /** Returns the builder for the settings used for calls to createTraceScope. */ + public UnaryCallSettings.Builder + createTraceScopeSettings() { + return getStubSettingsBuilder().createTraceScopeSettings(); + } + + /** Returns the builder for the settings used for calls to updateTraceScope. */ + public UnaryCallSettings.Builder + updateTraceScopeSettings() { + return getStubSettingsBuilder().updateTraceScopeSettings(); + } + + /** Returns the builder for the settings used for calls to deleteTraceScope. */ + public UnaryCallSettings.Builder deleteTraceScopeSettings() { + return getStubSettingsBuilder().deleteTraceScopeSettings(); + } + + /** Returns the builder for the settings used for calls to getSettings. */ + public UnaryCallSettings.Builder getSettingsSettings() { + return getStubSettingsBuilder().getSettingsSettings(); + } + + /** Returns the builder for the settings used for calls to updateSettings. */ + public UnaryCallSettings.Builder updateSettingsSettings() { + return getStubSettingsBuilder().updateSettingsSettings(); + } + + /** Returns the builder for the settings used for calls to updateSettings. */ + public OperationCallSettings.Builder + updateSettingsOperationSettings() { + return getStubSettingsBuilder().updateSettingsOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + @Override + public ObservabilitySettings build() throws IOException { + return new ObservabilitySettings(this); + } + } +} diff --git a/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/gapic_metadata.json b/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/gapic_metadata.json new file mode 100644 index 000000000000..b1af9332fd58 --- /dev/null +++ b/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/gapic_metadata.json @@ -0,0 +1,90 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.observability.v1", + "libraryPackage": "com.google.cloud.observability.v1", + "services": { + "Observability": { + "clients": { + "grpc": { + "libraryClient": "ObservabilityClient", + "rpcs": { + "CreateBucket": { + "methods": ["createBucketAsync", "createBucketAsync", "createBucketAsync", "createBucketOperationCallable", "createBucketCallable"] + }, + "CreateLink": { + "methods": ["createLinkAsync", "createLinkAsync", "createLinkAsync", "createLinkOperationCallable", "createLinkCallable"] + }, + "CreateTraceScope": { + "methods": ["createTraceScope", "createTraceScope", "createTraceScope", "createTraceScopeCallable"] + }, + "DeleteLink": { + "methods": ["deleteLinkAsync", "deleteLinkAsync", "deleteLinkAsync", "deleteLinkOperationCallable", "deleteLinkCallable"] + }, + "DeleteTraceScope": { + "methods": ["deleteTraceScope", "deleteTraceScope", "deleteTraceScope", "deleteTraceScopeCallable"] + }, + "GetBucket": { + "methods": ["getBucket", "getBucket", "getBucket", "getBucketCallable"] + }, + "GetDataset": { + "methods": ["getDataset", "getDataset", "getDataset", "getDatasetCallable"] + }, + "GetLink": { + "methods": ["getLink", "getLink", "getLink", "getLinkCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetScope": { + "methods": ["getScope", "getScope", "getScope", "getScopeCallable"] + }, + "GetSettings": { + "methods": ["getSettings", "getSettings", "getSettings", "getSettingsCallable"] + }, + "GetTraceScope": { + "methods": ["getTraceScope", "getTraceScope", "getTraceScope", "getTraceScopeCallable"] + }, + "GetView": { + "methods": ["getView", "getView", "getView", "getViewCallable"] + }, + "ListBuckets": { + "methods": ["listBuckets", "listBuckets", "listBuckets", "listBucketsPagedCallable", "listBucketsCallable"] + }, + "ListDatasets": { + "methods": ["listDatasets", "listDatasets", "listDatasets", "listDatasetsPagedCallable", "listDatasetsCallable"] + }, + "ListLinks": { + "methods": ["listLinks", "listLinks", "listLinks", "listLinksPagedCallable", "listLinksCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListTraceScopes": { + "methods": ["listTraceScopes", "listTraceScopes", "listTraceScopes", "listTraceScopesPagedCallable", "listTraceScopesCallable"] + }, + "ListViews": { + "methods": ["listViews", "listViews", "listViews", "listViewsPagedCallable", "listViewsCallable"] + }, + "UpdateBucket": { + "methods": ["updateBucketAsync", "updateBucketAsync", "updateBucketOperationCallable", "updateBucketCallable"] + }, + "UpdateLink": { + "methods": ["updateLinkAsync", "updateLinkAsync", "updateLinkOperationCallable", "updateLinkCallable"] + }, + "UpdateScope": { + "methods": ["updateScope", "updateScope", "updateScopeCallable"] + }, + "UpdateSettings": { + "methods": ["updateSettingsAsync", "updateSettingsAsync", "updateSettingsOperationCallable", "updateSettingsCallable"] + }, + "UpdateTraceScope": { + "methods": ["updateTraceScope", "updateTraceScope", "updateTraceScopeCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/package-info.java b/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/package-info.java new file mode 100644 index 000000000000..798dbbbd28cd --- /dev/null +++ b/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/package-info.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Observability API + * + *

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

======================= ObservabilityClient ======================= + * + *

Service Description: Service describing handlers for resources + * + *

Sample for ObservabilityClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ *   ScopeName name = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]");
+ *   Scope response = observabilityClient.getScope(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.observability.v1; + +import javax.annotation.Generated; diff --git a/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/GrpcObservabilityCallableFactory.java b/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/GrpcObservabilityCallableFactory.java new file mode 100644 index 000000000000..e73104a6d858 --- /dev/null +++ b/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/GrpcObservabilityCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the Observability service API. + * + *

This class is for advanced usage. + */ +@NullMarked +@Generated("by gapic-generator-java") +public class GrpcObservabilityCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/GrpcObservabilityStub.java b/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/GrpcObservabilityStub.java new file mode 100644 index 000000000000..a5c430b8449c --- /dev/null +++ b/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/GrpcObservabilityStub.java @@ -0,0 +1,1040 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.cloud.observability.v1.stub; + +import static com.google.cloud.observability.v1.ObservabilityClient.ListBucketsPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListDatasetsPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListLinksPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListLocationsPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListTraceScopesPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListViewsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.observability.v1.Bucket; +import com.google.cloud.observability.v1.CreateBucketRequest; +import com.google.cloud.observability.v1.CreateLinkRequest; +import com.google.cloud.observability.v1.CreateTraceScopeRequest; +import com.google.cloud.observability.v1.Dataset; +import com.google.cloud.observability.v1.DeleteLinkRequest; +import com.google.cloud.observability.v1.DeleteTraceScopeRequest; +import com.google.cloud.observability.v1.GetBucketRequest; +import com.google.cloud.observability.v1.GetDatasetRequest; +import com.google.cloud.observability.v1.GetLinkRequest; +import com.google.cloud.observability.v1.GetScopeRequest; +import com.google.cloud.observability.v1.GetSettingsRequest; +import com.google.cloud.observability.v1.GetTraceScopeRequest; +import com.google.cloud.observability.v1.GetViewRequest; +import com.google.cloud.observability.v1.Link; +import com.google.cloud.observability.v1.ListBucketsRequest; +import com.google.cloud.observability.v1.ListBucketsResponse; +import com.google.cloud.observability.v1.ListDatasetsRequest; +import com.google.cloud.observability.v1.ListDatasetsResponse; +import com.google.cloud.observability.v1.ListLinksRequest; +import com.google.cloud.observability.v1.ListLinksResponse; +import com.google.cloud.observability.v1.ListTraceScopesRequest; +import com.google.cloud.observability.v1.ListTraceScopesResponse; +import com.google.cloud.observability.v1.ListViewsRequest; +import com.google.cloud.observability.v1.ListViewsResponse; +import com.google.cloud.observability.v1.OperationMetadata; +import com.google.cloud.observability.v1.Scope; +import com.google.cloud.observability.v1.Settings; +import com.google.cloud.observability.v1.TraceScope; +import com.google.cloud.observability.v1.UpdateBucketRequest; +import com.google.cloud.observability.v1.UpdateLinkRequest; +import com.google.cloud.observability.v1.UpdateScopeRequest; +import com.google.cloud.observability.v1.UpdateSettingsRequest; +import com.google.cloud.observability.v1.UpdateTraceScopeRequest; +import com.google.cloud.observability.v1.View; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the Observability service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@NullMarked +@Generated("by gapic-generator-java") +public class GrpcObservabilityStub extends ObservabilityStub { + private static final MethodDescriptor getScopeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.observability.v1.Observability/GetScope") + .setRequestMarshaller(ProtoUtils.marshaller(GetScopeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Scope.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor updateScopeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.observability.v1.Observability/UpdateScope") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateScopeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Scope.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getBucketMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.observability.v1.Observability/GetBucket") + .setRequestMarshaller(ProtoUtils.marshaller(GetBucketRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Bucket.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listBucketsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.observability.v1.Observability/ListBuckets") + .setRequestMarshaller(ProtoUtils.marshaller(ListBucketsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListBucketsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createBucketMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.observability.v1.Observability/CreateBucket") + .setRequestMarshaller(ProtoUtils.marshaller(CreateBucketRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateBucketMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.observability.v1.Observability/UpdateBucket") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateBucketRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getDatasetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.observability.v1.Observability/GetDataset") + .setRequestMarshaller(ProtoUtils.marshaller(GetDatasetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Dataset.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listDatasetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.observability.v1.Observability/ListDatasets") + .setRequestMarshaller(ProtoUtils.marshaller(ListDatasetsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDatasetsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getViewMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.observability.v1.Observability/GetView") + .setRequestMarshaller(ProtoUtils.marshaller(GetViewRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(View.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listViewsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.observability.v1.Observability/ListViews") + .setRequestMarshaller(ProtoUtils.marshaller(ListViewsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListViewsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getLinkMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.observability.v1.Observability/GetLink") + .setRequestMarshaller(ProtoUtils.marshaller(GetLinkRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Link.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listLinksMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.observability.v1.Observability/ListLinks") + .setRequestMarshaller(ProtoUtils.marshaller(ListLinksRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListLinksResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor createLinkMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.observability.v1.Observability/CreateLink") + .setRequestMarshaller(ProtoUtils.marshaller(CreateLinkRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor updateLinkMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.observability.v1.Observability/UpdateLink") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateLinkRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor deleteLinkMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.observability.v1.Observability/DeleteLink") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteLinkRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getTraceScopeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.observability.v1.Observability/GetTraceScope") + .setRequestMarshaller( + ProtoUtils.marshaller(GetTraceScopeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TraceScope.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listTraceScopesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.observability.v1.Observability/ListTraceScopes") + .setRequestMarshaller( + ProtoUtils.marshaller(ListTraceScopesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListTraceScopesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createTraceScopeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.observability.v1.Observability/CreateTraceScope") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateTraceScopeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TraceScope.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateTraceScopeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.observability.v1.Observability/UpdateTraceScope") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateTraceScopeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TraceScope.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteTraceScopeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.observability.v1.Observability/DeleteTraceScope") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteTraceScopeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getSettingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.observability.v1.Observability/GetSettings") + .setRequestMarshaller(ProtoUtils.marshaller(GetSettingsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Settings.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateSettingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.observability.v1.Observability/UpdateSettings") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateSettingsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable getScopeCallable; + private final UnaryCallable updateScopeCallable; + private final UnaryCallable getBucketCallable; + private final UnaryCallable listBucketsCallable; + private final UnaryCallable + listBucketsPagedCallable; + private final UnaryCallable createBucketCallable; + private final OperationCallable + createBucketOperationCallable; + private final UnaryCallable updateBucketCallable; + private final OperationCallable + updateBucketOperationCallable; + private final UnaryCallable getDatasetCallable; + private final UnaryCallable listDatasetsCallable; + private final UnaryCallable + listDatasetsPagedCallable; + private final UnaryCallable getViewCallable; + private final UnaryCallable listViewsCallable; + private final UnaryCallable listViewsPagedCallable; + private final UnaryCallable getLinkCallable; + private final UnaryCallable listLinksCallable; + private final UnaryCallable listLinksPagedCallable; + private final UnaryCallable createLinkCallable; + private final OperationCallable + createLinkOperationCallable; + private final UnaryCallable updateLinkCallable; + private final OperationCallable + updateLinkOperationCallable; + private final UnaryCallable deleteLinkCallable; + private final OperationCallable + deleteLinkOperationCallable; + private final UnaryCallable getTraceScopeCallable; + private final UnaryCallable + listTraceScopesCallable; + private final UnaryCallable + listTraceScopesPagedCallable; + private final UnaryCallable createTraceScopeCallable; + private final UnaryCallable updateTraceScopeCallable; + private final UnaryCallable deleteTraceScopeCallable; + private final UnaryCallable getSettingsCallable; + private final UnaryCallable updateSettingsCallable; + private final OperationCallable + updateSettingsOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcObservabilityStub create(ObservabilityStubSettings settings) + throws IOException { + return new GrpcObservabilityStub(settings, ClientContext.create(settings)); + } + + public static final GrpcObservabilityStub create(ClientContext clientContext) throws IOException { + return new GrpcObservabilityStub(ObservabilityStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcObservabilityStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcObservabilityStub( + ObservabilityStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcObservabilityStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcObservabilityStub(ObservabilityStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcObservabilityCallableFactory()); + } + + /** + * Constructs an instance of GrpcObservabilityStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcObservabilityStub( + ObservabilityStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings getScopeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getScopeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings updateScopeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateScopeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("scope.name", String.valueOf(request.getScope().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getBucketTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getBucketMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings listBucketsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listBucketsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings createBucketTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createBucketMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings updateBucketTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateBucketMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("bucket.name", String.valueOf(request.getBucket().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getDatasetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDatasetMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings listDatasetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDatasetsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings getViewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getViewMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings listViewsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listViewsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings getLinkTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLinkMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings listLinksTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLinksMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings createLinkTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createLinkMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings updateLinkTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateLinkMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("link.name", String.valueOf(request.getLink().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteLinkTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteLinkMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings getTraceScopeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getTraceScopeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listTraceScopesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listTraceScopesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings createTraceScopeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createTraceScopeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings updateTraceScopeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateTraceScopeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "trace_scope.name", String.valueOf(request.getTraceScope().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteTraceScopeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteTraceScopeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings getSettingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getSettingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings updateSettingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateSettingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("settings.name", String.valueOf(request.getSettings().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.getScopeCallable = + callableFactory.createUnaryCallable( + getScopeTransportSettings, settings.getScopeSettings(), clientContext); + this.updateScopeCallable = + callableFactory.createUnaryCallable( + updateScopeTransportSettings, settings.updateScopeSettings(), clientContext); + this.getBucketCallable = + callableFactory.createUnaryCallable( + getBucketTransportSettings, settings.getBucketSettings(), clientContext); + this.listBucketsCallable = + callableFactory.createUnaryCallable( + listBucketsTransportSettings, settings.listBucketsSettings(), clientContext); + this.listBucketsPagedCallable = + callableFactory.createPagedCallable( + listBucketsTransportSettings, settings.listBucketsSettings(), clientContext); + this.createBucketCallable = + callableFactory.createUnaryCallable( + createBucketTransportSettings, settings.createBucketSettings(), clientContext); + this.createBucketOperationCallable = + callableFactory.createOperationCallable( + createBucketTransportSettings, + settings.createBucketOperationSettings(), + clientContext, + operationsStub); + this.updateBucketCallable = + callableFactory.createUnaryCallable( + updateBucketTransportSettings, settings.updateBucketSettings(), clientContext); + this.updateBucketOperationCallable = + callableFactory.createOperationCallable( + updateBucketTransportSettings, + settings.updateBucketOperationSettings(), + clientContext, + operationsStub); + this.getDatasetCallable = + callableFactory.createUnaryCallable( + getDatasetTransportSettings, settings.getDatasetSettings(), clientContext); + this.listDatasetsCallable = + callableFactory.createUnaryCallable( + listDatasetsTransportSettings, settings.listDatasetsSettings(), clientContext); + this.listDatasetsPagedCallable = + callableFactory.createPagedCallable( + listDatasetsTransportSettings, settings.listDatasetsSettings(), clientContext); + this.getViewCallable = + callableFactory.createUnaryCallable( + getViewTransportSettings, settings.getViewSettings(), clientContext); + this.listViewsCallable = + callableFactory.createUnaryCallable( + listViewsTransportSettings, settings.listViewsSettings(), clientContext); + this.listViewsPagedCallable = + callableFactory.createPagedCallable( + listViewsTransportSettings, settings.listViewsSettings(), clientContext); + this.getLinkCallable = + callableFactory.createUnaryCallable( + getLinkTransportSettings, settings.getLinkSettings(), clientContext); + this.listLinksCallable = + callableFactory.createUnaryCallable( + listLinksTransportSettings, settings.listLinksSettings(), clientContext); + this.listLinksPagedCallable = + callableFactory.createPagedCallable( + listLinksTransportSettings, settings.listLinksSettings(), clientContext); + this.createLinkCallable = + callableFactory.createUnaryCallable( + createLinkTransportSettings, settings.createLinkSettings(), clientContext); + this.createLinkOperationCallable = + callableFactory.createOperationCallable( + createLinkTransportSettings, + settings.createLinkOperationSettings(), + clientContext, + operationsStub); + this.updateLinkCallable = + callableFactory.createUnaryCallable( + updateLinkTransportSettings, settings.updateLinkSettings(), clientContext); + this.updateLinkOperationCallable = + callableFactory.createOperationCallable( + updateLinkTransportSettings, + settings.updateLinkOperationSettings(), + clientContext, + operationsStub); + this.deleteLinkCallable = + callableFactory.createUnaryCallable( + deleteLinkTransportSettings, settings.deleteLinkSettings(), clientContext); + this.deleteLinkOperationCallable = + callableFactory.createOperationCallable( + deleteLinkTransportSettings, + settings.deleteLinkOperationSettings(), + clientContext, + operationsStub); + this.getTraceScopeCallable = + callableFactory.createUnaryCallable( + getTraceScopeTransportSettings, settings.getTraceScopeSettings(), clientContext); + this.listTraceScopesCallable = + callableFactory.createUnaryCallable( + listTraceScopesTransportSettings, settings.listTraceScopesSettings(), clientContext); + this.listTraceScopesPagedCallable = + callableFactory.createPagedCallable( + listTraceScopesTransportSettings, settings.listTraceScopesSettings(), clientContext); + this.createTraceScopeCallable = + callableFactory.createUnaryCallable( + createTraceScopeTransportSettings, settings.createTraceScopeSettings(), clientContext); + this.updateTraceScopeCallable = + callableFactory.createUnaryCallable( + updateTraceScopeTransportSettings, settings.updateTraceScopeSettings(), clientContext); + this.deleteTraceScopeCallable = + callableFactory.createUnaryCallable( + deleteTraceScopeTransportSettings, settings.deleteTraceScopeSettings(), clientContext); + this.getSettingsCallable = + callableFactory.createUnaryCallable( + getSettingsTransportSettings, settings.getSettingsSettings(), clientContext); + this.updateSettingsCallable = + callableFactory.createUnaryCallable( + updateSettingsTransportSettings, settings.updateSettingsSettings(), clientContext); + this.updateSettingsOperationCallable = + callableFactory.createOperationCallable( + updateSettingsTransportSettings, + settings.updateSettingsOperationSettings(), + clientContext, + operationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable getScopeCallable() { + return getScopeCallable; + } + + @Override + public UnaryCallable updateScopeCallable() { + return updateScopeCallable; + } + + @Override + public UnaryCallable getBucketCallable() { + return getBucketCallable; + } + + @Override + public UnaryCallable listBucketsCallable() { + return listBucketsCallable; + } + + @Override + public UnaryCallable listBucketsPagedCallable() { + return listBucketsPagedCallable; + } + + @Override + public UnaryCallable createBucketCallable() { + return createBucketCallable; + } + + @Override + public OperationCallable + createBucketOperationCallable() { + return createBucketOperationCallable; + } + + @Override + public UnaryCallable updateBucketCallable() { + return updateBucketCallable; + } + + @Override + public OperationCallable + updateBucketOperationCallable() { + return updateBucketOperationCallable; + } + + @Override + public UnaryCallable getDatasetCallable() { + return getDatasetCallable; + } + + @Override + public UnaryCallable listDatasetsCallable() { + return listDatasetsCallable; + } + + @Override + public UnaryCallable listDatasetsPagedCallable() { + return listDatasetsPagedCallable; + } + + @Override + public UnaryCallable getViewCallable() { + return getViewCallable; + } + + @Override + public UnaryCallable listViewsCallable() { + return listViewsCallable; + } + + @Override + public UnaryCallable listViewsPagedCallable() { + return listViewsPagedCallable; + } + + @Override + public UnaryCallable getLinkCallable() { + return getLinkCallable; + } + + @Override + public UnaryCallable listLinksCallable() { + return listLinksCallable; + } + + @Override + public UnaryCallable listLinksPagedCallable() { + return listLinksPagedCallable; + } + + @Override + public UnaryCallable createLinkCallable() { + return createLinkCallable; + } + + @Override + public OperationCallable + createLinkOperationCallable() { + return createLinkOperationCallable; + } + + @Override + public UnaryCallable updateLinkCallable() { + return updateLinkCallable; + } + + @Override + public OperationCallable + updateLinkOperationCallable() { + return updateLinkOperationCallable; + } + + @Override + public UnaryCallable deleteLinkCallable() { + return deleteLinkCallable; + } + + @Override + public OperationCallable + deleteLinkOperationCallable() { + return deleteLinkOperationCallable; + } + + @Override + public UnaryCallable getTraceScopeCallable() { + return getTraceScopeCallable; + } + + @Override + public UnaryCallable listTraceScopesCallable() { + return listTraceScopesCallable; + } + + @Override + public UnaryCallable + listTraceScopesPagedCallable() { + return listTraceScopesPagedCallable; + } + + @Override + public UnaryCallable createTraceScopeCallable() { + return createTraceScopeCallable; + } + + @Override + public UnaryCallable updateTraceScopeCallable() { + return updateTraceScopeCallable; + } + + @Override + public UnaryCallable deleteTraceScopeCallable() { + return deleteTraceScopeCallable; + } + + @Override + public UnaryCallable getSettingsCallable() { + return getSettingsCallable; + } + + @Override + public UnaryCallable updateSettingsCallable() { + return updateSettingsCallable; + } + + @Override + public OperationCallable + updateSettingsOperationCallable() { + return updateSettingsOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/HttpJsonObservabilityCallableFactory.java b/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/HttpJsonObservabilityCallableFactory.java new file mode 100644 index 000000000000..181d9394b53c --- /dev/null +++ b/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/HttpJsonObservabilityCallableFactory.java @@ -0,0 +1,103 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the Observability service API. + * + *

This class is for advanced usage. + */ +@NullMarked +@Generated("by gapic-generator-java") +public class HttpJsonObservabilityCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/HttpJsonObservabilityStub.java b/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/HttpJsonObservabilityStub.java new file mode 100644 index 000000000000..f39096a6a27e --- /dev/null +++ b/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/HttpJsonObservabilityStub.java @@ -0,0 +1,1823 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.cloud.observability.v1.stub; + +import static com.google.cloud.observability.v1.ObservabilityClient.ListBucketsPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListDatasetsPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListLinksPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListLocationsPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListTraceScopesPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListViewsPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.observability.v1.Bucket; +import com.google.cloud.observability.v1.CreateBucketRequest; +import com.google.cloud.observability.v1.CreateLinkRequest; +import com.google.cloud.observability.v1.CreateTraceScopeRequest; +import com.google.cloud.observability.v1.Dataset; +import com.google.cloud.observability.v1.DeleteLinkRequest; +import com.google.cloud.observability.v1.DeleteTraceScopeRequest; +import com.google.cloud.observability.v1.GetBucketRequest; +import com.google.cloud.observability.v1.GetDatasetRequest; +import com.google.cloud.observability.v1.GetLinkRequest; +import com.google.cloud.observability.v1.GetScopeRequest; +import com.google.cloud.observability.v1.GetSettingsRequest; +import com.google.cloud.observability.v1.GetTraceScopeRequest; +import com.google.cloud.observability.v1.GetViewRequest; +import com.google.cloud.observability.v1.Link; +import com.google.cloud.observability.v1.ListBucketsRequest; +import com.google.cloud.observability.v1.ListBucketsResponse; +import com.google.cloud.observability.v1.ListDatasetsRequest; +import com.google.cloud.observability.v1.ListDatasetsResponse; +import com.google.cloud.observability.v1.ListLinksRequest; +import com.google.cloud.observability.v1.ListLinksResponse; +import com.google.cloud.observability.v1.ListTraceScopesRequest; +import com.google.cloud.observability.v1.ListTraceScopesResponse; +import com.google.cloud.observability.v1.ListViewsRequest; +import com.google.cloud.observability.v1.ListViewsResponse; +import com.google.cloud.observability.v1.OperationMetadata; +import com.google.cloud.observability.v1.Scope; +import com.google.cloud.observability.v1.Settings; +import com.google.cloud.observability.v1.TraceScope; +import com.google.cloud.observability.v1.UpdateBucketRequest; +import com.google.cloud.observability.v1.UpdateLinkRequest; +import com.google.cloud.observability.v1.UpdateScopeRequest; +import com.google.cloud.observability.v1.UpdateSettingsRequest; +import com.google.cloud.observability.v1.UpdateTraceScopeRequest; +import com.google.cloud.observability.v1.View; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the Observability service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@NullMarked +@Generated("by gapic-generator-java") +public class HttpJsonObservabilityStub extends ObservabilityStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(Bucket.getDescriptor()) + .add(Link.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .add(Settings.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor getScopeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.observability.v1.Observability/GetScope") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/scopes/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Scope.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor updateScopeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.observability.v1.Observability/UpdateScope") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{scope.name=projects/*/locations/*/scopes/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "scope.name", request.getScope().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("scope", request.getScope(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Scope.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getBucketMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.observability.v1.Observability/GetBucket") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/buckets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Bucket.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listBucketsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.observability.v1.Observability/ListBuckets") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/buckets", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam( + fields, "showDeleted", request.getShowDeleted()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListBucketsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createBucketMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.observability.v1.Observability/CreateBucket") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/buckets", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "bucketId", request.getBucketId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("bucket", request.getBucket(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateBucketRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateBucketMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.observability.v1.Observability/UpdateBucket") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{bucket.name=projects/*/locations/*/buckets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "bucket.name", request.getBucket().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("bucket", request.getBucket(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateBucketRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor getDatasetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.observability.v1.Observability/GetDataset") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/buckets/*/datasets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Dataset.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listDatasetsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.observability.v1.Observability/ListDatasets") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/buckets/*}/datasets", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam( + fields, "showDeleted", request.getShowDeleted()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListDatasetsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getViewMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.observability.v1.Observability/GetView") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/buckets/*/datasets/*/views/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(View.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listViewsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.observability.v1.Observability/ListViews") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/buckets/*/datasets/*}/views", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListViewsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getLinkMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.observability.v1.Observability/GetLink") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/buckets/*/datasets/*/links/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Link.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listLinksMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.observability.v1.Observability/ListLinks") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/buckets/*/datasets/*}/links", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLinksResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createLinkMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.observability.v1.Observability/CreateLink") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/buckets/*/datasets/*}/links", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "linkId", request.getLinkId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("link", request.getLink(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateLinkRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateLinkMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.observability.v1.Observability/UpdateLink") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{link.name=projects/*/locations/*/buckets/*/datasets/*/links/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "link.name", request.getLink().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("link", request.getLink(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateLinkRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteLinkMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.observability.v1.Observability/DeleteLink") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/buckets/*/datasets/*/links/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteLinkRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + getTraceScopeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.observability.v1.Observability/GetTraceScope") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/traceScopes/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(TraceScope.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listTraceScopesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.observability.v1.Observability/ListTraceScopes") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/traceScopes", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListTraceScopesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createTraceScopeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.observability.v1.Observability/CreateTraceScope") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/traceScopes", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "traceScopeId", request.getTraceScopeId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("traceScope", request.getTraceScope(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(TraceScope.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateTraceScopeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.observability.v1.Observability/UpdateTraceScope") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{traceScope.name=projects/*/locations/*/traceScopes/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "traceScope.name", request.getTraceScope().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("traceScope", request.getTraceScope(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(TraceScope.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteTraceScopeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.observability.v1.Observability/DeleteTraceScope") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/traceScopes/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getSettingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.observability.v1.Observability/GetSettings") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/settings}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v1/{name=folders/*/locations/*/settings}", + "/v1/{name=organizations/*/locations/*/settings}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Settings.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateSettingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.observability.v1.Observability/UpdateSettings") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{settings.name=projects/*/locations/*/settings}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "settings.name", request.getSettings().getName()); + return fields; + }) + .setAdditionalPaths( + "/v1/{settings.name=folders/*/locations/*/settings}", + "/v1/{settings.name=organizations/*/locations/*/settings}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("settings", request.getSettings(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateSettingsRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v1/{name=folders/*}/locations", "/v1/{name=organizations/*}/locations") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v1/{name=folders/*/locations/*}", + "/v1/{name=organizations/*/locations/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable getScopeCallable; + private final UnaryCallable updateScopeCallable; + private final UnaryCallable getBucketCallable; + private final UnaryCallable listBucketsCallable; + private final UnaryCallable + listBucketsPagedCallable; + private final UnaryCallable createBucketCallable; + private final OperationCallable + createBucketOperationCallable; + private final UnaryCallable updateBucketCallable; + private final OperationCallable + updateBucketOperationCallable; + private final UnaryCallable getDatasetCallable; + private final UnaryCallable listDatasetsCallable; + private final UnaryCallable + listDatasetsPagedCallable; + private final UnaryCallable getViewCallable; + private final UnaryCallable listViewsCallable; + private final UnaryCallable listViewsPagedCallable; + private final UnaryCallable getLinkCallable; + private final UnaryCallable listLinksCallable; + private final UnaryCallable listLinksPagedCallable; + private final UnaryCallable createLinkCallable; + private final OperationCallable + createLinkOperationCallable; + private final UnaryCallable updateLinkCallable; + private final OperationCallable + updateLinkOperationCallable; + private final UnaryCallable deleteLinkCallable; + private final OperationCallable + deleteLinkOperationCallable; + private final UnaryCallable getTraceScopeCallable; + private final UnaryCallable + listTraceScopesCallable; + private final UnaryCallable + listTraceScopesPagedCallable; + private final UnaryCallable createTraceScopeCallable; + private final UnaryCallable updateTraceScopeCallable; + private final UnaryCallable deleteTraceScopeCallable; + private final UnaryCallable getSettingsCallable; + private final UnaryCallable updateSettingsCallable; + private final OperationCallable + updateSettingsOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonObservabilityStub create(ObservabilityStubSettings settings) + throws IOException { + return new HttpJsonObservabilityStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonObservabilityStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonObservabilityStub( + ObservabilityStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonObservabilityStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonObservabilityStub( + ObservabilityStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonObservabilityStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonObservabilityStub( + ObservabilityStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonObservabilityCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonObservabilityStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonObservabilityStub( + ObservabilityStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1/{name=projects/*/locations/*/operations/*}:cancel") + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost("/v1/{name=folders/*/locations/*/operations/*}:cancel") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/v1/{name=organizations/*/locations/*/operations/*}:cancel") + .build()) + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1/{name=projects/*/locations/*/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setDelete("/v1/{name=folders/*/locations/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setDelete("/v1/{name=organizations/*/locations/*/operations/*}") + .build()) + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1/{name=folders/*/locations/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1/{name=organizations/*/locations/*/operations/*}") + .build()) + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*}/operations") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1/{name=folders/*/locations/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1/{name=organizations/*/locations/*}/operations") + .build()) + .build()) + .build()); + + HttpJsonCallSettings getScopeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getScopeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings updateScopeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateScopeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("scope.name", String.valueOf(request.getScope().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getBucketTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getBucketMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings listBucketsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listBucketsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings createBucketTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createBucketMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings updateBucketTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateBucketMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("bucket.name", String.valueOf(request.getBucket().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getDatasetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getDatasetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings listDatasetsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listDatasetsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings getViewTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getViewMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings listViewsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listViewsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings getLinkTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLinkMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings listLinksTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLinksMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings createLinkTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createLinkMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings updateLinkTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateLinkMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("link.name", String.valueOf(request.getLink().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteLinkTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteLinkMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings getTraceScopeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getTraceScopeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listTraceScopesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listTraceScopesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings createTraceScopeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createTraceScopeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings updateTraceScopeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateTraceScopeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "trace_scope.name", String.valueOf(request.getTraceScope().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteTraceScopeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteTraceScopeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings getSettingsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getSettingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings updateSettingsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateSettingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("settings.name", String.valueOf(request.getSettings().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.getScopeCallable = + callableFactory.createUnaryCallable( + getScopeTransportSettings, settings.getScopeSettings(), clientContext); + this.updateScopeCallable = + callableFactory.createUnaryCallable( + updateScopeTransportSettings, settings.updateScopeSettings(), clientContext); + this.getBucketCallable = + callableFactory.createUnaryCallable( + getBucketTransportSettings, settings.getBucketSettings(), clientContext); + this.listBucketsCallable = + callableFactory.createUnaryCallable( + listBucketsTransportSettings, settings.listBucketsSettings(), clientContext); + this.listBucketsPagedCallable = + callableFactory.createPagedCallable( + listBucketsTransportSettings, settings.listBucketsSettings(), clientContext); + this.createBucketCallable = + callableFactory.createUnaryCallable( + createBucketTransportSettings, settings.createBucketSettings(), clientContext); + this.createBucketOperationCallable = + callableFactory.createOperationCallable( + createBucketTransportSettings, + settings.createBucketOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateBucketCallable = + callableFactory.createUnaryCallable( + updateBucketTransportSettings, settings.updateBucketSettings(), clientContext); + this.updateBucketOperationCallable = + callableFactory.createOperationCallable( + updateBucketTransportSettings, + settings.updateBucketOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getDatasetCallable = + callableFactory.createUnaryCallable( + getDatasetTransportSettings, settings.getDatasetSettings(), clientContext); + this.listDatasetsCallable = + callableFactory.createUnaryCallable( + listDatasetsTransportSettings, settings.listDatasetsSettings(), clientContext); + this.listDatasetsPagedCallable = + callableFactory.createPagedCallable( + listDatasetsTransportSettings, settings.listDatasetsSettings(), clientContext); + this.getViewCallable = + callableFactory.createUnaryCallable( + getViewTransportSettings, settings.getViewSettings(), clientContext); + this.listViewsCallable = + callableFactory.createUnaryCallable( + listViewsTransportSettings, settings.listViewsSettings(), clientContext); + this.listViewsPagedCallable = + callableFactory.createPagedCallable( + listViewsTransportSettings, settings.listViewsSettings(), clientContext); + this.getLinkCallable = + callableFactory.createUnaryCallable( + getLinkTransportSettings, settings.getLinkSettings(), clientContext); + this.listLinksCallable = + callableFactory.createUnaryCallable( + listLinksTransportSettings, settings.listLinksSettings(), clientContext); + this.listLinksPagedCallable = + callableFactory.createPagedCallable( + listLinksTransportSettings, settings.listLinksSettings(), clientContext); + this.createLinkCallable = + callableFactory.createUnaryCallable( + createLinkTransportSettings, settings.createLinkSettings(), clientContext); + this.createLinkOperationCallable = + callableFactory.createOperationCallable( + createLinkTransportSettings, + settings.createLinkOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateLinkCallable = + callableFactory.createUnaryCallable( + updateLinkTransportSettings, settings.updateLinkSettings(), clientContext); + this.updateLinkOperationCallable = + callableFactory.createOperationCallable( + updateLinkTransportSettings, + settings.updateLinkOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteLinkCallable = + callableFactory.createUnaryCallable( + deleteLinkTransportSettings, settings.deleteLinkSettings(), clientContext); + this.deleteLinkOperationCallable = + callableFactory.createOperationCallable( + deleteLinkTransportSettings, + settings.deleteLinkOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getTraceScopeCallable = + callableFactory.createUnaryCallable( + getTraceScopeTransportSettings, settings.getTraceScopeSettings(), clientContext); + this.listTraceScopesCallable = + callableFactory.createUnaryCallable( + listTraceScopesTransportSettings, settings.listTraceScopesSettings(), clientContext); + this.listTraceScopesPagedCallable = + callableFactory.createPagedCallable( + listTraceScopesTransportSettings, settings.listTraceScopesSettings(), clientContext); + this.createTraceScopeCallable = + callableFactory.createUnaryCallable( + createTraceScopeTransportSettings, settings.createTraceScopeSettings(), clientContext); + this.updateTraceScopeCallable = + callableFactory.createUnaryCallable( + updateTraceScopeTransportSettings, settings.updateTraceScopeSettings(), clientContext); + this.deleteTraceScopeCallable = + callableFactory.createUnaryCallable( + deleteTraceScopeTransportSettings, settings.deleteTraceScopeSettings(), clientContext); + this.getSettingsCallable = + callableFactory.createUnaryCallable( + getSettingsTransportSettings, settings.getSettingsSettings(), clientContext); + this.updateSettingsCallable = + callableFactory.createUnaryCallable( + updateSettingsTransportSettings, settings.updateSettingsSettings(), clientContext); + this.updateSettingsOperationCallable = + callableFactory.createOperationCallable( + updateSettingsTransportSettings, + settings.updateSettingsOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(getScopeMethodDescriptor); + methodDescriptors.add(updateScopeMethodDescriptor); + methodDescriptors.add(getBucketMethodDescriptor); + methodDescriptors.add(listBucketsMethodDescriptor); + methodDescriptors.add(createBucketMethodDescriptor); + methodDescriptors.add(updateBucketMethodDescriptor); + methodDescriptors.add(getDatasetMethodDescriptor); + methodDescriptors.add(listDatasetsMethodDescriptor); + methodDescriptors.add(getViewMethodDescriptor); + methodDescriptors.add(listViewsMethodDescriptor); + methodDescriptors.add(getLinkMethodDescriptor); + methodDescriptors.add(listLinksMethodDescriptor); + methodDescriptors.add(createLinkMethodDescriptor); + methodDescriptors.add(updateLinkMethodDescriptor); + methodDescriptors.add(deleteLinkMethodDescriptor); + methodDescriptors.add(getTraceScopeMethodDescriptor); + methodDescriptors.add(listTraceScopesMethodDescriptor); + methodDescriptors.add(createTraceScopeMethodDescriptor); + methodDescriptors.add(updateTraceScopeMethodDescriptor); + methodDescriptors.add(deleteTraceScopeMethodDescriptor); + methodDescriptors.add(getSettingsMethodDescriptor); + methodDescriptors.add(updateSettingsMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable getScopeCallable() { + return getScopeCallable; + } + + @Override + public UnaryCallable updateScopeCallable() { + return updateScopeCallable; + } + + @Override + public UnaryCallable getBucketCallable() { + return getBucketCallable; + } + + @Override + public UnaryCallable listBucketsCallable() { + return listBucketsCallable; + } + + @Override + public UnaryCallable listBucketsPagedCallable() { + return listBucketsPagedCallable; + } + + @Override + public UnaryCallable createBucketCallable() { + return createBucketCallable; + } + + @Override + public OperationCallable + createBucketOperationCallable() { + return createBucketOperationCallable; + } + + @Override + public UnaryCallable updateBucketCallable() { + return updateBucketCallable; + } + + @Override + public OperationCallable + updateBucketOperationCallable() { + return updateBucketOperationCallable; + } + + @Override + public UnaryCallable getDatasetCallable() { + return getDatasetCallable; + } + + @Override + public UnaryCallable listDatasetsCallable() { + return listDatasetsCallable; + } + + @Override + public UnaryCallable listDatasetsPagedCallable() { + return listDatasetsPagedCallable; + } + + @Override + public UnaryCallable getViewCallable() { + return getViewCallable; + } + + @Override + public UnaryCallable listViewsCallable() { + return listViewsCallable; + } + + @Override + public UnaryCallable listViewsPagedCallable() { + return listViewsPagedCallable; + } + + @Override + public UnaryCallable getLinkCallable() { + return getLinkCallable; + } + + @Override + public UnaryCallable listLinksCallable() { + return listLinksCallable; + } + + @Override + public UnaryCallable listLinksPagedCallable() { + return listLinksPagedCallable; + } + + @Override + public UnaryCallable createLinkCallable() { + return createLinkCallable; + } + + @Override + public OperationCallable + createLinkOperationCallable() { + return createLinkOperationCallable; + } + + @Override + public UnaryCallable updateLinkCallable() { + return updateLinkCallable; + } + + @Override + public OperationCallable + updateLinkOperationCallable() { + return updateLinkOperationCallable; + } + + @Override + public UnaryCallable deleteLinkCallable() { + return deleteLinkCallable; + } + + @Override + public OperationCallable + deleteLinkOperationCallable() { + return deleteLinkOperationCallable; + } + + @Override + public UnaryCallable getTraceScopeCallable() { + return getTraceScopeCallable; + } + + @Override + public UnaryCallable listTraceScopesCallable() { + return listTraceScopesCallable; + } + + @Override + public UnaryCallable + listTraceScopesPagedCallable() { + return listTraceScopesPagedCallable; + } + + @Override + public UnaryCallable createTraceScopeCallable() { + return createTraceScopeCallable; + } + + @Override + public UnaryCallable updateTraceScopeCallable() { + return updateTraceScopeCallable; + } + + @Override + public UnaryCallable deleteTraceScopeCallable() { + return deleteTraceScopeCallable; + } + + @Override + public UnaryCallable getSettingsCallable() { + return getSettingsCallable; + } + + @Override + public UnaryCallable updateSettingsCallable() { + return updateSettingsCallable; + } + + @Override + public OperationCallable + updateSettingsOperationCallable() { + return updateSettingsOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/ObservabilityStub.java b/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/ObservabilityStub.java new file mode 100644 index 000000000000..5a821f5d8d83 --- /dev/null +++ b/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/ObservabilityStub.java @@ -0,0 +1,248 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.cloud.observability.v1.stub; + +import static com.google.cloud.observability.v1.ObservabilityClient.ListBucketsPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListDatasetsPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListLinksPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListLocationsPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListTraceScopesPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListViewsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.observability.v1.Bucket; +import com.google.cloud.observability.v1.CreateBucketRequest; +import com.google.cloud.observability.v1.CreateLinkRequest; +import com.google.cloud.observability.v1.CreateTraceScopeRequest; +import com.google.cloud.observability.v1.Dataset; +import com.google.cloud.observability.v1.DeleteLinkRequest; +import com.google.cloud.observability.v1.DeleteTraceScopeRequest; +import com.google.cloud.observability.v1.GetBucketRequest; +import com.google.cloud.observability.v1.GetDatasetRequest; +import com.google.cloud.observability.v1.GetLinkRequest; +import com.google.cloud.observability.v1.GetScopeRequest; +import com.google.cloud.observability.v1.GetSettingsRequest; +import com.google.cloud.observability.v1.GetTraceScopeRequest; +import com.google.cloud.observability.v1.GetViewRequest; +import com.google.cloud.observability.v1.Link; +import com.google.cloud.observability.v1.ListBucketsRequest; +import com.google.cloud.observability.v1.ListBucketsResponse; +import com.google.cloud.observability.v1.ListDatasetsRequest; +import com.google.cloud.observability.v1.ListDatasetsResponse; +import com.google.cloud.observability.v1.ListLinksRequest; +import com.google.cloud.observability.v1.ListLinksResponse; +import com.google.cloud.observability.v1.ListTraceScopesRequest; +import com.google.cloud.observability.v1.ListTraceScopesResponse; +import com.google.cloud.observability.v1.ListViewsRequest; +import com.google.cloud.observability.v1.ListViewsResponse; +import com.google.cloud.observability.v1.OperationMetadata; +import com.google.cloud.observability.v1.Scope; +import com.google.cloud.observability.v1.Settings; +import com.google.cloud.observability.v1.TraceScope; +import com.google.cloud.observability.v1.UpdateBucketRequest; +import com.google.cloud.observability.v1.UpdateLinkRequest; +import com.google.cloud.observability.v1.UpdateScopeRequest; +import com.google.cloud.observability.v1.UpdateSettingsRequest; +import com.google.cloud.observability.v1.UpdateTraceScopeRequest; +import com.google.cloud.observability.v1.View; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Observability service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@NullMarked +@Generated("by gapic-generator-java") +public abstract class ObservabilityStub implements BackgroundResource { + + public @Nullable OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.@Nullable OperationsStub + getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable getScopeCallable() { + throw new UnsupportedOperationException("Not implemented: getScopeCallable()"); + } + + public UnaryCallable updateScopeCallable() { + throw new UnsupportedOperationException("Not implemented: updateScopeCallable()"); + } + + public UnaryCallable getBucketCallable() { + throw new UnsupportedOperationException("Not implemented: getBucketCallable()"); + } + + public UnaryCallable listBucketsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listBucketsPagedCallable()"); + } + + public UnaryCallable listBucketsCallable() { + throw new UnsupportedOperationException("Not implemented: listBucketsCallable()"); + } + + public OperationCallable + createBucketOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createBucketOperationCallable()"); + } + + public UnaryCallable createBucketCallable() { + throw new UnsupportedOperationException("Not implemented: createBucketCallable()"); + } + + public OperationCallable + updateBucketOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateBucketOperationCallable()"); + } + + public UnaryCallable updateBucketCallable() { + throw new UnsupportedOperationException("Not implemented: updateBucketCallable()"); + } + + public UnaryCallable getDatasetCallable() { + throw new UnsupportedOperationException("Not implemented: getDatasetCallable()"); + } + + public UnaryCallable listDatasetsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDatasetsPagedCallable()"); + } + + public UnaryCallable listDatasetsCallable() { + throw new UnsupportedOperationException("Not implemented: listDatasetsCallable()"); + } + + public UnaryCallable getViewCallable() { + throw new UnsupportedOperationException("Not implemented: getViewCallable()"); + } + + public UnaryCallable listViewsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listViewsPagedCallable()"); + } + + public UnaryCallable listViewsCallable() { + throw new UnsupportedOperationException("Not implemented: listViewsCallable()"); + } + + public UnaryCallable getLinkCallable() { + throw new UnsupportedOperationException("Not implemented: getLinkCallable()"); + } + + public UnaryCallable listLinksPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLinksPagedCallable()"); + } + + public UnaryCallable listLinksCallable() { + throw new UnsupportedOperationException("Not implemented: listLinksCallable()"); + } + + public OperationCallable + createLinkOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createLinkOperationCallable()"); + } + + public UnaryCallable createLinkCallable() { + throw new UnsupportedOperationException("Not implemented: createLinkCallable()"); + } + + public OperationCallable + updateLinkOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateLinkOperationCallable()"); + } + + public UnaryCallable updateLinkCallable() { + throw new UnsupportedOperationException("Not implemented: updateLinkCallable()"); + } + + public OperationCallable + deleteLinkOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteLinkOperationCallable()"); + } + + public UnaryCallable deleteLinkCallable() { + throw new UnsupportedOperationException("Not implemented: deleteLinkCallable()"); + } + + public UnaryCallable getTraceScopeCallable() { + throw new UnsupportedOperationException("Not implemented: getTraceScopeCallable()"); + } + + public UnaryCallable + listTraceScopesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listTraceScopesPagedCallable()"); + } + + public UnaryCallable listTraceScopesCallable() { + throw new UnsupportedOperationException("Not implemented: listTraceScopesCallable()"); + } + + public UnaryCallable createTraceScopeCallable() { + throw new UnsupportedOperationException("Not implemented: createTraceScopeCallable()"); + } + + public UnaryCallable updateTraceScopeCallable() { + throw new UnsupportedOperationException("Not implemented: updateTraceScopeCallable()"); + } + + public UnaryCallable deleteTraceScopeCallable() { + throw new UnsupportedOperationException("Not implemented: deleteTraceScopeCallable()"); + } + + public UnaryCallable getSettingsCallable() { + throw new UnsupportedOperationException("Not implemented: getSettingsCallable()"); + } + + public OperationCallable + updateSettingsOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateSettingsOperationCallable()"); + } + + public UnaryCallable updateSettingsCallable() { + throw new UnsupportedOperationException("Not implemented: updateSettingsCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/ObservabilityStubSettings.java b/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/ObservabilityStubSettings.java new file mode 100644 index 000000000000..54e074098bd4 --- /dev/null +++ b/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/ObservabilityStubSettings.java @@ -0,0 +1,1566 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.cloud.observability.v1.stub; + +import static com.google.cloud.observability.v1.ObservabilityClient.ListBucketsPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListDatasetsPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListLinksPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListLocationsPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListTraceScopesPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListViewsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.observability.v1.Bucket; +import com.google.cloud.observability.v1.CreateBucketRequest; +import com.google.cloud.observability.v1.CreateLinkRequest; +import com.google.cloud.observability.v1.CreateTraceScopeRequest; +import com.google.cloud.observability.v1.Dataset; +import com.google.cloud.observability.v1.DeleteLinkRequest; +import com.google.cloud.observability.v1.DeleteTraceScopeRequest; +import com.google.cloud.observability.v1.GetBucketRequest; +import com.google.cloud.observability.v1.GetDatasetRequest; +import com.google.cloud.observability.v1.GetLinkRequest; +import com.google.cloud.observability.v1.GetScopeRequest; +import com.google.cloud.observability.v1.GetSettingsRequest; +import com.google.cloud.observability.v1.GetTraceScopeRequest; +import com.google.cloud.observability.v1.GetViewRequest; +import com.google.cloud.observability.v1.Link; +import com.google.cloud.observability.v1.ListBucketsRequest; +import com.google.cloud.observability.v1.ListBucketsResponse; +import com.google.cloud.observability.v1.ListDatasetsRequest; +import com.google.cloud.observability.v1.ListDatasetsResponse; +import com.google.cloud.observability.v1.ListLinksRequest; +import com.google.cloud.observability.v1.ListLinksResponse; +import com.google.cloud.observability.v1.ListTraceScopesRequest; +import com.google.cloud.observability.v1.ListTraceScopesResponse; +import com.google.cloud.observability.v1.ListViewsRequest; +import com.google.cloud.observability.v1.ListViewsResponse; +import com.google.cloud.observability.v1.OperationMetadata; +import com.google.cloud.observability.v1.Scope; +import com.google.cloud.observability.v1.Settings; +import com.google.cloud.observability.v1.TraceScope; +import com.google.cloud.observability.v1.UpdateBucketRequest; +import com.google.cloud.observability.v1.UpdateLinkRequest; +import com.google.cloud.observability.v1.UpdateScopeRequest; +import com.google.cloud.observability.v1.UpdateSettingsRequest; +import com.google.cloud.observability.v1.UpdateTraceScopeRequest; +import com.google.cloud.observability.v1.View; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ObservabilityStub}. + * + *

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

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

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

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

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

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ObservabilityStubSettings.Builder observabilitySettingsBuilder =
+ *     ObservabilityStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * observabilitySettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@NullMarked +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class ObservabilityStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings getScopeSettings; + private final UnaryCallSettings updateScopeSettings; + private final UnaryCallSettings getBucketSettings; + private final PagedCallSettings + listBucketsSettings; + private final UnaryCallSettings createBucketSettings; + private final OperationCallSettings + createBucketOperationSettings; + private final UnaryCallSettings updateBucketSettings; + private final OperationCallSettings + updateBucketOperationSettings; + private final UnaryCallSettings getDatasetSettings; + private final PagedCallSettings< + ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse> + listDatasetsSettings; + private final UnaryCallSettings getViewSettings; + private final PagedCallSettings + listViewsSettings; + private final UnaryCallSettings getLinkSettings; + private final PagedCallSettings + listLinksSettings; + private final UnaryCallSettings createLinkSettings; + private final OperationCallSettings + createLinkOperationSettings; + private final UnaryCallSettings updateLinkSettings; + private final OperationCallSettings + updateLinkOperationSettings; + private final UnaryCallSettings deleteLinkSettings; + private final OperationCallSettings + deleteLinkOperationSettings; + private final UnaryCallSettings getTraceScopeSettings; + private final PagedCallSettings< + ListTraceScopesRequest, ListTraceScopesResponse, ListTraceScopesPagedResponse> + listTraceScopesSettings; + private final UnaryCallSettings createTraceScopeSettings; + private final UnaryCallSettings updateTraceScopeSettings; + private final UnaryCallSettings deleteTraceScopeSettings; + private final UnaryCallSettings getSettingsSettings; + private final UnaryCallSettings updateSettingsSettings; + private final OperationCallSettings + updateSettingsOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + + private static final PagedListDescriptor + LIST_BUCKETS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListBucketsRequest injectToken(ListBucketsRequest payload, String token) { + return ListBucketsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListBucketsRequest injectPageSize(ListBucketsRequest payload, int pageSize) { + return ListBucketsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListBucketsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListBucketsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListBucketsResponse payload) { + return payload.getBucketsList(); + } + }; + + private static final PagedListDescriptor + LIST_DATASETS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDatasetsRequest injectToken(ListDatasetsRequest payload, String token) { + return ListDatasetsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDatasetsRequest injectPageSize(ListDatasetsRequest payload, int pageSize) { + return ListDatasetsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDatasetsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDatasetsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListDatasetsResponse payload) { + return payload.getDatasetsList(); + } + }; + + 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(); + } + }; + + private static final PagedListDescriptor + LIST_LINKS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLinksRequest injectToken(ListLinksRequest payload, String token) { + return ListLinksRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLinksRequest injectPageSize(ListLinksRequest payload, int pageSize) { + return ListLinksRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLinksRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLinksResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLinksResponse payload) { + return payload.getLinksList(); + } + }; + + private static final PagedListDescriptor< + ListTraceScopesRequest, ListTraceScopesResponse, TraceScope> + LIST_TRACE_SCOPES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListTraceScopesRequest injectToken( + ListTraceScopesRequest payload, String token) { + return ListTraceScopesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListTraceScopesRequest injectPageSize( + ListTraceScopesRequest payload, int pageSize) { + return ListTraceScopesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListTraceScopesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListTraceScopesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListTraceScopesResponse payload) { + return payload.getTraceScopesList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListBucketsRequest, ListBucketsResponse, ListBucketsPagedResponse> + LIST_BUCKETS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListBucketsRequest, ListBucketsResponse, ListBucketsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListBucketsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_BUCKETS_PAGE_STR_DESC, request, context); + return ListBucketsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse> + LIST_DATASETS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDatasetsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_DATASETS_PAGE_STR_DESC, request, context); + return ListDatasetsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + 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< + ListLinksRequest, ListLinksResponse, ListLinksPagedResponse> + LIST_LINKS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLinksRequest, ListLinksResponse, ListLinksPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLinksRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LINKS_PAGE_STR_DESC, request, context); + return ListLinksPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListTraceScopesRequest, ListTraceScopesResponse, ListTraceScopesPagedResponse> + LIST_TRACE_SCOPES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListTraceScopesRequest, ListTraceScopesResponse, ListTraceScopesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListTraceScopesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_TRACE_SCOPES_PAGE_STR_DESC, request, context); + return ListTraceScopesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to getScope. */ + public UnaryCallSettings getScopeSettings() { + return getScopeSettings; + } + + /** Returns the object with the settings used for calls to updateScope. */ + public UnaryCallSettings updateScopeSettings() { + return updateScopeSettings; + } + + /** Returns the object with the settings used for calls to getBucket. */ + public UnaryCallSettings getBucketSettings() { + return getBucketSettings; + } + + /** Returns the object with the settings used for calls to listBuckets. */ + public PagedCallSettings + listBucketsSettings() { + return listBucketsSettings; + } + + /** 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 createBucket. */ + public OperationCallSettings + createBucketOperationSettings() { + return createBucketOperationSettings; + } + + /** 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 updateBucket. */ + public OperationCallSettings + updateBucketOperationSettings() { + return updateBucketOperationSettings; + } + + /** Returns the object with the settings used for calls to getDataset. */ + public UnaryCallSettings getDatasetSettings() { + return getDatasetSettings; + } + + /** Returns the object with the settings used for calls to listDatasets. */ + public PagedCallSettings + listDatasetsSettings() { + return listDatasetsSettings; + } + + /** 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 listViews. */ + public PagedCallSettings + listViewsSettings() { + return listViewsSettings; + } + + /** Returns the object with the settings used for calls to getLink. */ + public UnaryCallSettings getLinkSettings() { + return getLinkSettings; + } + + /** Returns the object with the settings used for calls to listLinks. */ + public PagedCallSettings + listLinksSettings() { + return listLinksSettings; + } + + /** Returns the object with the settings used for calls to createLink. */ + public UnaryCallSettings createLinkSettings() { + return createLinkSettings; + } + + /** Returns the object with the settings used for calls to createLink. */ + public OperationCallSettings + createLinkOperationSettings() { + return createLinkOperationSettings; + } + + /** Returns the object with the settings used for calls to updateLink. */ + public UnaryCallSettings updateLinkSettings() { + return updateLinkSettings; + } + + /** Returns the object with the settings used for calls to updateLink. */ + public OperationCallSettings + updateLinkOperationSettings() { + return updateLinkOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteLink. */ + public UnaryCallSettings deleteLinkSettings() { + return deleteLinkSettings; + } + + /** Returns the object with the settings used for calls to deleteLink. */ + public OperationCallSettings + deleteLinkOperationSettings() { + return deleteLinkOperationSettings; + } + + /** Returns the object with the settings used for calls to getTraceScope. */ + public UnaryCallSettings getTraceScopeSettings() { + return getTraceScopeSettings; + } + + /** Returns the object with the settings used for calls to listTraceScopes. */ + public PagedCallSettings< + ListTraceScopesRequest, ListTraceScopesResponse, ListTraceScopesPagedResponse> + listTraceScopesSettings() { + return listTraceScopesSettings; + } + + /** Returns the object with the settings used for calls to createTraceScope. */ + public UnaryCallSettings createTraceScopeSettings() { + return createTraceScopeSettings; + } + + /** Returns the object with the settings used for calls to updateTraceScope. */ + public UnaryCallSettings updateTraceScopeSettings() { + return updateTraceScopeSettings; + } + + /** Returns the object with the settings used for calls to deleteTraceScope. */ + public UnaryCallSettings deleteTraceScopeSettings() { + return deleteTraceScopeSettings; + } + + /** Returns the object with the settings used for calls to getSettings. */ + public UnaryCallSettings getSettingsSettings() { + return getSettingsSettings; + } + + /** Returns the object with the settings used for calls to updateSettings. */ + public UnaryCallSettings updateSettingsSettings() { + return updateSettingsSettings; + } + + /** Returns the object with the settings used for calls to updateSettings. */ + public OperationCallSettings + updateSettingsOperationSettings() { + return updateSettingsOperationSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + public ObservabilityStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcObservabilityStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonObservabilityStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "observability"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "observability.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "observability.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ObservabilityStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ObservabilityStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ObservabilityStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(@Nullable ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ObservabilityStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + getScopeSettings = settingsBuilder.getScopeSettings().build(); + updateScopeSettings = settingsBuilder.updateScopeSettings().build(); + getBucketSettings = settingsBuilder.getBucketSettings().build(); + listBucketsSettings = settingsBuilder.listBucketsSettings().build(); + createBucketSettings = settingsBuilder.createBucketSettings().build(); + createBucketOperationSettings = settingsBuilder.createBucketOperationSettings().build(); + updateBucketSettings = settingsBuilder.updateBucketSettings().build(); + updateBucketOperationSettings = settingsBuilder.updateBucketOperationSettings().build(); + getDatasetSettings = settingsBuilder.getDatasetSettings().build(); + listDatasetsSettings = settingsBuilder.listDatasetsSettings().build(); + getViewSettings = settingsBuilder.getViewSettings().build(); + listViewsSettings = settingsBuilder.listViewsSettings().build(); + getLinkSettings = settingsBuilder.getLinkSettings().build(); + listLinksSettings = settingsBuilder.listLinksSettings().build(); + createLinkSettings = settingsBuilder.createLinkSettings().build(); + createLinkOperationSettings = settingsBuilder.createLinkOperationSettings().build(); + updateLinkSettings = settingsBuilder.updateLinkSettings().build(); + updateLinkOperationSettings = settingsBuilder.updateLinkOperationSettings().build(); + deleteLinkSettings = settingsBuilder.deleteLinkSettings().build(); + deleteLinkOperationSettings = settingsBuilder.deleteLinkOperationSettings().build(); + getTraceScopeSettings = settingsBuilder.getTraceScopeSettings().build(); + listTraceScopesSettings = settingsBuilder.listTraceScopesSettings().build(); + createTraceScopeSettings = settingsBuilder.createTraceScopeSettings().build(); + updateTraceScopeSettings = settingsBuilder.updateTraceScopeSettings().build(); + deleteTraceScopeSettings = settingsBuilder.deleteTraceScopeSettings().build(); + getSettingsSettings = settingsBuilder.getSettingsSettings().build(); + updateSettingsSettings = settingsBuilder.updateSettingsSettings().build(); + updateSettingsOperationSettings = settingsBuilder.updateSettingsOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-observability") + .setRepository("googleapis/google-cloud-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for ObservabilityStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder getScopeSettings; + private final UnaryCallSettings.Builder updateScopeSettings; + private final UnaryCallSettings.Builder getBucketSettings; + private final PagedCallSettings.Builder< + ListBucketsRequest, ListBucketsResponse, ListBucketsPagedResponse> + listBucketsSettings; + private final UnaryCallSettings.Builder createBucketSettings; + private final OperationCallSettings.Builder + createBucketOperationSettings; + private final UnaryCallSettings.Builder updateBucketSettings; + private final OperationCallSettings.Builder + updateBucketOperationSettings; + private final UnaryCallSettings.Builder getDatasetSettings; + private final PagedCallSettings.Builder< + ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse> + listDatasetsSettings; + private final UnaryCallSettings.Builder getViewSettings; + private final PagedCallSettings.Builder< + ListViewsRequest, ListViewsResponse, ListViewsPagedResponse> + listViewsSettings; + private final UnaryCallSettings.Builder getLinkSettings; + private final PagedCallSettings.Builder< + ListLinksRequest, ListLinksResponse, ListLinksPagedResponse> + listLinksSettings; + private final UnaryCallSettings.Builder createLinkSettings; + private final OperationCallSettings.Builder + createLinkOperationSettings; + private final UnaryCallSettings.Builder updateLinkSettings; + private final OperationCallSettings.Builder + updateLinkOperationSettings; + private final UnaryCallSettings.Builder deleteLinkSettings; + private final OperationCallSettings.Builder + deleteLinkOperationSettings; + private final UnaryCallSettings.Builder getTraceScopeSettings; + private final PagedCallSettings.Builder< + ListTraceScopesRequest, ListTraceScopesResponse, ListTraceScopesPagedResponse> + listTraceScopesSettings; + private final UnaryCallSettings.Builder + createTraceScopeSettings; + private final UnaryCallSettings.Builder + updateTraceScopeSettings; + private final UnaryCallSettings.Builder + deleteTraceScopeSettings; + private final UnaryCallSettings.Builder getSettingsSettings; + private final UnaryCallSettings.Builder + updateSettingsSettings; + private final OperationCallSettings.Builder + updateSettingsOperationSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(@Nullable ClientContext clientContext) { + super(clientContext); + + getScopeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateScopeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getBucketSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listBucketsSettings = PagedCallSettings.newBuilder(LIST_BUCKETS_PAGE_STR_FACT); + createBucketSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createBucketOperationSettings = OperationCallSettings.newBuilder(); + updateBucketSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateBucketOperationSettings = OperationCallSettings.newBuilder(); + getDatasetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listDatasetsSettings = PagedCallSettings.newBuilder(LIST_DATASETS_PAGE_STR_FACT); + getViewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listViewsSettings = PagedCallSettings.newBuilder(LIST_VIEWS_PAGE_STR_FACT); + getLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLinksSettings = PagedCallSettings.newBuilder(LIST_LINKS_PAGE_STR_FACT); + createLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createLinkOperationSettings = OperationCallSettings.newBuilder(); + updateLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateLinkOperationSettings = OperationCallSettings.newBuilder(); + deleteLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteLinkOperationSettings = OperationCallSettings.newBuilder(); + getTraceScopeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listTraceScopesSettings = PagedCallSettings.newBuilder(LIST_TRACE_SCOPES_PAGE_STR_FACT); + createTraceScopeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateTraceScopeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteTraceScopeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateSettingsOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getScopeSettings, + updateScopeSettings, + getBucketSettings, + listBucketsSettings, + createBucketSettings, + updateBucketSettings, + getDatasetSettings, + listDatasetsSettings, + getViewSettings, + listViewsSettings, + getLinkSettings, + listLinksSettings, + createLinkSettings, + updateLinkSettings, + deleteLinkSettings, + getTraceScopeSettings, + listTraceScopesSettings, + createTraceScopeSettings, + updateTraceScopeSettings, + deleteTraceScopeSettings, + getSettingsSettings, + updateSettingsSettings, + listLocationsSettings, + getLocationSettings); + initDefaults(this); + } + + protected Builder(ObservabilityStubSettings settings) { + super(settings); + + getScopeSettings = settings.getScopeSettings.toBuilder(); + updateScopeSettings = settings.updateScopeSettings.toBuilder(); + getBucketSettings = settings.getBucketSettings.toBuilder(); + listBucketsSettings = settings.listBucketsSettings.toBuilder(); + createBucketSettings = settings.createBucketSettings.toBuilder(); + createBucketOperationSettings = settings.createBucketOperationSettings.toBuilder(); + updateBucketSettings = settings.updateBucketSettings.toBuilder(); + updateBucketOperationSettings = settings.updateBucketOperationSettings.toBuilder(); + getDatasetSettings = settings.getDatasetSettings.toBuilder(); + listDatasetsSettings = settings.listDatasetsSettings.toBuilder(); + getViewSettings = settings.getViewSettings.toBuilder(); + listViewsSettings = settings.listViewsSettings.toBuilder(); + getLinkSettings = settings.getLinkSettings.toBuilder(); + listLinksSettings = settings.listLinksSettings.toBuilder(); + createLinkSettings = settings.createLinkSettings.toBuilder(); + createLinkOperationSettings = settings.createLinkOperationSettings.toBuilder(); + updateLinkSettings = settings.updateLinkSettings.toBuilder(); + updateLinkOperationSettings = settings.updateLinkOperationSettings.toBuilder(); + deleteLinkSettings = settings.deleteLinkSettings.toBuilder(); + deleteLinkOperationSettings = settings.deleteLinkOperationSettings.toBuilder(); + getTraceScopeSettings = settings.getTraceScopeSettings.toBuilder(); + listTraceScopesSettings = settings.listTraceScopesSettings.toBuilder(); + createTraceScopeSettings = settings.createTraceScopeSettings.toBuilder(); + updateTraceScopeSettings = settings.updateTraceScopeSettings.toBuilder(); + deleteTraceScopeSettings = settings.deleteTraceScopeSettings.toBuilder(); + getSettingsSettings = settings.getSettingsSettings.toBuilder(); + updateSettingsSettings = settings.updateSettingsSettings.toBuilder(); + updateSettingsOperationSettings = settings.updateSettingsOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getScopeSettings, + updateScopeSettings, + getBucketSettings, + listBucketsSettings, + createBucketSettings, + updateBucketSettings, + getDatasetSettings, + listDatasetsSettings, + getViewSettings, + listViewsSettings, + getLinkSettings, + listLinksSettings, + createLinkSettings, + updateLinkSettings, + deleteLinkSettings, + getTraceScopeSettings, + listTraceScopesSettings, + createTraceScopeSettings, + updateTraceScopeSettings, + deleteTraceScopeSettings, + getSettingsSettings, + updateSettingsSettings, + listLocationsSettings, + getLocationSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .getScopeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateScopeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getBucketSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listBucketsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createBucketSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateBucketSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getDatasetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listDatasetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getViewSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listViewsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getLinkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listLinksSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createLinkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateLinkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteLinkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getTraceScopeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listTraceScopesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createTraceScopeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateTraceScopeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteTraceScopeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getSettingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateSettingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createBucketOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Bucket.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(600000L)) + .build())); + + builder + .updateBucketOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Bucket.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(600000L)) + .build())); + + builder + .createLinkOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer(ProtoOperationTransformers.ResponseTransformer.create(Link.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(600000L)) + .build())); + + builder + .updateLinkOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer(ProtoOperationTransformers.ResponseTransformer.create(Link.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(600000L)) + .build())); + + builder + .deleteLinkOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(600000L)) + .build())); + + builder + .updateSettingsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Settings.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(600000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to getScope. */ + public UnaryCallSettings.Builder getScopeSettings() { + return getScopeSettings; + } + + /** Returns the builder for the settings used for calls to updateScope. */ + public UnaryCallSettings.Builder updateScopeSettings() { + return updateScopeSettings; + } + + /** Returns the builder for the settings used for calls to getBucket. */ + public UnaryCallSettings.Builder getBucketSettings() { + return getBucketSettings; + } + + /** Returns the builder for the settings used for calls to listBuckets. */ + public PagedCallSettings.Builder< + ListBucketsRequest, ListBucketsResponse, ListBucketsPagedResponse> + listBucketsSettings() { + return listBucketsSettings; + } + + /** 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 createBucket. */ + public OperationCallSettings.Builder + createBucketOperationSettings() { + return createBucketOperationSettings; + } + + /** 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 updateBucket. */ + public OperationCallSettings.Builder + updateBucketOperationSettings() { + return updateBucketOperationSettings; + } + + /** Returns the builder for the settings used for calls to getDataset. */ + public UnaryCallSettings.Builder getDatasetSettings() { + return getDatasetSettings; + } + + /** Returns the builder for the settings used for calls to listDatasets. */ + public PagedCallSettings.Builder< + ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse> + listDatasetsSettings() { + return listDatasetsSettings; + } + + /** 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 listViews. */ + public PagedCallSettings.Builder + listViewsSettings() { + return listViewsSettings; + } + + /** Returns the builder for the settings used for calls to getLink. */ + public UnaryCallSettings.Builder getLinkSettings() { + return getLinkSettings; + } + + /** Returns the builder for the settings used for calls to listLinks. */ + public PagedCallSettings.Builder + listLinksSettings() { + return listLinksSettings; + } + + /** Returns the builder for the settings used for calls to createLink. */ + public UnaryCallSettings.Builder createLinkSettings() { + return createLinkSettings; + } + + /** Returns the builder for the settings used for calls to createLink. */ + public OperationCallSettings.Builder + createLinkOperationSettings() { + return createLinkOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateLink. */ + public UnaryCallSettings.Builder updateLinkSettings() { + return updateLinkSettings; + } + + /** Returns the builder for the settings used for calls to updateLink. */ + public OperationCallSettings.Builder + updateLinkOperationSettings() { + return updateLinkOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteLink. */ + public UnaryCallSettings.Builder deleteLinkSettings() { + return deleteLinkSettings; + } + + /** Returns the builder for the settings used for calls to deleteLink. */ + public OperationCallSettings.Builder + deleteLinkOperationSettings() { + return deleteLinkOperationSettings; + } + + /** Returns the builder for the settings used for calls to getTraceScope. */ + public UnaryCallSettings.Builder getTraceScopeSettings() { + return getTraceScopeSettings; + } + + /** Returns the builder for the settings used for calls to listTraceScopes. */ + public PagedCallSettings.Builder< + ListTraceScopesRequest, ListTraceScopesResponse, ListTraceScopesPagedResponse> + listTraceScopesSettings() { + return listTraceScopesSettings; + } + + /** Returns the builder for the settings used for calls to createTraceScope. */ + public UnaryCallSettings.Builder + createTraceScopeSettings() { + return createTraceScopeSettings; + } + + /** Returns the builder for the settings used for calls to updateTraceScope. */ + public UnaryCallSettings.Builder + updateTraceScopeSettings() { + return updateTraceScopeSettings; + } + + /** Returns the builder for the settings used for calls to deleteTraceScope. */ + public UnaryCallSettings.Builder deleteTraceScopeSettings() { + return deleteTraceScopeSettings; + } + + /** Returns the builder for the settings used for calls to getSettings. */ + public UnaryCallSettings.Builder getSettingsSettings() { + return getSettingsSettings; + } + + /** Returns the builder for the settings used for calls to updateSettings. */ + public UnaryCallSettings.Builder updateSettingsSettings() { + return updateSettingsSettings; + } + + /** Returns the builder for the settings used for calls to updateSettings. */ + public OperationCallSettings.Builder + updateSettingsOperationSettings() { + return updateSettingsOperationSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + @Override + public ObservabilityStubSettings build() throws IOException { + return new ObservabilityStubSettings(this); + } + } +} diff --git a/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/Version.java b/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/Version.java new file mode 100644 index 000000000000..fea95d6351ac --- /dev/null +++ b/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/Version.java @@ -0,0 +1,27 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.stub; + +import com.google.api.core.InternalApi; + +@InternalApi("For internal use only") +final class Version { + // {x-version-update-start:google-cloud-observability:current} + static final String VERSION = "0.0.0-SNAPSHOT"; + // {x-version-update-end} + +} diff --git a/java-observability/google-cloud-observability/src/main/resources/META-INF/native-image/com.google.cloud.observability.v1/reflect-config.json b/java-observability/google-cloud-observability/src/main/resources/META-INF/native-image/com.google.cloud.observability.v1/reflect-config.json new file mode 100644 index 000000000000..82dba2b4c868 --- /dev/null +++ b/java-observability/google-cloud-observability/src/main/resources/META-INF/native-image/com.google.cloud.observability.v1/reflect-config.json @@ -0,0 +1,2243 @@ +[ + { + "name": "com.google.api.BatchingConfigProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingConfigProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryOrganization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FlowControlLimitExceededBehaviorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.LaunchStage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$History", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.Bucket", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.Bucket$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.CmekSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.CmekSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.CreateBucketRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.CreateBucketRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.CreateLinkRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.CreateLinkRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.CreateTraceScopeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.CreateTraceScopeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.Dataset", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.Dataset$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.DeleteLinkRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.DeleteLinkRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.DeleteTraceScopeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.DeleteTraceScopeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.GetBucketRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.GetBucketRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.GetDatasetRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.GetDatasetRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.GetLinkRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.GetLinkRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.GetScopeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.GetScopeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.GetSettingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.GetSettingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.GetTraceScopeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.GetTraceScopeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.GetViewRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.GetViewRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.Link", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.Link$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.ListBucketsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.ListBucketsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.ListBucketsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.ListBucketsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.ListDatasetsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.ListDatasetsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.ListDatasetsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.ListDatasetsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.ListLinksRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.ListLinksRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.ListLinksResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.ListLinksResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.ListTraceScopesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.ListTraceScopesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.ListTraceScopesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.ListTraceScopesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.ListViewsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.ListViewsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.ListViewsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.ListViewsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.OperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.OperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.Scope", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.Scope$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.Settings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.Settings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.TraceScope", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.TraceScope$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.UpdateBucketRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.UpdateBucketRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.UpdateLinkRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.UpdateLinkRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.UpdateScopeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.UpdateScopeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.UpdateSettingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.UpdateSettingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.UpdateTraceScopeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.UpdateTraceScopeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.View", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.observability.v1.View$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$Edition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnforceNamingStyle", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$FieldPresence", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$JsonFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$MessageEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$RepeatedFieldEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Utf8Validation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$DefaultSymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-observability/google-cloud-observability/src/test/java/com/google/cloud/observability/v1/MockLocations.java b/java-observability/google-cloud-observability/src/test/java/com/google/cloud/observability/v1/MockLocations.java new file mode 100644 index 000000000000..65facd3a9fb7 --- /dev/null +++ b/java-observability/google-cloud-observability/src/test/java/com/google/cloud/observability/v1/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-observability/google-cloud-observability/src/test/java/com/google/cloud/observability/v1/MockLocationsImpl.java b/java-observability/google-cloud-observability/src/test/java/com/google/cloud/observability/v1/MockLocationsImpl.java new file mode 100644 index 000000000000..50deabb3542d --- /dev/null +++ b/java-observability/google-cloud-observability/src/test/java/com/google/cloud/observability/v1/MockLocationsImpl.java @@ -0,0 +1,105 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listLocations( + ListLocationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLocationsResponse) { + requests.add(request); + responseObserver.onNext(((ListLocationsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListLocations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLocationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLocation(GetLocationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Location) { + requests.add(request); + responseObserver.onNext(((Location) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetLocation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Location.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-observability/google-cloud-observability/src/test/java/com/google/cloud/observability/v1/MockObservability.java b/java-observability/google-cloud-observability/src/test/java/com/google/cloud/observability/v1/MockObservability.java new file mode 100644 index 000000000000..fb0a48c9ca58 --- /dev/null +++ b/java-observability/google-cloud-observability/src/test/java/com/google/cloud/observability/v1/MockObservability.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockObservability implements MockGrpcService { + private final MockObservabilityImpl serviceImpl; + + public MockObservability() { + serviceImpl = new MockObservabilityImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-observability/google-cloud-observability/src/test/java/com/google/cloud/observability/v1/MockObservabilityImpl.java b/java-observability/google-cloud-observability/src/test/java/com/google/cloud/observability/v1/MockObservabilityImpl.java new file mode 100644 index 000000000000..f691f8e7759f --- /dev/null +++ b/java-observability/google-cloud-observability/src/test/java/com/google/cloud/observability/v1/MockObservabilityImpl.java @@ -0,0 +1,514 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.cloud.observability.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.observability.v1.ObservabilityGrpc.ObservabilityImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockObservabilityImpl extends ObservabilityImplBase { + private List requests; + private Queue responses; + + public MockObservabilityImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void getScope(GetScopeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Scope) { + requests.add(request); + responseObserver.onNext(((Scope) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetScope, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Scope.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateScope(UpdateScopeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Scope) { + requests.add(request); + responseObserver.onNext(((Scope) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateScope, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Scope.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getBucket(GetBucketRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Bucket) { + requests.add(request); + responseObserver.onNext(((Bucket) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetBucket, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Bucket.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listBuckets( + ListBucketsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListBucketsResponse) { + requests.add(request); + responseObserver.onNext(((ListBucketsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListBuckets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListBucketsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createBucket( + CreateBucketRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateBucket, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateBucket( + UpdateBucketRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateBucket, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getDataset(GetDatasetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Dataset) { + requests.add(request); + responseObserver.onNext(((Dataset) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetDataset, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Dataset.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listDatasets( + ListDatasetsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDatasetsResponse) { + requests.add(request); + responseObserver.onNext(((ListDatasetsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListDatasets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListDatasetsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getView(GetViewRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof View) { + requests.add(request); + responseObserver.onNext(((View) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetView, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + View.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listViews( + ListViewsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method ListViews, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListViewsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLink(GetLinkRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Link) { + requests.add(request); + responseObserver.onNext(((Link) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetLink, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Link.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listLinks( + ListLinksRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLinksResponse) { + requests.add(request); + responseObserver.onNext(((ListLinksResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListLinks, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLinksResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createLink(CreateLinkRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateLink, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateLink(UpdateLinkRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateLink, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteLink(DeleteLinkRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteLink, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getTraceScope( + GetTraceScopeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TraceScope) { + requests.add(request); + responseObserver.onNext(((TraceScope) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetTraceScope, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TraceScope.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listTraceScopes( + ListTraceScopesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListTraceScopesResponse) { + requests.add(request); + responseObserver.onNext(((ListTraceScopesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListTraceScopes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListTraceScopesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createTraceScope( + CreateTraceScopeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TraceScope) { + requests.add(request); + responseObserver.onNext(((TraceScope) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateTraceScope, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TraceScope.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateTraceScope( + UpdateTraceScopeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TraceScope) { + requests.add(request); + responseObserver.onNext(((TraceScope) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateTraceScope, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TraceScope.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteTraceScope( + DeleteTraceScopeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method DeleteTraceScope, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getSettings(GetSettingsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Settings) { + requests.add(request); + responseObserver.onNext(((Settings) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetSettings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Settings.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateSettings( + UpdateSettingsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateSettings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-observability/google-cloud-observability/src/test/java/com/google/cloud/observability/v1/ObservabilityClientHttpJsonTest.java b/java-observability/google-cloud-observability/src/test/java/com/google/cloud/observability/v1/ObservabilityClientHttpJsonTest.java new file mode 100644 index 000000000000..d0d4042fd63d --- /dev/null +++ b/java-observability/google-cloud-observability/src/test/java/com/google/cloud/observability/v1/ObservabilityClientHttpJsonTest.java @@ -0,0 +1,2257 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1; + +import static com.google.cloud.observability.v1.ObservabilityClient.ListBucketsPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListDatasetsPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListLinksPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListLocationsPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListTraceScopesPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListViewsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.observability.v1.stub.HttpJsonObservabilityStub; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ObservabilityClientHttpJsonTest { + private static MockHttpService mockService; + private static ObservabilityClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonObservabilityStub.getMethodDescriptors(), + ObservabilitySettings.getDefaultEndpoint()); + ObservabilitySettings settings = + ObservabilitySettings.newHttpJsonBuilder() + .setTransportChannelProvider( + ObservabilitySettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ObservabilityClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void getScopeTest() throws Exception { + Scope expectedResponse = + Scope.newBuilder() + .setName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLogScope("logScope2002130288") + .setTraceScope("traceScope976576527") + .build(); + mockService.addResponse(expectedResponse); + + ScopeName name = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]"); + + Scope actualResponse = client.getScope(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getScopeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ScopeName name = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]"); + client.getScope(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getScopeTest2() throws Exception { + Scope expectedResponse = + Scope.newBuilder() + .setName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLogScope("logScope2002130288") + .setTraceScope("traceScope976576527") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-6287/locations/location-6287/scopes/scope-6287"; + + Scope actualResponse = client.getScope(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getScopeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6287/locations/location-6287/scopes/scope-6287"; + client.getScope(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateScopeTest() throws Exception { + Scope expectedResponse = + Scope.newBuilder() + .setName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLogScope("logScope2002130288") + .setTraceScope("traceScope976576527") + .build(); + mockService.addResponse(expectedResponse); + + Scope scope = + Scope.newBuilder() + .setName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLogScope("logScope2002130288") + .setTraceScope("traceScope976576527") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Scope actualResponse = client.updateScope(scope, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateScopeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Scope scope = + Scope.newBuilder() + .setName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLogScope("logScope2002130288") + .setTraceScope("traceScope976576527") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateScope(scope, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBucketTest() throws Exception { + Bucket expectedResponse = + Bucket.newBuilder() + .setName(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setCmekSettings(CmekSettings.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + BucketName name = BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]"); + + Bucket actualResponse = client.getBucket(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getBucketExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BucketName name = BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]"); + client.getBucket(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBucketTest2() throws Exception { + Bucket expectedResponse = + Bucket.newBuilder() + .setName(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setCmekSettings(CmekSettings.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-4529/locations/location-4529/buckets/bucket-4529"; + + Bucket actualResponse = client.getBucket(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getBucketExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-4529/locations/location-4529/buckets/bucket-4529"; + client.getBucket(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBucketsTest() throws Exception { + Bucket responsesElement = Bucket.newBuilder().build(); + ListBucketsResponse expectedResponse = + ListBucketsResponse.newBuilder() + .setNextPageToken("") + .addAllBuckets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListBucketsPagedResponse pagedListResponse = client.listBuckets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listBucketsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listBuckets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBucketsTest2() throws Exception { + Bucket responsesElement = Bucket.newBuilder().build(); + ListBucketsResponse expectedResponse = + ListBucketsResponse.newBuilder() + .setNextPageToken("") + .addAllBuckets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListBucketsPagedResponse pagedListResponse = client.listBuckets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listBucketsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listBuckets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createBucketTest() throws Exception { + Bucket expectedResponse = + Bucket.newBuilder() + .setName(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setCmekSettings(CmekSettings.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBucketTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Bucket bucket = Bucket.newBuilder().build(); + String bucketId = "bucketId-1603305307"; + + Bucket actualResponse = client.createBucketAsync(parent, bucket, bucketId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createBucketExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Bucket bucket = Bucket.newBuilder().build(); + String bucketId = "bucketId-1603305307"; + client.createBucketAsync(parent, bucket, bucketId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createBucketTest2() throws Exception { + Bucket expectedResponse = + Bucket.newBuilder() + .setName(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setCmekSettings(CmekSettings.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBucketTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Bucket bucket = Bucket.newBuilder().build(); + String bucketId = "bucketId-1603305307"; + + Bucket actualResponse = client.createBucketAsync(parent, bucket, bucketId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createBucketExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Bucket bucket = Bucket.newBuilder().build(); + String bucketId = "bucketId-1603305307"; + client.createBucketAsync(parent, bucket, bucketId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateBucketTest() throws Exception { + Bucket expectedResponse = + Bucket.newBuilder() + .setName(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setCmekSettings(CmekSettings.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateBucketTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Bucket bucket = + Bucket.newBuilder() + .setName(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setCmekSettings(CmekSettings.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Bucket actualResponse = client.updateBucketAsync(bucket, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateBucketExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Bucket bucket = + Bucket.newBuilder() + .setName(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setCmekSettings(CmekSettings.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateBucketAsync(bucket, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getDatasetTest() throws Exception { + Dataset expectedResponse = + Dataset.newBuilder() + .setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]"); + + Dataset actualResponse = client.getDataset(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getDatasetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]"); + client.getDataset(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDatasetTest2() throws Exception { + Dataset expectedResponse = + Dataset.newBuilder() + .setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-9818/locations/location-9818/buckets/bucket-9818/datasets/dataset-9818"; + + Dataset actualResponse = client.getDataset(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getDatasetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-9818/locations/location-9818/buckets/bucket-9818/datasets/dataset-9818"; + client.getDataset(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDatasetsTest() throws Exception { + Dataset responsesElement = Dataset.newBuilder().build(); + ListDatasetsResponse expectedResponse = + ListDatasetsResponse.newBuilder() + .setNextPageToken("") + .addAllDatasets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + BucketName parent = BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]"); + + ListDatasetsPagedResponse pagedListResponse = client.listDatasets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDatasetsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listDatasetsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BucketName parent = BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]"); + client.listDatasets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDatasetsTest2() throws Exception { + Dataset responsesElement = Dataset.newBuilder().build(); + ListDatasetsResponse expectedResponse = + ListDatasetsResponse.newBuilder() + .setNextPageToken("") + .addAllDatasets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-738/locations/location-738/buckets/bucket-738"; + + ListDatasetsPagedResponse pagedListResponse = client.listDatasets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDatasetsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listDatasetsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-738/locations/location-738/buckets/bucket-738"; + client.listDatasets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getViewTest() throws Exception { + View expectedResponse = + View.newBuilder() + .setName( + ViewName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[VIEW]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ViewName name = ViewName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[VIEW]"); + + View actualResponse = client.getView(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getViewExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ViewName name = ViewName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[VIEW]"); + client.getView(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getViewTest2() throws Exception { + View expectedResponse = + View.newBuilder() + .setName( + ViewName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[VIEW]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-9312/locations/location-9312/buckets/bucket-9312/datasets/dataset-9312/views/view-9312"; + + View actualResponse = client.getView(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getViewExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-9312/locations/location-9312/buckets/bucket-9312/datasets/dataset-9312/views/view-9312"; + client.getView(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listViewsTest() throws Exception { + View responsesElement = View.newBuilder().build(); + ListViewsResponse expectedResponse = + ListViewsResponse.newBuilder() + .setNextPageToken("") + .addAllViews(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]"); + + 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 = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listViewsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]"); + client.listViews(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listViewsTest2() throws Exception { + View responsesElement = View.newBuilder().build(); + ListViewsResponse expectedResponse = + ListViewsResponse.newBuilder() + .setNextPageToken("") + .addAllViews(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-9223/locations/location-9223/buckets/bucket-9223/datasets/dataset-9223"; + + 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 = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listViewsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-9223/locations/location-9223/buckets/bucket-9223/datasets/dataset-9223"; + client.listViews(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLinkTest() throws Exception { + Link expectedResponse = + Link.newBuilder() + .setName( + LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + LinkName name = LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]"); + + Link actualResponse = client.getLink(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLinkExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LinkName name = LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]"); + client.getLink(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLinkTest2() throws Exception { + Link expectedResponse = + Link.newBuilder() + .setName( + LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-9963/locations/location-9963/buckets/bucket-9963/datasets/dataset-9963/links/link-9963"; + + Link actualResponse = client.getLink(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLinkExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-9963/locations/location-9963/buckets/bucket-9963/datasets/dataset-9963/links/link-9963"; + client.getLink(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLinksTest() throws Exception { + Link responsesElement = Link.newBuilder().build(); + ListLinksResponse expectedResponse = + ListLinksResponse.newBuilder() + .setNextPageToken("") + .addAllLinks(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]"); + + ListLinksPagedResponse pagedListResponse = client.listLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLinksList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLinksExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]"); + client.listLinks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLinksTest2() throws Exception { + Link responsesElement = Link.newBuilder().build(); + ListLinksResponse expectedResponse = + ListLinksResponse.newBuilder() + .setNextPageToken("") + .addAllLinks(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-9223/locations/location-9223/buckets/bucket-9223/datasets/dataset-9223"; + + ListLinksPagedResponse pagedListResponse = client.listLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLinksList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLinksExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-9223/locations/location-9223/buckets/bucket-9223/datasets/dataset-9223"; + client.listLinks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createLinkTest() throws Exception { + Link expectedResponse = + Link.newBuilder() + .setName( + LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createLinkTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]"); + Link link = Link.newBuilder().build(); + String linkId = "linkId-1102667083"; + + Link actualResponse = client.createLinkAsync(parent, link, linkId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createLinkExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]"); + Link link = Link.newBuilder().build(); + String linkId = "linkId-1102667083"; + client.createLinkAsync(parent, link, linkId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createLinkTest2() throws Exception { + Link expectedResponse = + Link.newBuilder() + .setName( + LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createLinkTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = + "projects/project-9223/locations/location-9223/buckets/bucket-9223/datasets/dataset-9223"; + Link link = Link.newBuilder().build(); + String linkId = "linkId-1102667083"; + + Link actualResponse = client.createLinkAsync(parent, link, linkId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createLinkExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-9223/locations/location-9223/buckets/bucket-9223/datasets/dataset-9223"; + Link link = Link.newBuilder().build(); + String linkId = "linkId-1102667083"; + client.createLinkAsync(parent, link, linkId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateLinkTest() throws Exception { + Link expectedResponse = + Link.newBuilder() + .setName( + LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateLinkTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Link link = + Link.newBuilder() + .setName( + LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Link actualResponse = client.updateLinkAsync(link, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateLinkExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Link link = + Link.newBuilder() + .setName( + LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateLinkAsync(link, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteLinkTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteLinkTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LinkName name = LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]"); + + client.deleteLinkAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteLinkExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LinkName name = LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]"); + client.deleteLinkAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteLinkTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteLinkTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-9963/locations/location-9963/buckets/bucket-9963/datasets/dataset-9963/links/link-9963"; + + client.deleteLinkAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteLinkExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-9963/locations/location-9963/buckets/bucket-9963/datasets/dataset-9963/links/link-9963"; + client.deleteLinkAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getTraceScopeTest() throws Exception { + TraceScope expectedResponse = + TraceScope.newBuilder() + .setName(TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString()) + .addAllResourceNames(new ArrayList()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + TraceScopeName name = TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]"); + + TraceScope actualResponse = client.getTraceScope(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getTraceScopeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TraceScopeName name = TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]"); + client.getTraceScope(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTraceScopeTest2() throws Exception { + TraceScope expectedResponse = + TraceScope.newBuilder() + .setName(TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString()) + .addAllResourceNames(new ArrayList()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-9962/locations/location-9962/traceScopes/traceScope-9962"; + + TraceScope actualResponse = client.getTraceScope(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getTraceScopeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-9962/locations/location-9962/traceScopes/traceScope-9962"; + client.getTraceScope(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTraceScopesTest() throws Exception { + TraceScope responsesElement = TraceScope.newBuilder().build(); + ListTraceScopesResponse expectedResponse = + ListTraceScopesResponse.newBuilder() + .setNextPageToken("") + .addAllTraceScopes(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListTraceScopesPagedResponse pagedListResponse = client.listTraceScopes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTraceScopesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listTraceScopesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listTraceScopes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTraceScopesTest2() throws Exception { + TraceScope responsesElement = TraceScope.newBuilder().build(); + ListTraceScopesResponse expectedResponse = + ListTraceScopesResponse.newBuilder() + .setNextPageToken("") + .addAllTraceScopes(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListTraceScopesPagedResponse pagedListResponse = client.listTraceScopes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTraceScopesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listTraceScopesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listTraceScopes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createTraceScopeTest() throws Exception { + TraceScope expectedResponse = + TraceScope.newBuilder() + .setName(TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString()) + .addAllResourceNames(new ArrayList()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + TraceScope traceScope = TraceScope.newBuilder().build(); + String traceScopeId = "traceScopeId-2107793014"; + + TraceScope actualResponse = client.createTraceScope(parent, traceScope, traceScopeId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createTraceScopeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + TraceScope traceScope = TraceScope.newBuilder().build(); + String traceScopeId = "traceScopeId-2107793014"; + client.createTraceScope(parent, traceScope, traceScopeId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createTraceScopeTest2() throws Exception { + TraceScope expectedResponse = + TraceScope.newBuilder() + .setName(TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString()) + .addAllResourceNames(new ArrayList()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + TraceScope traceScope = TraceScope.newBuilder().build(); + String traceScopeId = "traceScopeId-2107793014"; + + TraceScope actualResponse = client.createTraceScope(parent, traceScope, traceScopeId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createTraceScopeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + TraceScope traceScope = TraceScope.newBuilder().build(); + String traceScopeId = "traceScopeId-2107793014"; + client.createTraceScope(parent, traceScope, traceScopeId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateTraceScopeTest() throws Exception { + TraceScope expectedResponse = + TraceScope.newBuilder() + .setName(TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString()) + .addAllResourceNames(new ArrayList()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + TraceScope traceScope = + TraceScope.newBuilder() + .setName(TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString()) + .addAllResourceNames(new ArrayList()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + TraceScope actualResponse = client.updateTraceScope(traceScope, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateTraceScopeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TraceScope traceScope = + TraceScope.newBuilder() + .setName(TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString()) + .addAllResourceNames(new ArrayList()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateTraceScope(traceScope, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteTraceScopeTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + TraceScopeName name = TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]"); + + client.deleteTraceScope(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteTraceScopeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TraceScopeName name = TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]"); + client.deleteTraceScope(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteTraceScopeTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-9962/locations/location-9962/traceScopes/traceScope-9962"; + + client.deleteTraceScope(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteTraceScopeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-9962/locations/location-9962/traceScopes/traceScope-9962"; + client.deleteTraceScope(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSettingsTest() throws Exception { + Settings expectedResponse = + Settings.newBuilder() + .setName(SettingsName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString()) + .setDefaultStorageLocation("defaultStorageLocation-872738097") + .setServiceAccountId("serviceAccountId1964232947") + .setKmsKeyName("kmsKeyName412586233") + .build(); + mockService.addResponse(expectedResponse); + + SettingsName name = SettingsName.ofProjectLocationName("[PROJECT]", "[LOCATION]"); + + Settings actualResponse = client.getSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSettingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SettingsName name = SettingsName.ofProjectLocationName("[PROJECT]", "[LOCATION]"); + client.getSettings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSettingsTest2() throws Exception { + Settings expectedResponse = + Settings.newBuilder() + .setName(SettingsName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString()) + .setDefaultStorageLocation("defaultStorageLocation-872738097") + .setServiceAccountId("serviceAccountId1964232947") + .setKmsKeyName("kmsKeyName412586233") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7640/locations/location-7640/settings"; + + Settings actualResponse = client.getSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSettingsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7640/locations/location-7640/settings"; + client.getSettings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateSettingsTest() throws Exception { + Settings expectedResponse = + Settings.newBuilder() + .setName(SettingsName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString()) + .setDefaultStorageLocation("defaultStorageLocation-872738097") + .setServiceAccountId("serviceAccountId1964232947") + .setKmsKeyName("kmsKeyName412586233") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateSettingsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Settings settings = + Settings.newBuilder() + .setName(SettingsName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString()) + .setDefaultStorageLocation("defaultStorageLocation-872738097") + .setServiceAccountId("serviceAccountId1964232947") + .setKmsKeyName("kmsKeyName412586233") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Settings actualResponse = client.updateSettingsAsync(settings, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateSettingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Settings settings = + Settings.newBuilder() + .setName(SettingsName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString()) + .setDefaultStorageLocation("defaultStorageLocation-872738097") + .setServiceAccountId("serviceAccountId1964232947") + .setKmsKeyName("kmsKeyName412586233") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSettingsAsync(settings, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-observability/google-cloud-observability/src/test/java/com/google/cloud/observability/v1/ObservabilityClientTest.java b/java-observability/google-cloud-observability/src/test/java/com/google/cloud/observability/v1/ObservabilityClientTest.java new file mode 100644 index 000000000000..5463397f1c04 --- /dev/null +++ b/java-observability/google-cloud-observability/src/test/java/com/google/cloud/observability/v1/ObservabilityClientTest.java @@ -0,0 +1,1971 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.cloud.observability.v1; + +import static com.google.cloud.observability.v1.ObservabilityClient.ListBucketsPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListDatasetsPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListLinksPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListLocationsPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListTraceScopesPagedResponse; +import static com.google.cloud.observability.v1.ObservabilityClient.ListViewsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ObservabilityClientTest { + private static MockLocations mockLocations; + private static MockObservability mockObservability; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private ObservabilityClient client; + + @BeforeClass + public static void startStaticServer() { + mockObservability = new MockObservability(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockObservability, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ObservabilitySettings settings = + ObservabilitySettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ObservabilityClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void getScopeTest() throws Exception { + Scope expectedResponse = + Scope.newBuilder() + .setName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLogScope("logScope2002130288") + .setTraceScope("traceScope976576527") + .build(); + mockObservability.addResponse(expectedResponse); + + ScopeName name = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]"); + + Scope actualResponse = client.getScope(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetScopeRequest actualRequest = ((GetScopeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getScopeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + ScopeName name = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]"); + client.getScope(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getScopeTest2() throws Exception { + Scope expectedResponse = + Scope.newBuilder() + .setName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLogScope("logScope2002130288") + .setTraceScope("traceScope976576527") + .build(); + mockObservability.addResponse(expectedResponse); + + String name = "name3373707"; + + Scope actualResponse = client.getScope(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetScopeRequest actualRequest = ((GetScopeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getScopeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + String name = "name3373707"; + client.getScope(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateScopeTest() throws Exception { + Scope expectedResponse = + Scope.newBuilder() + .setName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLogScope("logScope2002130288") + .setTraceScope("traceScope976576527") + .build(); + mockObservability.addResponse(expectedResponse); + + Scope scope = Scope.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Scope actualResponse = client.updateScope(scope, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateScopeRequest actualRequest = ((UpdateScopeRequest) actualRequests.get(0)); + + Assert.assertEquals(scope, actualRequest.getScope()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateScopeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + Scope scope = Scope.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateScope(scope, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBucketTest() throws Exception { + Bucket expectedResponse = + Bucket.newBuilder() + .setName(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setCmekSettings(CmekSettings.newBuilder().build()) + .build(); + mockObservability.addResponse(expectedResponse); + + BucketName name = BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]"); + + Bucket actualResponse = client.getBucket(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBucketRequest actualRequest = ((GetBucketRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBucketExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + BucketName name = BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]"); + client.getBucket(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBucketTest2() throws Exception { + Bucket expectedResponse = + Bucket.newBuilder() + .setName(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setCmekSettings(CmekSettings.newBuilder().build()) + .build(); + mockObservability.addResponse(expectedResponse); + + String name = "name3373707"; + + Bucket actualResponse = client.getBucket(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBucketRequest actualRequest = ((GetBucketRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBucketExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + String name = "name3373707"; + client.getBucket(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBucketsTest() throws Exception { + Bucket responsesElement = Bucket.newBuilder().build(); + ListBucketsResponse expectedResponse = + ListBucketsResponse.newBuilder() + .setNextPageToken("") + .addAllBuckets(Arrays.asList(responsesElement)) + .build(); + mockObservability.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListBucketsPagedResponse pagedListResponse = client.listBuckets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0)); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBucketsRequest actualRequest = ((ListBucketsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBucketsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listBuckets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBucketsTest2() throws Exception { + Bucket responsesElement = Bucket.newBuilder().build(); + ListBucketsResponse expectedResponse = + ListBucketsResponse.newBuilder() + .setNextPageToken("") + .addAllBuckets(Arrays.asList(responsesElement)) + .build(); + mockObservability.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListBucketsPagedResponse pagedListResponse = client.listBuckets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBucketsList().get(0), resources.get(0)); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBucketsRequest actualRequest = ((ListBucketsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBucketsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + String parent = "parent-995424086"; + client.listBuckets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createBucketTest() throws Exception { + Bucket expectedResponse = + Bucket.newBuilder() + .setName(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setCmekSettings(CmekSettings.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBucketTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockObservability.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Bucket bucket = Bucket.newBuilder().build(); + String bucketId = "bucketId-1603305307"; + + Bucket actualResponse = client.createBucketAsync(parent, bucket, bucketId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBucketRequest actualRequest = ((CreateBucketRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(bucket, actualRequest.getBucket()); + Assert.assertEquals(bucketId, actualRequest.getBucketId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBucketExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Bucket bucket = Bucket.newBuilder().build(); + String bucketId = "bucketId-1603305307"; + client.createBucketAsync(parent, bucket, bucketId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createBucketTest2() throws Exception { + Bucket expectedResponse = + Bucket.newBuilder() + .setName(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setCmekSettings(CmekSettings.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBucketTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockObservability.addResponse(resultOperation); + + String parent = "parent-995424086"; + Bucket bucket = Bucket.newBuilder().build(); + String bucketId = "bucketId-1603305307"; + + Bucket actualResponse = client.createBucketAsync(parent, bucket, bucketId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBucketRequest actualRequest = ((CreateBucketRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(bucket, actualRequest.getBucket()); + Assert.assertEquals(bucketId, actualRequest.getBucketId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBucketExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + String parent = "parent-995424086"; + Bucket bucket = Bucket.newBuilder().build(); + String bucketId = "bucketId-1603305307"; + client.createBucketAsync(parent, bucket, bucketId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateBucketTest() throws Exception { + Bucket expectedResponse = + Bucket.newBuilder() + .setName(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .setCmekSettings(CmekSettings.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateBucketTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockObservability.addResponse(resultOperation); + + Bucket bucket = Bucket.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Bucket actualResponse = client.updateBucketAsync(bucket, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateBucketRequest actualRequest = ((UpdateBucketRequest) actualRequests.get(0)); + + Assert.assertEquals(bucket, actualRequest.getBucket()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateBucketExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + Bucket bucket = Bucket.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateBucketAsync(bucket, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getDatasetTest() throws Exception { + Dataset expectedResponse = + Dataset.newBuilder() + .setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .build(); + mockObservability.addResponse(expectedResponse); + + DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]"); + + Dataset actualResponse = client.getDataset(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDatasetRequest actualRequest = ((GetDatasetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDatasetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]"); + client.getDataset(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDatasetTest2() throws Exception { + Dataset expectedResponse = + Dataset.newBuilder() + .setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setPurgeTime(Timestamp.newBuilder().build()) + .build(); + mockObservability.addResponse(expectedResponse); + + String name = "name3373707"; + + Dataset actualResponse = client.getDataset(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDatasetRequest actualRequest = ((GetDatasetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDatasetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + String name = "name3373707"; + client.getDataset(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDatasetsTest() throws Exception { + Dataset responsesElement = Dataset.newBuilder().build(); + ListDatasetsResponse expectedResponse = + ListDatasetsResponse.newBuilder() + .setNextPageToken("") + .addAllDatasets(Arrays.asList(responsesElement)) + .build(); + mockObservability.addResponse(expectedResponse); + + BucketName parent = BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]"); + + ListDatasetsPagedResponse pagedListResponse = client.listDatasets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDatasetsList().get(0), resources.get(0)); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDatasetsRequest actualRequest = ((ListDatasetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDatasetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + BucketName parent = BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]"); + client.listDatasets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDatasetsTest2() throws Exception { + Dataset responsesElement = Dataset.newBuilder().build(); + ListDatasetsResponse expectedResponse = + ListDatasetsResponse.newBuilder() + .setNextPageToken("") + .addAllDatasets(Arrays.asList(responsesElement)) + .build(); + mockObservability.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDatasetsPagedResponse pagedListResponse = client.listDatasets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDatasetsList().get(0), resources.get(0)); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDatasetsRequest actualRequest = ((ListDatasetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDatasetsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDatasets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getViewTest() throws Exception { + View expectedResponse = + View.newBuilder() + .setName( + ViewName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[VIEW]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockObservability.addResponse(expectedResponse); + + ViewName name = ViewName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[VIEW]"); + + View actualResponse = client.getView(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetViewRequest actualRequest = ((GetViewRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getViewExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + ViewName name = ViewName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[VIEW]"); + client.getView(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getViewTest2() throws Exception { + View expectedResponse = + View.newBuilder() + .setName( + ViewName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[VIEW]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockObservability.addResponse(expectedResponse); + + String name = "name3373707"; + + View actualResponse = client.getView(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetViewRequest actualRequest = ((GetViewRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getViewExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + String name = "name3373707"; + client.getView(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listViewsTest() throws Exception { + View responsesElement = View.newBuilder().build(); + ListViewsResponse expectedResponse = + ListViewsResponse.newBuilder() + .setNextPageToken("") + .addAllViews(Arrays.asList(responsesElement)) + .build(); + mockObservability.addResponse(expectedResponse); + + DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]"); + + 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 = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListViewsRequest actualRequest = ((ListViewsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listViewsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]"); + client.listViews(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listViewsTest2() throws Exception { + View responsesElement = View.newBuilder().build(); + ListViewsResponse expectedResponse = + ListViewsResponse.newBuilder() + .setNextPageToken("") + .addAllViews(Arrays.asList(responsesElement)) + .build(); + mockObservability.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 = mockObservability.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 + public void listViewsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + String parent = "parent-995424086"; + client.listViews(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLinkTest() throws Exception { + Link expectedResponse = + Link.newBuilder() + .setName( + LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockObservability.addResponse(expectedResponse); + + LinkName name = LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]"); + + Link actualResponse = client.getLink(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLinkRequest actualRequest = ((GetLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLinkExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + LinkName name = LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]"); + client.getLink(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLinkTest2() throws Exception { + Link expectedResponse = + Link.newBuilder() + .setName( + LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockObservability.addResponse(expectedResponse); + + String name = "name3373707"; + + Link actualResponse = client.getLink(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLinkRequest actualRequest = ((GetLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLinkExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + String name = "name3373707"; + client.getLink(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLinksTest() throws Exception { + Link responsesElement = Link.newBuilder().build(); + ListLinksResponse expectedResponse = + ListLinksResponse.newBuilder() + .setNextPageToken("") + .addAllLinks(Arrays.asList(responsesElement)) + .build(); + mockObservability.addResponse(expectedResponse); + + DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]"); + + ListLinksPagedResponse pagedListResponse = client.listLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLinksList().get(0), resources.get(0)); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLinksRequest actualRequest = ((ListLinksRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLinksExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]"); + client.listLinks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLinksTest2() throws Exception { + Link responsesElement = Link.newBuilder().build(); + ListLinksResponse expectedResponse = + ListLinksResponse.newBuilder() + .setNextPageToken("") + .addAllLinks(Arrays.asList(responsesElement)) + .build(); + mockObservability.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListLinksPagedResponse pagedListResponse = client.listLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLinksList().get(0), resources.get(0)); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLinksRequest actualRequest = ((ListLinksRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLinksExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + String parent = "parent-995424086"; + client.listLinks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createLinkTest() throws Exception { + Link expectedResponse = + Link.newBuilder() + .setName( + LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createLinkTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockObservability.addResponse(resultOperation); + + DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]"); + Link link = Link.newBuilder().build(); + String linkId = "linkId-1102667083"; + + Link actualResponse = client.createLinkAsync(parent, link, linkId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateLinkRequest actualRequest = ((CreateLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(link, actualRequest.getLink()); + Assert.assertEquals(linkId, actualRequest.getLinkId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createLinkExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]"); + Link link = Link.newBuilder().build(); + String linkId = "linkId-1102667083"; + client.createLinkAsync(parent, link, linkId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createLinkTest2() throws Exception { + Link expectedResponse = + Link.newBuilder() + .setName( + LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createLinkTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockObservability.addResponse(resultOperation); + + String parent = "parent-995424086"; + Link link = Link.newBuilder().build(); + String linkId = "linkId-1102667083"; + + Link actualResponse = client.createLinkAsync(parent, link, linkId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateLinkRequest actualRequest = ((CreateLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(link, actualRequest.getLink()); + Assert.assertEquals(linkId, actualRequest.getLinkId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createLinkExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + String parent = "parent-995424086"; + Link link = Link.newBuilder().build(); + String linkId = "linkId-1102667083"; + client.createLinkAsync(parent, link, linkId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateLinkTest() throws Exception { + Link expectedResponse = + Link.newBuilder() + .setName( + LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateLinkTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockObservability.addResponse(resultOperation); + + Link link = Link.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Link actualResponse = client.updateLinkAsync(link, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateLinkRequest actualRequest = ((UpdateLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(link, actualRequest.getLink()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateLinkExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + Link link = Link.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateLinkAsync(link, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteLinkTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteLinkTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockObservability.addResponse(resultOperation); + + LinkName name = LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]"); + + client.deleteLinkAsync(name).get(); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteLinkRequest actualRequest = ((DeleteLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteLinkExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + LinkName name = LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]"); + client.deleteLinkAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteLinkTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteLinkTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockObservability.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteLinkAsync(name).get(); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteLinkRequest actualRequest = ((DeleteLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteLinkExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + String name = "name3373707"; + client.deleteLinkAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getTraceScopeTest() throws Exception { + TraceScope expectedResponse = + TraceScope.newBuilder() + .setName(TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString()) + .addAllResourceNames(new ArrayList()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockObservability.addResponse(expectedResponse); + + TraceScopeName name = TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]"); + + TraceScope actualResponse = client.getTraceScope(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTraceScopeRequest actualRequest = ((GetTraceScopeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTraceScopeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + TraceScopeName name = TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]"); + client.getTraceScope(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTraceScopeTest2() throws Exception { + TraceScope expectedResponse = + TraceScope.newBuilder() + .setName(TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString()) + .addAllResourceNames(new ArrayList()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockObservability.addResponse(expectedResponse); + + String name = "name3373707"; + + TraceScope actualResponse = client.getTraceScope(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTraceScopeRequest actualRequest = ((GetTraceScopeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTraceScopeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + String name = "name3373707"; + client.getTraceScope(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTraceScopesTest() throws Exception { + TraceScope responsesElement = TraceScope.newBuilder().build(); + ListTraceScopesResponse expectedResponse = + ListTraceScopesResponse.newBuilder() + .setNextPageToken("") + .addAllTraceScopes(Arrays.asList(responsesElement)) + .build(); + mockObservability.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListTraceScopesPagedResponse pagedListResponse = client.listTraceScopes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTraceScopesList().get(0), resources.get(0)); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTraceScopesRequest actualRequest = ((ListTraceScopesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTraceScopesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listTraceScopes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTraceScopesTest2() throws Exception { + TraceScope responsesElement = TraceScope.newBuilder().build(); + ListTraceScopesResponse expectedResponse = + ListTraceScopesResponse.newBuilder() + .setNextPageToken("") + .addAllTraceScopes(Arrays.asList(responsesElement)) + .build(); + mockObservability.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListTraceScopesPagedResponse pagedListResponse = client.listTraceScopes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTraceScopesList().get(0), resources.get(0)); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTraceScopesRequest actualRequest = ((ListTraceScopesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTraceScopesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + String parent = "parent-995424086"; + client.listTraceScopes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createTraceScopeTest() throws Exception { + TraceScope expectedResponse = + TraceScope.newBuilder() + .setName(TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString()) + .addAllResourceNames(new ArrayList()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockObservability.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + TraceScope traceScope = TraceScope.newBuilder().build(); + String traceScopeId = "traceScopeId-2107793014"; + + TraceScope actualResponse = client.createTraceScope(parent, traceScope, traceScopeId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTraceScopeRequest actualRequest = ((CreateTraceScopeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(traceScope, actualRequest.getTraceScope()); + Assert.assertEquals(traceScopeId, actualRequest.getTraceScopeId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTraceScopeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + TraceScope traceScope = TraceScope.newBuilder().build(); + String traceScopeId = "traceScopeId-2107793014"; + client.createTraceScope(parent, traceScope, traceScopeId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createTraceScopeTest2() throws Exception { + TraceScope expectedResponse = + TraceScope.newBuilder() + .setName(TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString()) + .addAllResourceNames(new ArrayList()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockObservability.addResponse(expectedResponse); + + String parent = "parent-995424086"; + TraceScope traceScope = TraceScope.newBuilder().build(); + String traceScopeId = "traceScopeId-2107793014"; + + TraceScope actualResponse = client.createTraceScope(parent, traceScope, traceScopeId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTraceScopeRequest actualRequest = ((CreateTraceScopeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(traceScope, actualRequest.getTraceScope()); + Assert.assertEquals(traceScopeId, actualRequest.getTraceScopeId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTraceScopeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + String parent = "parent-995424086"; + TraceScope traceScope = TraceScope.newBuilder().build(); + String traceScopeId = "traceScopeId-2107793014"; + client.createTraceScope(parent, traceScope, traceScopeId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateTraceScopeTest() throws Exception { + TraceScope expectedResponse = + TraceScope.newBuilder() + .setName(TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString()) + .addAllResourceNames(new ArrayList()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockObservability.addResponse(expectedResponse); + + TraceScope traceScope = TraceScope.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + TraceScope actualResponse = client.updateTraceScope(traceScope, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateTraceScopeRequest actualRequest = ((UpdateTraceScopeRequest) actualRequests.get(0)); + + Assert.assertEquals(traceScope, actualRequest.getTraceScope()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateTraceScopeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + TraceScope traceScope = TraceScope.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateTraceScope(traceScope, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteTraceScopeTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockObservability.addResponse(expectedResponse); + + TraceScopeName name = TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]"); + + client.deleteTraceScope(name); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteTraceScopeRequest actualRequest = ((DeleteTraceScopeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteTraceScopeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + TraceScopeName name = TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]"); + client.deleteTraceScope(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteTraceScopeTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockObservability.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteTraceScope(name); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteTraceScopeRequest actualRequest = ((DeleteTraceScopeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteTraceScopeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + String name = "name3373707"; + client.deleteTraceScope(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSettingsTest() throws Exception { + Settings expectedResponse = + Settings.newBuilder() + .setName(SettingsName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString()) + .setDefaultStorageLocation("defaultStorageLocation-872738097") + .setServiceAccountId("serviceAccountId1964232947") + .setKmsKeyName("kmsKeyName412586233") + .build(); + mockObservability.addResponse(expectedResponse); + + SettingsName name = SettingsName.ofProjectLocationName("[PROJECT]", "[LOCATION]"); + + Settings actualResponse = client.getSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSettingsRequest actualRequest = ((GetSettingsRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSettingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + SettingsName name = SettingsName.ofProjectLocationName("[PROJECT]", "[LOCATION]"); + client.getSettings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSettingsTest2() throws Exception { + Settings expectedResponse = + Settings.newBuilder() + .setName(SettingsName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString()) + .setDefaultStorageLocation("defaultStorageLocation-872738097") + .setServiceAccountId("serviceAccountId1964232947") + .setKmsKeyName("kmsKeyName412586233") + .build(); + mockObservability.addResponse(expectedResponse); + + String name = "name3373707"; + + Settings actualResponse = client.getSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSettingsRequest actualRequest = ((GetSettingsRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSettingsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + String name = "name3373707"; + client.getSettings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateSettingsTest() throws Exception { + Settings expectedResponse = + Settings.newBuilder() + .setName(SettingsName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString()) + .setDefaultStorageLocation("defaultStorageLocation-872738097") + .setServiceAccountId("serviceAccountId1964232947") + .setKmsKeyName("kmsKeyName412586233") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateSettingsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockObservability.addResponse(resultOperation); + + Settings settings = Settings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Settings actualResponse = client.updateSettingsAsync(settings, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockObservability.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateSettingsRequest actualRequest = ((UpdateSettingsRequest) actualRequests.get(0)); + + Assert.assertEquals(settings, actualRequest.getSettings()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateSettingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockObservability.addException(exception); + + try { + Settings settings = Settings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSettingsAsync(settings, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-observability/grpc-google-cloud-observability-v1/pom.xml b/java-observability/grpc-google-cloud-observability-v1/pom.xml new file mode 100644 index 000000000000..df093c8a76e4 --- /dev/null +++ b/java-observability/grpc-google-cloud-observability-v1/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-observability-v1 + 0.1.0-SNAPSHOT + grpc-google-cloud-observability-v1 + GRPC library for google-cloud-observability + + com.google.cloud + google-cloud-observability-parent + 0.1.0-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-observability-v1 + + + com.google.guava + guava + + + diff --git a/java-observability/grpc-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ObservabilityGrpc.java b/java-observability/grpc-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ObservabilityGrpc.java new file mode 100644 index 000000000000..d5e5d09f81b5 --- /dev/null +++ b/java-observability/grpc-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ObservabilityGrpc.java @@ -0,0 +1,3112 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.cloud.observability.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service describing handlers for resources
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class ObservabilityGrpc { + + private ObservabilityGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.cloud.observability.v1.Observability"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.GetScopeRequest, + com.google.cloud.observability.v1.Scope> + getGetScopeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetScope", + requestType = com.google.cloud.observability.v1.GetScopeRequest.class, + responseType = com.google.cloud.observability.v1.Scope.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.GetScopeRequest, + com.google.cloud.observability.v1.Scope> + getGetScopeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.GetScopeRequest, + com.google.cloud.observability.v1.Scope> + getGetScopeMethod; + if ((getGetScopeMethod = ObservabilityGrpc.getGetScopeMethod) == null) { + synchronized (ObservabilityGrpc.class) { + if ((getGetScopeMethod = ObservabilityGrpc.getGetScopeMethod) == null) { + ObservabilityGrpc.getGetScopeMethod = + getGetScopeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetScope")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.GetScopeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.Scope.getDefaultInstance())) + .setSchemaDescriptor(new ObservabilityMethodDescriptorSupplier("GetScope")) + .build(); + } + } + } + return getGetScopeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.UpdateScopeRequest, + com.google.cloud.observability.v1.Scope> + getUpdateScopeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateScope", + requestType = com.google.cloud.observability.v1.UpdateScopeRequest.class, + responseType = com.google.cloud.observability.v1.Scope.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.UpdateScopeRequest, + com.google.cloud.observability.v1.Scope> + getUpdateScopeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.UpdateScopeRequest, + com.google.cloud.observability.v1.Scope> + getUpdateScopeMethod; + if ((getUpdateScopeMethod = ObservabilityGrpc.getUpdateScopeMethod) == null) { + synchronized (ObservabilityGrpc.class) { + if ((getUpdateScopeMethod = ObservabilityGrpc.getUpdateScopeMethod) == null) { + ObservabilityGrpc.getUpdateScopeMethod = + getUpdateScopeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateScope")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.UpdateScopeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.Scope.getDefaultInstance())) + .setSchemaDescriptor(new ObservabilityMethodDescriptorSupplier("UpdateScope")) + .build(); + } + } + } + return getUpdateScopeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.GetBucketRequest, + com.google.cloud.observability.v1.Bucket> + getGetBucketMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBucket", + requestType = com.google.cloud.observability.v1.GetBucketRequest.class, + responseType = com.google.cloud.observability.v1.Bucket.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.GetBucketRequest, + com.google.cloud.observability.v1.Bucket> + getGetBucketMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.GetBucketRequest, + com.google.cloud.observability.v1.Bucket> + getGetBucketMethod; + if ((getGetBucketMethod = ObservabilityGrpc.getGetBucketMethod) == null) { + synchronized (ObservabilityGrpc.class) { + if ((getGetBucketMethod = ObservabilityGrpc.getGetBucketMethod) == null) { + ObservabilityGrpc.getGetBucketMethod = + getGetBucketMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBucket")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.GetBucketRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.Bucket.getDefaultInstance())) + .setSchemaDescriptor(new ObservabilityMethodDescriptorSupplier("GetBucket")) + .build(); + } + } + } + return getGetBucketMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.ListBucketsRequest, + com.google.cloud.observability.v1.ListBucketsResponse> + getListBucketsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListBuckets", + requestType = com.google.cloud.observability.v1.ListBucketsRequest.class, + responseType = com.google.cloud.observability.v1.ListBucketsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.ListBucketsRequest, + com.google.cloud.observability.v1.ListBucketsResponse> + getListBucketsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.ListBucketsRequest, + com.google.cloud.observability.v1.ListBucketsResponse> + getListBucketsMethod; + if ((getListBucketsMethod = ObservabilityGrpc.getListBucketsMethod) == null) { + synchronized (ObservabilityGrpc.class) { + if ((getListBucketsMethod = ObservabilityGrpc.getListBucketsMethod) == null) { + ObservabilityGrpc.getListBucketsMethod = + getListBucketsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListBuckets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.ListBucketsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.ListBucketsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new ObservabilityMethodDescriptorSupplier("ListBuckets")) + .build(); + } + } + } + return getListBucketsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.CreateBucketRequest, com.google.longrunning.Operation> + getCreateBucketMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateBucket", + requestType = com.google.cloud.observability.v1.CreateBucketRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.CreateBucketRequest, com.google.longrunning.Operation> + getCreateBucketMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.CreateBucketRequest, com.google.longrunning.Operation> + getCreateBucketMethod; + if ((getCreateBucketMethod = ObservabilityGrpc.getCreateBucketMethod) == null) { + synchronized (ObservabilityGrpc.class) { + if ((getCreateBucketMethod = ObservabilityGrpc.getCreateBucketMethod) == null) { + ObservabilityGrpc.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.cloud.observability.v1.CreateBucketRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ObservabilityMethodDescriptorSupplier("CreateBucket")) + .build(); + } + } + } + return getCreateBucketMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.UpdateBucketRequest, com.google.longrunning.Operation> + getUpdateBucketMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateBucket", + requestType = com.google.cloud.observability.v1.UpdateBucketRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.UpdateBucketRequest, com.google.longrunning.Operation> + getUpdateBucketMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.UpdateBucketRequest, com.google.longrunning.Operation> + getUpdateBucketMethod; + if ((getUpdateBucketMethod = ObservabilityGrpc.getUpdateBucketMethod) == null) { + synchronized (ObservabilityGrpc.class) { + if ((getUpdateBucketMethod = ObservabilityGrpc.getUpdateBucketMethod) == null) { + ObservabilityGrpc.getUpdateBucketMethod = + getUpdateBucketMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateBucket")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.UpdateBucketRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ObservabilityMethodDescriptorSupplier("UpdateBucket")) + .build(); + } + } + } + return getUpdateBucketMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.GetDatasetRequest, + com.google.cloud.observability.v1.Dataset> + getGetDatasetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDataset", + requestType = com.google.cloud.observability.v1.GetDatasetRequest.class, + responseType = com.google.cloud.observability.v1.Dataset.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.GetDatasetRequest, + com.google.cloud.observability.v1.Dataset> + getGetDatasetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.GetDatasetRequest, + com.google.cloud.observability.v1.Dataset> + getGetDatasetMethod; + if ((getGetDatasetMethod = ObservabilityGrpc.getGetDatasetMethod) == null) { + synchronized (ObservabilityGrpc.class) { + if ((getGetDatasetMethod = ObservabilityGrpc.getGetDatasetMethod) == null) { + ObservabilityGrpc.getGetDatasetMethod = + getGetDatasetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDataset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.GetDatasetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.Dataset.getDefaultInstance())) + .setSchemaDescriptor(new ObservabilityMethodDescriptorSupplier("GetDataset")) + .build(); + } + } + } + return getGetDatasetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.ListDatasetsRequest, + com.google.cloud.observability.v1.ListDatasetsResponse> + getListDatasetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDatasets", + requestType = com.google.cloud.observability.v1.ListDatasetsRequest.class, + responseType = com.google.cloud.observability.v1.ListDatasetsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.ListDatasetsRequest, + com.google.cloud.observability.v1.ListDatasetsResponse> + getListDatasetsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.ListDatasetsRequest, + com.google.cloud.observability.v1.ListDatasetsResponse> + getListDatasetsMethod; + if ((getListDatasetsMethod = ObservabilityGrpc.getListDatasetsMethod) == null) { + synchronized (ObservabilityGrpc.class) { + if ((getListDatasetsMethod = ObservabilityGrpc.getListDatasetsMethod) == null) { + ObservabilityGrpc.getListDatasetsMethod = + getListDatasetsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDatasets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.ListDatasetsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.ListDatasetsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ObservabilityMethodDescriptorSupplier("ListDatasets")) + .build(); + } + } + } + return getListDatasetsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.GetViewRequest, com.google.cloud.observability.v1.View> + getGetViewMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetView", + requestType = com.google.cloud.observability.v1.GetViewRequest.class, + responseType = com.google.cloud.observability.v1.View.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.GetViewRequest, com.google.cloud.observability.v1.View> + getGetViewMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.GetViewRequest, + com.google.cloud.observability.v1.View> + getGetViewMethod; + if ((getGetViewMethod = ObservabilityGrpc.getGetViewMethod) == null) { + synchronized (ObservabilityGrpc.class) { + if ((getGetViewMethod = ObservabilityGrpc.getGetViewMethod) == null) { + ObservabilityGrpc.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.cloud.observability.v1.GetViewRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.View.getDefaultInstance())) + .setSchemaDescriptor(new ObservabilityMethodDescriptorSupplier("GetView")) + .build(); + } + } + } + return getGetViewMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.ListViewsRequest, + com.google.cloud.observability.v1.ListViewsResponse> + getListViewsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListViews", + requestType = com.google.cloud.observability.v1.ListViewsRequest.class, + responseType = com.google.cloud.observability.v1.ListViewsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.ListViewsRequest, + com.google.cloud.observability.v1.ListViewsResponse> + getListViewsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.ListViewsRequest, + com.google.cloud.observability.v1.ListViewsResponse> + getListViewsMethod; + if ((getListViewsMethod = ObservabilityGrpc.getListViewsMethod) == null) { + synchronized (ObservabilityGrpc.class) { + if ((getListViewsMethod = ObservabilityGrpc.getListViewsMethod) == null) { + ObservabilityGrpc.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.cloud.observability.v1.ListViewsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.ListViewsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new ObservabilityMethodDescriptorSupplier("ListViews")) + .build(); + } + } + } + return getListViewsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.GetLinkRequest, com.google.cloud.observability.v1.Link> + getGetLinkMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetLink", + requestType = com.google.cloud.observability.v1.GetLinkRequest.class, + responseType = com.google.cloud.observability.v1.Link.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.GetLinkRequest, com.google.cloud.observability.v1.Link> + getGetLinkMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.GetLinkRequest, + com.google.cloud.observability.v1.Link> + getGetLinkMethod; + if ((getGetLinkMethod = ObservabilityGrpc.getGetLinkMethod) == null) { + synchronized (ObservabilityGrpc.class) { + if ((getGetLinkMethod = ObservabilityGrpc.getGetLinkMethod) == null) { + ObservabilityGrpc.getGetLinkMethod = + getGetLinkMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLink")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.GetLinkRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.Link.getDefaultInstance())) + .setSchemaDescriptor(new ObservabilityMethodDescriptorSupplier("GetLink")) + .build(); + } + } + } + return getGetLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.ListLinksRequest, + com.google.cloud.observability.v1.ListLinksResponse> + getListLinksMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListLinks", + requestType = com.google.cloud.observability.v1.ListLinksRequest.class, + responseType = com.google.cloud.observability.v1.ListLinksResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.ListLinksRequest, + com.google.cloud.observability.v1.ListLinksResponse> + getListLinksMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.ListLinksRequest, + com.google.cloud.observability.v1.ListLinksResponse> + getListLinksMethod; + if ((getListLinksMethod = ObservabilityGrpc.getListLinksMethod) == null) { + synchronized (ObservabilityGrpc.class) { + if ((getListLinksMethod = ObservabilityGrpc.getListLinksMethod) == null) { + ObservabilityGrpc.getListLinksMethod = + getListLinksMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListLinks")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.ListLinksRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.ListLinksResponse + .getDefaultInstance())) + .setSchemaDescriptor(new ObservabilityMethodDescriptorSupplier("ListLinks")) + .build(); + } + } + } + return getListLinksMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.CreateLinkRequest, com.google.longrunning.Operation> + getCreateLinkMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateLink", + requestType = com.google.cloud.observability.v1.CreateLinkRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.CreateLinkRequest, com.google.longrunning.Operation> + getCreateLinkMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.CreateLinkRequest, com.google.longrunning.Operation> + getCreateLinkMethod; + if ((getCreateLinkMethod = ObservabilityGrpc.getCreateLinkMethod) == null) { + synchronized (ObservabilityGrpc.class) { + if ((getCreateLinkMethod = ObservabilityGrpc.getCreateLinkMethod) == null) { + ObservabilityGrpc.getCreateLinkMethod = + getCreateLinkMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateLink")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.CreateLinkRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ObservabilityMethodDescriptorSupplier("CreateLink")) + .build(); + } + } + } + return getCreateLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.UpdateLinkRequest, com.google.longrunning.Operation> + getUpdateLinkMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateLink", + requestType = com.google.cloud.observability.v1.UpdateLinkRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.UpdateLinkRequest, com.google.longrunning.Operation> + getUpdateLinkMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.UpdateLinkRequest, com.google.longrunning.Operation> + getUpdateLinkMethod; + if ((getUpdateLinkMethod = ObservabilityGrpc.getUpdateLinkMethod) == null) { + synchronized (ObservabilityGrpc.class) { + if ((getUpdateLinkMethod = ObservabilityGrpc.getUpdateLinkMethod) == null) { + ObservabilityGrpc.getUpdateLinkMethod = + getUpdateLinkMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateLink")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.UpdateLinkRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ObservabilityMethodDescriptorSupplier("UpdateLink")) + .build(); + } + } + } + return getUpdateLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.DeleteLinkRequest, com.google.longrunning.Operation> + getDeleteLinkMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteLink", + requestType = com.google.cloud.observability.v1.DeleteLinkRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.DeleteLinkRequest, com.google.longrunning.Operation> + getDeleteLinkMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.DeleteLinkRequest, com.google.longrunning.Operation> + getDeleteLinkMethod; + if ((getDeleteLinkMethod = ObservabilityGrpc.getDeleteLinkMethod) == null) { + synchronized (ObservabilityGrpc.class) { + if ((getDeleteLinkMethod = ObservabilityGrpc.getDeleteLinkMethod) == null) { + ObservabilityGrpc.getDeleteLinkMethod = + getDeleteLinkMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteLink")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.DeleteLinkRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ObservabilityMethodDescriptorSupplier("DeleteLink")) + .build(); + } + } + } + return getDeleteLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.GetTraceScopeRequest, + com.google.cloud.observability.v1.TraceScope> + getGetTraceScopeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTraceScope", + requestType = com.google.cloud.observability.v1.GetTraceScopeRequest.class, + responseType = com.google.cloud.observability.v1.TraceScope.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.GetTraceScopeRequest, + com.google.cloud.observability.v1.TraceScope> + getGetTraceScopeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.GetTraceScopeRequest, + com.google.cloud.observability.v1.TraceScope> + getGetTraceScopeMethod; + if ((getGetTraceScopeMethod = ObservabilityGrpc.getGetTraceScopeMethod) == null) { + synchronized (ObservabilityGrpc.class) { + if ((getGetTraceScopeMethod = ObservabilityGrpc.getGetTraceScopeMethod) == null) { + ObservabilityGrpc.getGetTraceScopeMethod = + getGetTraceScopeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTraceScope")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.GetTraceScopeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.TraceScope.getDefaultInstance())) + .setSchemaDescriptor( + new ObservabilityMethodDescriptorSupplier("GetTraceScope")) + .build(); + } + } + } + return getGetTraceScopeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.ListTraceScopesRequest, + com.google.cloud.observability.v1.ListTraceScopesResponse> + getListTraceScopesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTraceScopes", + requestType = com.google.cloud.observability.v1.ListTraceScopesRequest.class, + responseType = com.google.cloud.observability.v1.ListTraceScopesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.ListTraceScopesRequest, + com.google.cloud.observability.v1.ListTraceScopesResponse> + getListTraceScopesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.ListTraceScopesRequest, + com.google.cloud.observability.v1.ListTraceScopesResponse> + getListTraceScopesMethod; + if ((getListTraceScopesMethod = ObservabilityGrpc.getListTraceScopesMethod) == null) { + synchronized (ObservabilityGrpc.class) { + if ((getListTraceScopesMethod = ObservabilityGrpc.getListTraceScopesMethod) == null) { + ObservabilityGrpc.getListTraceScopesMethod = + getListTraceScopesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTraceScopes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.ListTraceScopesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.ListTraceScopesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ObservabilityMethodDescriptorSupplier("ListTraceScopes")) + .build(); + } + } + } + return getListTraceScopesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.CreateTraceScopeRequest, + com.google.cloud.observability.v1.TraceScope> + getCreateTraceScopeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateTraceScope", + requestType = com.google.cloud.observability.v1.CreateTraceScopeRequest.class, + responseType = com.google.cloud.observability.v1.TraceScope.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.CreateTraceScopeRequest, + com.google.cloud.observability.v1.TraceScope> + getCreateTraceScopeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.CreateTraceScopeRequest, + com.google.cloud.observability.v1.TraceScope> + getCreateTraceScopeMethod; + if ((getCreateTraceScopeMethod = ObservabilityGrpc.getCreateTraceScopeMethod) == null) { + synchronized (ObservabilityGrpc.class) { + if ((getCreateTraceScopeMethod = ObservabilityGrpc.getCreateTraceScopeMethod) == null) { + ObservabilityGrpc.getCreateTraceScopeMethod = + getCreateTraceScopeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateTraceScope")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.CreateTraceScopeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.TraceScope.getDefaultInstance())) + .setSchemaDescriptor( + new ObservabilityMethodDescriptorSupplier("CreateTraceScope")) + .build(); + } + } + } + return getCreateTraceScopeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.UpdateTraceScopeRequest, + com.google.cloud.observability.v1.TraceScope> + getUpdateTraceScopeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateTraceScope", + requestType = com.google.cloud.observability.v1.UpdateTraceScopeRequest.class, + responseType = com.google.cloud.observability.v1.TraceScope.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.UpdateTraceScopeRequest, + com.google.cloud.observability.v1.TraceScope> + getUpdateTraceScopeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.UpdateTraceScopeRequest, + com.google.cloud.observability.v1.TraceScope> + getUpdateTraceScopeMethod; + if ((getUpdateTraceScopeMethod = ObservabilityGrpc.getUpdateTraceScopeMethod) == null) { + synchronized (ObservabilityGrpc.class) { + if ((getUpdateTraceScopeMethod = ObservabilityGrpc.getUpdateTraceScopeMethod) == null) { + ObservabilityGrpc.getUpdateTraceScopeMethod = + getUpdateTraceScopeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateTraceScope")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.UpdateTraceScopeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.TraceScope.getDefaultInstance())) + .setSchemaDescriptor( + new ObservabilityMethodDescriptorSupplier("UpdateTraceScope")) + .build(); + } + } + } + return getUpdateTraceScopeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.DeleteTraceScopeRequest, com.google.protobuf.Empty> + getDeleteTraceScopeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteTraceScope", + requestType = com.google.cloud.observability.v1.DeleteTraceScopeRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.DeleteTraceScopeRequest, com.google.protobuf.Empty> + getDeleteTraceScopeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.DeleteTraceScopeRequest, com.google.protobuf.Empty> + getDeleteTraceScopeMethod; + if ((getDeleteTraceScopeMethod = ObservabilityGrpc.getDeleteTraceScopeMethod) == null) { + synchronized (ObservabilityGrpc.class) { + if ((getDeleteTraceScopeMethod = ObservabilityGrpc.getDeleteTraceScopeMethod) == null) { + ObservabilityGrpc.getDeleteTraceScopeMethod = + getDeleteTraceScopeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteTraceScope")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.DeleteTraceScopeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new ObservabilityMethodDescriptorSupplier("DeleteTraceScope")) + .build(); + } + } + } + return getDeleteTraceScopeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.GetSettingsRequest, + com.google.cloud.observability.v1.Settings> + getGetSettingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSettings", + requestType = com.google.cloud.observability.v1.GetSettingsRequest.class, + responseType = com.google.cloud.observability.v1.Settings.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.GetSettingsRequest, + com.google.cloud.observability.v1.Settings> + getGetSettingsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.GetSettingsRequest, + com.google.cloud.observability.v1.Settings> + getGetSettingsMethod; + if ((getGetSettingsMethod = ObservabilityGrpc.getGetSettingsMethod) == null) { + synchronized (ObservabilityGrpc.class) { + if ((getGetSettingsMethod = ObservabilityGrpc.getGetSettingsMethod) == null) { + ObservabilityGrpc.getGetSettingsMethod = + getGetSettingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSettings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.GetSettingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.Settings.getDefaultInstance())) + .setSchemaDescriptor(new ObservabilityMethodDescriptorSupplier("GetSettings")) + .build(); + } + } + } + return getGetSettingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.UpdateSettingsRequest, com.google.longrunning.Operation> + getUpdateSettingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateSettings", + requestType = com.google.cloud.observability.v1.UpdateSettingsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.UpdateSettingsRequest, com.google.longrunning.Operation> + getUpdateSettingsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.observability.v1.UpdateSettingsRequest, + com.google.longrunning.Operation> + getUpdateSettingsMethod; + if ((getUpdateSettingsMethod = ObservabilityGrpc.getUpdateSettingsMethod) == null) { + synchronized (ObservabilityGrpc.class) { + if ((getUpdateSettingsMethod = ObservabilityGrpc.getUpdateSettingsMethod) == null) { + ObservabilityGrpc.getUpdateSettingsMethod = + getUpdateSettingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateSettings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.observability.v1.UpdateSettingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ObservabilityMethodDescriptorSupplier("UpdateSettings")) + .build(); + } + } + } + return getUpdateSettingsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ObservabilityStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ObservabilityStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ObservabilityStub(channel, callOptions); + } + }; + return ObservabilityStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static ObservabilityBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ObservabilityBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ObservabilityBlockingV2Stub(channel, callOptions); + } + }; + return ObservabilityBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ObservabilityBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ObservabilityBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ObservabilityBlockingStub(channel, callOptions); + } + }; + return ObservabilityBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ObservabilityFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ObservabilityFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ObservabilityFutureStub(channel, callOptions); + } + }; + return ObservabilityFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service describing handlers for resources
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Gets details of a single Scope.
+     * 
+ */ + default void getScope( + com.google.cloud.observability.v1.GetScopeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetScopeMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Scope.
+     * 
+ */ + default void updateScope( + com.google.cloud.observability.v1.UpdateScopeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateScopeMethod(), responseObserver); + } + + /** + * + * + *
+     * Get bucket resource.
+     * 
+ */ + default void getBucket( + com.google.cloud.observability.v1.GetBucketRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBucketMethod(), responseObserver); + } + + /** + * + * + *
+     * List buckets of a project in a particular location.
+     * 
+ */ + default void listBuckets( + com.google.cloud.observability.v1.ListBucketsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListBucketsMethod(), responseObserver); + } + + /** + * + * + *
+     * Create a new bucket.
+     * 
+ */ + default void createBucket( + com.google.cloud.observability.v1.CreateBucketRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateBucketMethod(), responseObserver); + } + + /** + * + * + *
+     * Update a bucket.
+     * 
+ */ + default void updateBucket( + com.google.cloud.observability.v1.UpdateBucketRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateBucketMethod(), responseObserver); + } + + /** + * + * + *
+     * Get a dataset.
+     * 
+ */ + default void getDataset( + com.google.cloud.observability.v1.GetDatasetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetDatasetMethod(), responseObserver); + } + + /** + * + * + *
+     * List datasets of a bucket.
+     * 
+ */ + default void listDatasets( + com.google.cloud.observability.v1.ListDatasetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListDatasetsMethod(), responseObserver); + } + + /** + * + * + *
+     * Get a view.
+     * 
+ */ + default void getView( + com.google.cloud.observability.v1.GetViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetViewMethod(), responseObserver); + } + + /** + * + * + *
+     * List views of a dataset.
+     * 
+ */ + default void listViews( + com.google.cloud.observability.v1.ListViewsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListViewsMethod(), responseObserver); + } + + /** + * + * + *
+     * Get a link.
+     * 
+ */ + default void getLink( + com.google.cloud.observability.v1.GetLinkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetLinkMethod(), responseObserver); + } + + /** + * + * + *
+     * List links of a dataset.
+     * 
+ */ + default void listLinks( + com.google.cloud.observability.v1.ListLinksRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListLinksMethod(), responseObserver); + } + + /** + * + * + *
+     * Create a new link.
+     * 
+ */ + default void createLink( + com.google.cloud.observability.v1.CreateLinkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateLinkMethod(), responseObserver); + } + + /** + * + * + *
+     * Update a link.
+     * 
+ */ + default void updateLink( + com.google.cloud.observability.v1.UpdateLinkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateLinkMethod(), responseObserver); + } + + /** + * + * + *
+     * Delete a link.
+     * 
+ */ + default void deleteLink( + com.google.cloud.observability.v1.DeleteLinkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteLinkMethod(), responseObserver); + } + + /** + * + * + *
+     * Get TraceScope resource.
+     * 
+ */ + default void getTraceScope( + com.google.cloud.observability.v1.GetTraceScopeRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetTraceScopeMethod(), responseObserver); + } + + /** + * + * + *
+     * List TraceScopes of a project in a particular location.
+     * 
+ */ + default void listTraceScopes( + com.google.cloud.observability.v1.ListTraceScopesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListTraceScopesMethod(), responseObserver); + } + + /** + * + * + *
+     * Create a new TraceScope.
+     * 
+ */ + default void createTraceScope( + com.google.cloud.observability.v1.CreateTraceScopeRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateTraceScopeMethod(), responseObserver); + } + + /** + * + * + *
+     * Update a TraceScope.
+     * 
+ */ + default void updateTraceScope( + com.google.cloud.observability.v1.UpdateTraceScopeRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateTraceScopeMethod(), responseObserver); + } + + /** + * + * + *
+     * Delete a TraceScope.
+     * 
+ */ + default void deleteTraceScope( + com.google.cloud.observability.v1.DeleteTraceScopeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteTraceScopeMethod(), responseObserver); + } + + /** + * + * + *
+     * Get Settings
+     * 
+ */ + default void getSettings( + com.google.cloud.observability.v1.GetSettingsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetSettingsMethod(), responseObserver); + } + + /** + * + * + *
+     * Update Settings
+     * 
+ */ + default void updateSettings( + com.google.cloud.observability.v1.UpdateSettingsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateSettingsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service Observability. + * + *
+   * Service describing handlers for resources
+   * 
+ */ + public abstract static class ObservabilityImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return ObservabilityGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service Observability. + * + *
+   * Service describing handlers for resources
+   * 
+ */ + public static final class ObservabilityStub + extends io.grpc.stub.AbstractAsyncStub { + private ObservabilityStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ObservabilityStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ObservabilityStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets details of a single Scope.
+     * 
+ */ + public void getScope( + com.google.cloud.observability.v1.GetScopeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetScopeMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Scope.
+     * 
+ */ + public void updateScope( + com.google.cloud.observability.v1.UpdateScopeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateScopeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get bucket resource.
+     * 
+ */ + public void getBucket( + com.google.cloud.observability.v1.GetBucketRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetBucketMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * List buckets of a project in a particular location.
+     * 
+ */ + public void listBuckets( + com.google.cloud.observability.v1.ListBucketsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListBucketsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Create a new bucket.
+     * 
+ */ + public void createBucket( + com.google.cloud.observability.v1.CreateBucketRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateBucketMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Update a bucket.
+     * 
+ */ + public void updateBucket( + com.google.cloud.observability.v1.UpdateBucketRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateBucketMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get a dataset.
+     * 
+ */ + public void getDataset( + com.google.cloud.observability.v1.GetDatasetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDatasetMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * List datasets of a bucket.
+     * 
+ */ + public void listDatasets( + com.google.cloud.observability.v1.ListDatasetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDatasetsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get a view.
+     * 
+ */ + public void getView( + com.google.cloud.observability.v1.GetViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetViewMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * List views of a dataset.
+     * 
+ */ + public void listViews( + com.google.cloud.observability.v1.ListViewsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListViewsMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Get a link.
+     * 
+ */ + public void getLink( + com.google.cloud.observability.v1.GetLinkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetLinkMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * List links of a dataset.
+     * 
+ */ + public void listLinks( + com.google.cloud.observability.v1.ListLinksRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListLinksMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Create a new link.
+     * 
+ */ + public void createLink( + com.google.cloud.observability.v1.CreateLinkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateLinkMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Update a link.
+     * 
+ */ + public void updateLink( + com.google.cloud.observability.v1.UpdateLinkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateLinkMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Delete a link.
+     * 
+ */ + public void deleteLink( + com.google.cloud.observability.v1.DeleteLinkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteLinkMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Get TraceScope resource.
+     * 
+ */ + public void getTraceScope( + com.google.cloud.observability.v1.GetTraceScopeRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetTraceScopeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * List TraceScopes of a project in a particular location.
+     * 
+ */ + public void listTraceScopes( + com.google.cloud.observability.v1.ListTraceScopesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListTraceScopesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Create a new TraceScope.
+     * 
+ */ + public void createTraceScope( + com.google.cloud.observability.v1.CreateTraceScopeRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateTraceScopeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Update a TraceScope.
+     * 
+ */ + public void updateTraceScope( + com.google.cloud.observability.v1.UpdateTraceScopeRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateTraceScopeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Delete a TraceScope.
+     * 
+ */ + public void deleteTraceScope( + com.google.cloud.observability.v1.DeleteTraceScopeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteTraceScopeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get Settings
+     * 
+ */ + public void getSettings( + com.google.cloud.observability.v1.GetSettingsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetSettingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Update Settings
+     * 
+ */ + public void updateSettings( + com.google.cloud.observability.v1.UpdateSettingsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateSettingsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service Observability. + * + *
+   * Service describing handlers for resources
+   * 
+ */ + public static final class ObservabilityBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private ObservabilityBlockingV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ObservabilityBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ObservabilityBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Gets details of a single Scope.
+     * 
+ */ + public com.google.cloud.observability.v1.Scope getScope( + com.google.cloud.observability.v1.GetScopeRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetScopeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Scope.
+     * 
+ */ + public com.google.cloud.observability.v1.Scope updateScope( + com.google.cloud.observability.v1.UpdateScopeRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateScopeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get bucket resource.
+     * 
+ */ + public com.google.cloud.observability.v1.Bucket getBucket( + com.google.cloud.observability.v1.GetBucketRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetBucketMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List buckets of a project in a particular location.
+     * 
+ */ + public com.google.cloud.observability.v1.ListBucketsResponse listBuckets( + com.google.cloud.observability.v1.ListBucketsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListBucketsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Create a new bucket.
+     * 
+ */ + public com.google.longrunning.Operation createBucket( + com.google.cloud.observability.v1.CreateBucketRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateBucketMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update a bucket.
+     * 
+ */ + public com.google.longrunning.Operation updateBucket( + com.google.cloud.observability.v1.UpdateBucketRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateBucketMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get a dataset.
+     * 
+ */ + public com.google.cloud.observability.v1.Dataset getDataset( + com.google.cloud.observability.v1.GetDatasetRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetDatasetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List datasets of a bucket.
+     * 
+ */ + public com.google.cloud.observability.v1.ListDatasetsResponse listDatasets( + com.google.cloud.observability.v1.ListDatasetsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListDatasetsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get a view.
+     * 
+ */ + public com.google.cloud.observability.v1.View getView( + com.google.cloud.observability.v1.GetViewRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List views of a dataset.
+     * 
+ */ + public com.google.cloud.observability.v1.ListViewsResponse listViews( + com.google.cloud.observability.v1.ListViewsRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListViewsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get a link.
+     * 
+ */ + public com.google.cloud.observability.v1.Link getLink( + com.google.cloud.observability.v1.GetLinkRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetLinkMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List links of a dataset.
+     * 
+ */ + public com.google.cloud.observability.v1.ListLinksResponse listLinks( + com.google.cloud.observability.v1.ListLinksRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListLinksMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Create a new link.
+     * 
+ */ + public com.google.longrunning.Operation createLink( + com.google.cloud.observability.v1.CreateLinkRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateLinkMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update a link.
+     * 
+ */ + public com.google.longrunning.Operation updateLink( + com.google.cloud.observability.v1.UpdateLinkRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateLinkMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Delete a link.
+     * 
+ */ + public com.google.longrunning.Operation deleteLink( + com.google.cloud.observability.v1.DeleteLinkRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteLinkMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get TraceScope resource.
+     * 
+ */ + public com.google.cloud.observability.v1.TraceScope getTraceScope( + com.google.cloud.observability.v1.GetTraceScopeRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetTraceScopeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List TraceScopes of a project in a particular location.
+     * 
+ */ + public com.google.cloud.observability.v1.ListTraceScopesResponse listTraceScopes( + com.google.cloud.observability.v1.ListTraceScopesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListTraceScopesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Create a new TraceScope.
+     * 
+ */ + public com.google.cloud.observability.v1.TraceScope createTraceScope( + com.google.cloud.observability.v1.CreateTraceScopeRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateTraceScopeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update a TraceScope.
+     * 
+ */ + public com.google.cloud.observability.v1.TraceScope updateTraceScope( + com.google.cloud.observability.v1.UpdateTraceScopeRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateTraceScopeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Delete a TraceScope.
+     * 
+ */ + public com.google.protobuf.Empty deleteTraceScope( + com.google.cloud.observability.v1.DeleteTraceScopeRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteTraceScopeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get Settings
+     * 
+ */ + public com.google.cloud.observability.v1.Settings getSettings( + com.google.cloud.observability.v1.GetSettingsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetSettingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update Settings
+     * 
+ */ + public com.google.longrunning.Operation updateSettings( + com.google.cloud.observability.v1.UpdateSettingsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateSettingsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service Observability. + * + *
+   * Service describing handlers for resources
+   * 
+ */ + public static final class ObservabilityBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ObservabilityBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ObservabilityBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ObservabilityBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets details of a single Scope.
+     * 
+ */ + public com.google.cloud.observability.v1.Scope getScope( + com.google.cloud.observability.v1.GetScopeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetScopeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Scope.
+     * 
+ */ + public com.google.cloud.observability.v1.Scope updateScope( + com.google.cloud.observability.v1.UpdateScopeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateScopeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get bucket resource.
+     * 
+ */ + public com.google.cloud.observability.v1.Bucket getBucket( + com.google.cloud.observability.v1.GetBucketRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetBucketMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List buckets of a project in a particular location.
+     * 
+ */ + public com.google.cloud.observability.v1.ListBucketsResponse listBuckets( + com.google.cloud.observability.v1.ListBucketsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListBucketsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Create a new bucket.
+     * 
+ */ + public com.google.longrunning.Operation createBucket( + com.google.cloud.observability.v1.CreateBucketRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateBucketMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update a bucket.
+     * 
+ */ + public com.google.longrunning.Operation updateBucket( + com.google.cloud.observability.v1.UpdateBucketRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateBucketMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get a dataset.
+     * 
+ */ + public com.google.cloud.observability.v1.Dataset getDataset( + com.google.cloud.observability.v1.GetDatasetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDatasetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List datasets of a bucket.
+     * 
+ */ + public com.google.cloud.observability.v1.ListDatasetsResponse listDatasets( + com.google.cloud.observability.v1.ListDatasetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDatasetsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get a view.
+     * 
+ */ + public com.google.cloud.observability.v1.View getView( + com.google.cloud.observability.v1.GetViewRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List views of a dataset.
+     * 
+ */ + public com.google.cloud.observability.v1.ListViewsResponse listViews( + com.google.cloud.observability.v1.ListViewsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListViewsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get a link.
+     * 
+ */ + public com.google.cloud.observability.v1.Link getLink( + com.google.cloud.observability.v1.GetLinkRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetLinkMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List links of a dataset.
+     * 
+ */ + public com.google.cloud.observability.v1.ListLinksResponse listLinks( + com.google.cloud.observability.v1.ListLinksRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListLinksMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Create a new link.
+     * 
+ */ + public com.google.longrunning.Operation createLink( + com.google.cloud.observability.v1.CreateLinkRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateLinkMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update a link.
+     * 
+ */ + public com.google.longrunning.Operation updateLink( + com.google.cloud.observability.v1.UpdateLinkRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateLinkMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Delete a link.
+     * 
+ */ + public com.google.longrunning.Operation deleteLink( + com.google.cloud.observability.v1.DeleteLinkRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteLinkMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get TraceScope resource.
+     * 
+ */ + public com.google.cloud.observability.v1.TraceScope getTraceScope( + com.google.cloud.observability.v1.GetTraceScopeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetTraceScopeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List TraceScopes of a project in a particular location.
+     * 
+ */ + public com.google.cloud.observability.v1.ListTraceScopesResponse listTraceScopes( + com.google.cloud.observability.v1.ListTraceScopesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListTraceScopesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Create a new TraceScope.
+     * 
+ */ + public com.google.cloud.observability.v1.TraceScope createTraceScope( + com.google.cloud.observability.v1.CreateTraceScopeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateTraceScopeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update a TraceScope.
+     * 
+ */ + public com.google.cloud.observability.v1.TraceScope updateTraceScope( + com.google.cloud.observability.v1.UpdateTraceScopeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateTraceScopeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Delete a TraceScope.
+     * 
+ */ + public com.google.protobuf.Empty deleteTraceScope( + com.google.cloud.observability.v1.DeleteTraceScopeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteTraceScopeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get Settings
+     * 
+ */ + public com.google.cloud.observability.v1.Settings getSettings( + com.google.cloud.observability.v1.GetSettingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetSettingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update Settings
+     * 
+ */ + public com.google.longrunning.Operation updateSettings( + com.google.cloud.observability.v1.UpdateSettingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateSettingsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service Observability. + * + *
+   * Service describing handlers for resources
+   * 
+ */ + public static final class ObservabilityFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ObservabilityFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ObservabilityFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ObservabilityFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets details of a single Scope.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.observability.v1.Scope> + getScope(com.google.cloud.observability.v1.GetScopeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetScopeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Scope.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.observability.v1.Scope> + updateScope(com.google.cloud.observability.v1.UpdateScopeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateScopeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get bucket resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.observability.v1.Bucket> + getBucket(com.google.cloud.observability.v1.GetBucketRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetBucketMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List buckets of a project in a particular location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.observability.v1.ListBucketsResponse> + listBuckets(com.google.cloud.observability.v1.ListBucketsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListBucketsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Create a new bucket.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createBucket(com.google.cloud.observability.v1.CreateBucketRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateBucketMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Update a bucket.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateBucket(com.google.cloud.observability.v1.UpdateBucketRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateBucketMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get a dataset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.observability.v1.Dataset> + getDataset(com.google.cloud.observability.v1.GetDatasetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDatasetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List datasets of a bucket.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.observability.v1.ListDatasetsResponse> + listDatasets(com.google.cloud.observability.v1.ListDatasetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDatasetsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get a view.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.observability.v1.View> + getView(com.google.cloud.observability.v1.GetViewRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetViewMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List views of a dataset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.observability.v1.ListViewsResponse> + listViews(com.google.cloud.observability.v1.ListViewsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListViewsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get a link.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.observability.v1.Link> + getLink(com.google.cloud.observability.v1.GetLinkRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetLinkMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List links of a dataset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.observability.v1.ListLinksResponse> + listLinks(com.google.cloud.observability.v1.ListLinksRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListLinksMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Create a new link.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createLink(com.google.cloud.observability.v1.CreateLinkRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateLinkMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Update a link.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateLink(com.google.cloud.observability.v1.UpdateLinkRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateLinkMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Delete a link.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteLink(com.google.cloud.observability.v1.DeleteLinkRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteLinkMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get TraceScope resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.observability.v1.TraceScope> + getTraceScope(com.google.cloud.observability.v1.GetTraceScopeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetTraceScopeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List TraceScopes of a project in a particular location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.observability.v1.ListTraceScopesResponse> + listTraceScopes(com.google.cloud.observability.v1.ListTraceScopesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListTraceScopesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Create a new TraceScope.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.observability.v1.TraceScope> + createTraceScope(com.google.cloud.observability.v1.CreateTraceScopeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateTraceScopeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Update a TraceScope.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.observability.v1.TraceScope> + updateTraceScope(com.google.cloud.observability.v1.UpdateTraceScopeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateTraceScopeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Delete a TraceScope.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteTraceScope(com.google.cloud.observability.v1.DeleteTraceScopeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteTraceScopeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get Settings
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.observability.v1.Settings> + getSettings(com.google.cloud.observability.v1.GetSettingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetSettingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Update Settings
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateSettings(com.google.cloud.observability.v1.UpdateSettingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateSettingsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_SCOPE = 0; + private static final int METHODID_UPDATE_SCOPE = 1; + private static final int METHODID_GET_BUCKET = 2; + private static final int METHODID_LIST_BUCKETS = 3; + private static final int METHODID_CREATE_BUCKET = 4; + private static final int METHODID_UPDATE_BUCKET = 5; + private static final int METHODID_GET_DATASET = 6; + private static final int METHODID_LIST_DATASETS = 7; + private static final int METHODID_GET_VIEW = 8; + private static final int METHODID_LIST_VIEWS = 9; + private static final int METHODID_GET_LINK = 10; + private static final int METHODID_LIST_LINKS = 11; + private static final int METHODID_CREATE_LINK = 12; + private static final int METHODID_UPDATE_LINK = 13; + private static final int METHODID_DELETE_LINK = 14; + private static final int METHODID_GET_TRACE_SCOPE = 15; + private static final int METHODID_LIST_TRACE_SCOPES = 16; + private static final int METHODID_CREATE_TRACE_SCOPE = 17; + private static final int METHODID_UPDATE_TRACE_SCOPE = 18; + private static final int METHODID_DELETE_TRACE_SCOPE = 19; + private static final int METHODID_GET_SETTINGS = 20; + private static final int METHODID_UPDATE_SETTINGS = 21; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_GET_SCOPE: + serviceImpl.getScope( + (com.google.cloud.observability.v1.GetScopeRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_SCOPE: + serviceImpl.updateScope( + (com.google.cloud.observability.v1.UpdateScopeRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_BUCKET: + serviceImpl.getBucket( + (com.google.cloud.observability.v1.GetBucketRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_BUCKETS: + serviceImpl.listBuckets( + (com.google.cloud.observability.v1.ListBucketsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_BUCKET: + serviceImpl.createBucket( + (com.google.cloud.observability.v1.CreateBucketRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_BUCKET: + serviceImpl.updateBucket( + (com.google.cloud.observability.v1.UpdateBucketRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_DATASET: + serviceImpl.getDataset( + (com.google.cloud.observability.v1.GetDatasetRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_DATASETS: + serviceImpl.listDatasets( + (com.google.cloud.observability.v1.ListDatasetsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_VIEW: + serviceImpl.getView( + (com.google.cloud.observability.v1.GetViewRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_VIEWS: + serviceImpl.listViews( + (com.google.cloud.observability.v1.ListViewsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_LINK: + serviceImpl.getLink( + (com.google.cloud.observability.v1.GetLinkRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_LINKS: + serviceImpl.listLinks( + (com.google.cloud.observability.v1.ListLinksRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_LINK: + serviceImpl.createLink( + (com.google.cloud.observability.v1.CreateLinkRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_LINK: + serviceImpl.updateLink( + (com.google.cloud.observability.v1.UpdateLinkRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_LINK: + serviceImpl.deleteLink( + (com.google.cloud.observability.v1.DeleteLinkRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_TRACE_SCOPE: + serviceImpl.getTraceScope( + (com.google.cloud.observability.v1.GetTraceScopeRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_TRACE_SCOPES: + serviceImpl.listTraceScopes( + (com.google.cloud.observability.v1.ListTraceScopesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.observability.v1.ListTraceScopesResponse>) + responseObserver); + break; + case METHODID_CREATE_TRACE_SCOPE: + serviceImpl.createTraceScope( + (com.google.cloud.observability.v1.CreateTraceScopeRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_TRACE_SCOPE: + serviceImpl.updateTraceScope( + (com.google.cloud.observability.v1.UpdateTraceScopeRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_TRACE_SCOPE: + serviceImpl.deleteTraceScope( + (com.google.cloud.observability.v1.DeleteTraceScopeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_SETTINGS: + serviceImpl.getSettings( + (com.google.cloud.observability.v1.GetSettingsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_SETTINGS: + serviceImpl.updateSettings( + (com.google.cloud.observability.v1.UpdateSettingsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetScopeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.observability.v1.GetScopeRequest, + com.google.cloud.observability.v1.Scope>(service, METHODID_GET_SCOPE))) + .addMethod( + getUpdateScopeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.observability.v1.UpdateScopeRequest, + com.google.cloud.observability.v1.Scope>(service, METHODID_UPDATE_SCOPE))) + .addMethod( + getGetBucketMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.observability.v1.GetBucketRequest, + com.google.cloud.observability.v1.Bucket>(service, METHODID_GET_BUCKET))) + .addMethod( + getListBucketsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.observability.v1.ListBucketsRequest, + com.google.cloud.observability.v1.ListBucketsResponse>( + service, METHODID_LIST_BUCKETS))) + .addMethod( + getCreateBucketMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.observability.v1.CreateBucketRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_BUCKET))) + .addMethod( + getUpdateBucketMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.observability.v1.UpdateBucketRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_BUCKET))) + .addMethod( + getGetDatasetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.observability.v1.GetDatasetRequest, + com.google.cloud.observability.v1.Dataset>(service, METHODID_GET_DATASET))) + .addMethod( + getListDatasetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.observability.v1.ListDatasetsRequest, + com.google.cloud.observability.v1.ListDatasetsResponse>( + service, METHODID_LIST_DATASETS))) + .addMethod( + getGetViewMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.observability.v1.GetViewRequest, + com.google.cloud.observability.v1.View>(service, METHODID_GET_VIEW))) + .addMethod( + getListViewsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.observability.v1.ListViewsRequest, + com.google.cloud.observability.v1.ListViewsResponse>( + service, METHODID_LIST_VIEWS))) + .addMethod( + getGetLinkMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.observability.v1.GetLinkRequest, + com.google.cloud.observability.v1.Link>(service, METHODID_GET_LINK))) + .addMethod( + getListLinksMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.observability.v1.ListLinksRequest, + com.google.cloud.observability.v1.ListLinksResponse>( + service, METHODID_LIST_LINKS))) + .addMethod( + getCreateLinkMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.observability.v1.CreateLinkRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_LINK))) + .addMethod( + getUpdateLinkMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.observability.v1.UpdateLinkRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_LINK))) + .addMethod( + getDeleteLinkMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.observability.v1.DeleteLinkRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_LINK))) + .addMethod( + getGetTraceScopeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.observability.v1.GetTraceScopeRequest, + com.google.cloud.observability.v1.TraceScope>( + service, METHODID_GET_TRACE_SCOPE))) + .addMethod( + getListTraceScopesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.observability.v1.ListTraceScopesRequest, + com.google.cloud.observability.v1.ListTraceScopesResponse>( + service, METHODID_LIST_TRACE_SCOPES))) + .addMethod( + getCreateTraceScopeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.observability.v1.CreateTraceScopeRequest, + com.google.cloud.observability.v1.TraceScope>( + service, METHODID_CREATE_TRACE_SCOPE))) + .addMethod( + getUpdateTraceScopeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.observability.v1.UpdateTraceScopeRequest, + com.google.cloud.observability.v1.TraceScope>( + service, METHODID_UPDATE_TRACE_SCOPE))) + .addMethod( + getDeleteTraceScopeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.observability.v1.DeleteTraceScopeRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_TRACE_SCOPE))) + .addMethod( + getGetSettingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.observability.v1.GetSettingsRequest, + com.google.cloud.observability.v1.Settings>(service, METHODID_GET_SETTINGS))) + .addMethod( + getUpdateSettingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.observability.v1.UpdateSettingsRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_SETTINGS))) + .build(); + } + + private abstract static class ObservabilityBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ObservabilityBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Observability"); + } + } + + private static final class ObservabilityFileDescriptorSupplier + extends ObservabilityBaseDescriptorSupplier { + ObservabilityFileDescriptorSupplier() {} + } + + private static final class ObservabilityMethodDescriptorSupplier + extends ObservabilityBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + ObservabilityMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ObservabilityGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ObservabilityFileDescriptorSupplier()) + .addMethod(getGetScopeMethod()) + .addMethod(getUpdateScopeMethod()) + .addMethod(getGetBucketMethod()) + .addMethod(getListBucketsMethod()) + .addMethod(getCreateBucketMethod()) + .addMethod(getUpdateBucketMethod()) + .addMethod(getGetDatasetMethod()) + .addMethod(getListDatasetsMethod()) + .addMethod(getGetViewMethod()) + .addMethod(getListViewsMethod()) + .addMethod(getGetLinkMethod()) + .addMethod(getListLinksMethod()) + .addMethod(getCreateLinkMethod()) + .addMethod(getUpdateLinkMethod()) + .addMethod(getDeleteLinkMethod()) + .addMethod(getGetTraceScopeMethod()) + .addMethod(getListTraceScopesMethod()) + .addMethod(getCreateTraceScopeMethod()) + .addMethod(getUpdateTraceScopeMethod()) + .addMethod(getDeleteTraceScopeMethod()) + .addMethod(getGetSettingsMethod()) + .addMethod(getUpdateSettingsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-observability/pom.xml b/java-observability/pom.xml new file mode 100644 index 000000000000..c52ddaf53ee5 --- /dev/null +++ b/java-observability/pom.xml @@ -0,0 +1,58 @@ + + + 4.0.0 + com.google.cloud + google-cloud-observability-parent + pom + 0.1.0-SNAPSHOT + Google Observability Parent + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-jar-parent + 1.94.0-SNAPSHOT + ../google-cloud-jar-parent/pom.xml + + + + UTF-8 + UTF-8 + github + google-cloud-observability-parent + + + + + + + com.google.cloud + google-cloud-observability + 0.1.0-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-observability-v1 + 0.1.0-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-observability-v1 + 0.1.0-SNAPSHOT + + + + + + + + google-cloud-observability + grpc-google-cloud-observability-v1 + proto-google-cloud-observability-v1 + + google-cloud-observability-bom + + + \ No newline at end of file diff --git a/java-observability/proto-google-cloud-observability-v1/clirr-ignored-differences.xml b/java-observability/proto-google-cloud-observability-v1/clirr-ignored-differences.xml new file mode 100644 index 000000000000..66592ac03811 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/clirr-ignored-differences.xml @@ -0,0 +1,80 @@ + + + + + 7012 + com/google/cloud/observability/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/observability/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/observability/v1/*OrBuilder + boolean has*(*) + + + + 7006 + com/google/cloud/observability/v1/** + * getDefaultInstanceForType() + ** + + + 7006 + com/google/cloud/observability/v1/** + * addRepeatedField(*) + ** + + + 7006 + com/google/cloud/observability/v1/** + * clear() + ** + + + 7006 + com/google/cloud/observability/v1/** + * clearField(*) + ** + + + 7006 + com/google/cloud/observability/v1/** + * clearOneof(*) + ** + + + 7006 + com/google/cloud/observability/v1/** + * clone() + ** + + + 7006 + com/google/cloud/observability/v1/** + * mergeUnknownFields(*) + ** + + + 7006 + com/google/cloud/observability/v1/** + * setField(*) + ** + + + 7006 + com/google/cloud/observability/v1/** + * setRepeatedField(*) + ** + + + 7006 + com/google/cloud/observability/v1/** + * setUnknownFields(*) + ** + + diff --git a/java-observability/proto-google-cloud-observability-v1/pom.xml b/java-observability/proto-google-cloud-observability-v1/pom.xml new file mode 100644 index 000000000000..78c78ff3eadf --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/pom.xml @@ -0,0 +1,41 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-observability-v1 + 0.1.0-SNAPSHOT + proto-google-cloud-observability-v1 + Proto library for google-cloud-observability + + com.google.cloud + google-cloud-observability-parent + 0.1.0-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + org.jspecify + jspecify + + + diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/Bucket.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/Bucket.java new file mode 100644 index 000000000000..ff1b1a72ad1a --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/Bucket.java @@ -0,0 +1,2484 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Bucket configuration for storing observability data.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.Bucket} + */ +@com.google.protobuf.Generated +public final class Bucket extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.Bucket) + BucketOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Bucket"); + } + + // Use Bucket.newBuilder() to construct. + private Bucket(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Bucket() { + name_ = ""; + displayName_ = ""; + description_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Bucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Bucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.Bucket.class, + com.google.cloud.observability.v1.Bucket.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. Name of the bucket. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. Name of the bucket. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Optional. User friendly display name.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. User friendly display name.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. Description of the bucket.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Description of the bucket.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + 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. Create timestamp.
+   * 
+ * + * .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 ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Create timestamp.
+   * 
+ * + * .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. Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. Update timestamp.
+   * 
+ * + * .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 ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. Update timestamp.
+   * 
+ * + * .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. Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int DELETE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp deleteTime_; + + /** + * + * + *
+   * Output only. Delete timestamp.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + @java.lang.Override + public boolean hasDeleteTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. Delete timestamp.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getDeleteTime() { + return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_; + } + + /** + * + * + *
+   * Output only. Delete timestamp.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { + return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_; + } + + public static final int PURGE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp purgeTime_; + + /** + * + * + *
+   * Output only. Timestamp when the bucket in soft-deleted state is purged.
+   * 
+ * + * .google.protobuf.Timestamp purge_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the purgeTime field is set. + */ + @java.lang.Override + public boolean hasPurgeTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Output only. Timestamp when the bucket in soft-deleted state is purged.
+   * 
+ * + * .google.protobuf.Timestamp purge_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The purgeTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getPurgeTime() { + return purgeTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : purgeTime_; + } + + /** + * + * + *
+   * Output only. Timestamp when the bucket in soft-deleted state is purged.
+   * 
+ * + * .google.protobuf.Timestamp purge_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder() { + return purgeTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : purgeTime_; + } + + public static final int CMEK_SETTINGS_FIELD_NUMBER = 9; + private com.google.cloud.observability.v1.CmekSettings cmekSettings_; + + /** + * + * + *
+   * Optional. Settings for configuring CMEK on a bucket.
+   * 
+ * + * + * .google.cloud.observability.v1.CmekSettings cmek_settings = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cmekSettings field is set. + */ + @java.lang.Override + public boolean hasCmekSettings() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Optional. Settings for configuring CMEK on a bucket.
+   * 
+ * + * + * .google.cloud.observability.v1.CmekSettings cmek_settings = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cmekSettings. + */ + @java.lang.Override + public com.google.cloud.observability.v1.CmekSettings getCmekSettings() { + return cmekSettings_ == null + ? com.google.cloud.observability.v1.CmekSettings.getDefaultInstance() + : cmekSettings_; + } + + /** + * + * + *
+   * Optional. Settings for configuring CMEK on a bucket.
+   * 
+ * + * + * .google.cloud.observability.v1.CmekSettings cmek_settings = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.observability.v1.CmekSettingsOrBuilder getCmekSettingsOrBuilder() { + return cmekSettings_ == null + ? com.google.cloud.observability.v1.CmekSettings.getDefaultInstance() + : cmekSettings_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(6, getDeleteTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(7, getPurgeTime()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(9, getCmekSettings()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getDeleteTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getPurgeTime()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getCmekSettings()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.Bucket)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.Bucket other = (com.google.cloud.observability.v1.Bucket) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) 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 (hasDeleteTime() != other.hasDeleteTime()) return false; + if (hasDeleteTime()) { + if (!getDeleteTime().equals(other.getDeleteTime())) return false; + } + if (hasPurgeTime() != other.hasPurgeTime()) return false; + if (hasPurgeTime()) { + if (!getPurgeTime().equals(other.getPurgeTime())) return false; + } + if (hasCmekSettings() != other.hasCmekSettings()) return false; + if (hasCmekSettings()) { + if (!getCmekSettings().equals(other.getCmekSettings())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().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(); + } + if (hasDeleteTime()) { + hash = (37 * hash) + DELETE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getDeleteTime().hashCode(); + } + if (hasPurgeTime()) { + hash = (37 * hash) + PURGE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getPurgeTime().hashCode(); + } + if (hasCmekSettings()) { + hash = (37 * hash) + CMEK_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getCmekSettings().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.Bucket parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.Bucket parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.Bucket parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.Bucket 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.cloud.observability.v1.Bucket parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.Bucket parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.Bucket parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.Bucket parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.Bucket parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.Bucket parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.Bucket parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.Bucket parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.observability.v1.Bucket prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Bucket configuration for storing observability data.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.Bucket} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.Bucket) + com.google.cloud.observability.v1.BucketOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Bucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Bucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.Bucket.class, + com.google.cloud.observability.v1.Bucket.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.Bucket.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetDeleteTimeFieldBuilder(); + internalGetPurgeTimeFieldBuilder(); + internalGetCmekSettingsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + description_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + deleteTime_ = null; + if (deleteTimeBuilder_ != null) { + deleteTimeBuilder_.dispose(); + deleteTimeBuilder_ = null; + } + purgeTime_ = null; + if (purgeTimeBuilder_ != null) { + purgeTimeBuilder_.dispose(); + purgeTimeBuilder_ = null; + } + cmekSettings_ = null; + if (cmekSettingsBuilder_ != null) { + cmekSettingsBuilder_.dispose(); + cmekSettingsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Bucket_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.Bucket getDefaultInstanceForType() { + return com.google.cloud.observability.v1.Bucket.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.Bucket build() { + com.google.cloud.observability.v1.Bucket result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.Bucket buildPartial() { + com.google.cloud.observability.v1.Bucket result = + new com.google.cloud.observability.v1.Bucket(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.Bucket result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.deleteTime_ = deleteTimeBuilder_ == null ? deleteTime_ : deleteTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.purgeTime_ = purgeTimeBuilder_ == null ? purgeTime_ : purgeTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.cmekSettings_ = + cmekSettingsBuilder_ == null ? cmekSettings_ : cmekSettingsBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.Bucket) { + return mergeFrom((com.google.cloud.observability.v1.Bucket) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.Bucket other) { + if (other == com.google.cloud.observability.v1.Bucket.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasDeleteTime()) { + mergeDeleteTime(other.getDeleteTime()); + } + if (other.hasPurgeTime()) { + mergePurgeTime(other.getPurgeTime()); + } + if (other.hasCmekSettings()) { + mergeCmekSettings(other.getCmekSettings()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetDeleteTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetPurgeTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 74: + { + input.readMessage( + internalGetCmekSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. Name of the bucket. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. Name of the bucket. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. Name of the bucket. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Name of the bucket. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Name of the bucket. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Optional. User friendly display name.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. User friendly display name.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. User friendly display name.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. User friendly display name.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. User friendly display name.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. Description of the bucket.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Description of the bucket.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Description of the bucket.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Description of the bucket.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Description of the bucket.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .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. Create timestamp.
+     * 
+ * + * + * .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; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .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(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .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. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .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. Update timestamp.
+     * 
+ * + * + * .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; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .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(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .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. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.Timestamp deleteTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + deleteTimeBuilder_; + + /** + * + * + *
+     * Output only. Delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + public boolean hasDeleteTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Output only. Delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + public com.google.protobuf.Timestamp getDeleteTime() { + if (deleteTimeBuilder_ == null) { + return deleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deleteTime_; + } else { + return deleteTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeleteTime(com.google.protobuf.Timestamp value) { + if (deleteTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deleteTime_ = value; + } else { + deleteTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (deleteTimeBuilder_ == null) { + deleteTime_ = builderForValue.build(); + } else { + deleteTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { + if (deleteTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && deleteTime_ != null + && deleteTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getDeleteTimeBuilder().mergeFrom(value); + } else { + deleteTime_ = value; + } + } else { + deleteTimeBuilder_.mergeFrom(value); + } + if (deleteTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDeleteTime() { + bitField0_ = (bitField0_ & ~0x00000020); + deleteTime_ = null; + if (deleteTimeBuilder_ != null) { + deleteTimeBuilder_.dispose(); + deleteTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetDeleteTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { + if (deleteTimeBuilder_ != null) { + return deleteTimeBuilder_.getMessageOrBuilder(); + } else { + return deleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deleteTime_; + } + } + + /** + * + * + *
+     * Output only. Delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetDeleteTimeFieldBuilder() { + if (deleteTimeBuilder_ == null) { + deleteTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getDeleteTime(), getParentForChildren(), isClean()); + deleteTime_ = null; + } + return deleteTimeBuilder_; + } + + private com.google.protobuf.Timestamp purgeTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + purgeTimeBuilder_; + + /** + * + * + *
+     * Output only. Timestamp when the bucket in soft-deleted state is purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the purgeTime field is set. + */ + public boolean hasPurgeTime() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. Timestamp when the bucket in soft-deleted state is purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The purgeTime. + */ + public com.google.protobuf.Timestamp getPurgeTime() { + if (purgeTimeBuilder_ == null) { + return purgeTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : purgeTime_; + } else { + return purgeTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Timestamp when the bucket in soft-deleted state is purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPurgeTime(com.google.protobuf.Timestamp value) { + if (purgeTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + purgeTime_ = value; + } else { + purgeTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp when the bucket in soft-deleted state is purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPurgeTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (purgeTimeBuilder_ == null) { + purgeTime_ = builderForValue.build(); + } else { + purgeTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp when the bucket in soft-deleted state is purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergePurgeTime(com.google.protobuf.Timestamp value) { + if (purgeTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && purgeTime_ != null + && purgeTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getPurgeTimeBuilder().mergeFrom(value); + } else { + purgeTime_ = value; + } + } else { + purgeTimeBuilder_.mergeFrom(value); + } + if (purgeTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Timestamp when the bucket in soft-deleted state is purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPurgeTime() { + bitField0_ = (bitField0_ & ~0x00000040); + purgeTime_ = null; + if (purgeTimeBuilder_ != null) { + purgeTimeBuilder_.dispose(); + purgeTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp when the bucket in soft-deleted state is purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getPurgeTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetPurgeTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Timestamp when the bucket in soft-deleted state is purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder() { + if (purgeTimeBuilder_ != null) { + return purgeTimeBuilder_.getMessageOrBuilder(); + } else { + return purgeTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : purgeTime_; + } + } + + /** + * + * + *
+     * Output only. Timestamp when the bucket in soft-deleted state is purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetPurgeTimeFieldBuilder() { + if (purgeTimeBuilder_ == null) { + purgeTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getPurgeTime(), getParentForChildren(), isClean()); + purgeTime_ = null; + } + return purgeTimeBuilder_; + } + + private com.google.cloud.observability.v1.CmekSettings cmekSettings_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.CmekSettings, + com.google.cloud.observability.v1.CmekSettings.Builder, + com.google.cloud.observability.v1.CmekSettingsOrBuilder> + cmekSettingsBuilder_; + + /** + * + * + *
+     * Optional. Settings for configuring CMEK on a bucket.
+     * 
+ * + * + * .google.cloud.observability.v1.CmekSettings cmek_settings = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cmekSettings field is set. + */ + public boolean hasCmekSettings() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Optional. Settings for configuring CMEK on a bucket.
+     * 
+ * + * + * .google.cloud.observability.v1.CmekSettings cmek_settings = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cmekSettings. + */ + public com.google.cloud.observability.v1.CmekSettings getCmekSettings() { + if (cmekSettingsBuilder_ == null) { + return cmekSettings_ == null + ? com.google.cloud.observability.v1.CmekSettings.getDefaultInstance() + : cmekSettings_; + } else { + return cmekSettingsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Settings for configuring CMEK on a bucket.
+     * 
+ * + * + * .google.cloud.observability.v1.CmekSettings cmek_settings = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCmekSettings(com.google.cloud.observability.v1.CmekSettings value) { + if (cmekSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cmekSettings_ = value; + } else { + cmekSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Settings for configuring CMEK on a bucket.
+     * 
+ * + * + * .google.cloud.observability.v1.CmekSettings cmek_settings = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCmekSettings( + com.google.cloud.observability.v1.CmekSettings.Builder builderForValue) { + if (cmekSettingsBuilder_ == null) { + cmekSettings_ = builderForValue.build(); + } else { + cmekSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Settings for configuring CMEK on a bucket.
+     * 
+ * + * + * .google.cloud.observability.v1.CmekSettings cmek_settings = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeCmekSettings(com.google.cloud.observability.v1.CmekSettings value) { + if (cmekSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && cmekSettings_ != null + && cmekSettings_ + != com.google.cloud.observability.v1.CmekSettings.getDefaultInstance()) { + getCmekSettingsBuilder().mergeFrom(value); + } else { + cmekSettings_ = value; + } + } else { + cmekSettingsBuilder_.mergeFrom(value); + } + if (cmekSettings_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Settings for configuring CMEK on a bucket.
+     * 
+ * + * + * .google.cloud.observability.v1.CmekSettings cmek_settings = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCmekSettings() { + bitField0_ = (bitField0_ & ~0x00000080); + cmekSettings_ = null; + if (cmekSettingsBuilder_ != null) { + cmekSettingsBuilder_.dispose(); + cmekSettingsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Settings for configuring CMEK on a bucket.
+     * 
+ * + * + * .google.cloud.observability.v1.CmekSettings cmek_settings = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.observability.v1.CmekSettings.Builder getCmekSettingsBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetCmekSettingsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Settings for configuring CMEK on a bucket.
+     * 
+ * + * + * .google.cloud.observability.v1.CmekSettings cmek_settings = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.observability.v1.CmekSettingsOrBuilder getCmekSettingsOrBuilder() { + if (cmekSettingsBuilder_ != null) { + return cmekSettingsBuilder_.getMessageOrBuilder(); + } else { + return cmekSettings_ == null + ? com.google.cloud.observability.v1.CmekSettings.getDefaultInstance() + : cmekSettings_; + } + } + + /** + * + * + *
+     * Optional. Settings for configuring CMEK on a bucket.
+     * 
+ * + * + * .google.cloud.observability.v1.CmekSettings cmek_settings = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.CmekSettings, + com.google.cloud.observability.v1.CmekSettings.Builder, + com.google.cloud.observability.v1.CmekSettingsOrBuilder> + internalGetCmekSettingsFieldBuilder() { + if (cmekSettingsBuilder_ == null) { + cmekSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.CmekSettings, + com.google.cloud.observability.v1.CmekSettings.Builder, + com.google.cloud.observability.v1.CmekSettingsOrBuilder>( + getCmekSettings(), getParentForChildren(), isClean()); + cmekSettings_ = null; + } + return cmekSettingsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.Bucket) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.Bucket) + private static final com.google.cloud.observability.v1.Bucket DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.Bucket(); + } + + public static com.google.cloud.observability.v1.Bucket getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Bucket parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.Bucket getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/BucketName.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/BucketName.java new file mode 100644 index 000000000000..20089bc8c3ae --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/BucketName.java @@ -0,0 +1,226 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.cloud.observability.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class BucketName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_BUCKET = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/buckets/{bucket}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String bucket; + + @Deprecated + protected BucketName() { + project = null; + location = null; + bucket = null; + } + + private BucketName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + bucket = Preconditions.checkNotNull(builder.getBucket()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBucket() { + return bucket; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static BucketName of(String project, String location, String bucket) { + return newBuilder().setProject(project).setLocation(location).setBucket(bucket).build(); + } + + public static String format(String project, String location, String bucket) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBucket(bucket) + .build() + .toString(); + } + + public static @Nullable BucketName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_BUCKET.validatedMatch( + formattedString, "BucketName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("bucket")); + } + + 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<@Nullable BucketName> values) { + List list = new ArrayList<>(values.size()); + for (BucketName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_BUCKET.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); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_BUCKET.instantiate( + "project", project, "location", location, "bucket", bucket); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + BucketName that = ((BucketName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.bucket, that.bucket); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(bucket); + return h; + } + + /** Builder for projects/{project}/locations/{location}/buckets/{bucket}. */ + public static class Builder { + private String project; + private String location; + private String bucket; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBucket() { + return bucket; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setBucket(String bucket) { + this.bucket = bucket; + return this; + } + + private Builder(BucketName bucketName) { + this.project = bucketName.project; + this.location = bucketName.location; + this.bucket = bucketName.bucket; + } + + public BucketName build() { + return new BucketName(this); + } + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/BucketOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/BucketOrBuilder.java new file mode 100644 index 000000000000..e4720553bce7 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/BucketOrBuilder.java @@ -0,0 +1,313 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface BucketOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.Bucket) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. Name of the bucket. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. Name of the bucket. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. User friendly display name.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Optional. User friendly display name.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. Description of the bucket.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. Description of the bucket.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Delete timestamp.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + boolean hasDeleteTime(); + + /** + * + * + *
+   * Output only. Delete timestamp.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + com.google.protobuf.Timestamp getDeleteTime(); + + /** + * + * + *
+   * Output only. Delete timestamp.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when the bucket in soft-deleted state is purged.
+   * 
+ * + * .google.protobuf.Timestamp purge_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the purgeTime field is set. + */ + boolean hasPurgeTime(); + + /** + * + * + *
+   * Output only. Timestamp when the bucket in soft-deleted state is purged.
+   * 
+ * + * .google.protobuf.Timestamp purge_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The purgeTime. + */ + com.google.protobuf.Timestamp getPurgeTime(); + + /** + * + * + *
+   * Output only. Timestamp when the bucket in soft-deleted state is purged.
+   * 
+ * + * .google.protobuf.Timestamp purge_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Settings for configuring CMEK on a bucket.
+   * 
+ * + * + * .google.cloud.observability.v1.CmekSettings cmek_settings = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cmekSettings field is set. + */ + boolean hasCmekSettings(); + + /** + * + * + *
+   * Optional. Settings for configuring CMEK on a bucket.
+   * 
+ * + * + * .google.cloud.observability.v1.CmekSettings cmek_settings = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cmekSettings. + */ + com.google.cloud.observability.v1.CmekSettings getCmekSettings(); + + /** + * + * + *
+   * Optional. Settings for configuring CMEK on a bucket.
+   * 
+ * + * + * .google.cloud.observability.v1.CmekSettings cmek_settings = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.observability.v1.CmekSettingsOrBuilder getCmekSettingsOrBuilder(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CmekSettings.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CmekSettings.java new file mode 100644 index 000000000000..afc81dd3dddb --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CmekSettings.java @@ -0,0 +1,1099 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Settings for configuring CMEK for a bucket.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.CmekSettings} + */ +@com.google.protobuf.Generated +public final class CmekSettings extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.CmekSettings) + CmekSettingsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "CmekSettings"); + } + + // Use CmekSettings.newBuilder() to construct. + private CmekSettings(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CmekSettings() { + kmsKey_ = ""; + kmsKeyVersion_ = ""; + serviceAccountId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_CmekSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_CmekSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.CmekSettings.class, + com.google.cloud.observability.v1.CmekSettings.Builder.class); + } + + public static final int KMS_KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object kmsKey_ = ""; + + /** + * + * + *
+   * Optional. The resource name for the configured Cloud KMS key. The format
+   * is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]
+   *
+   * For example:
+   *
+   * projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key
+   * 
+ * + * string kms_key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kmsKey. + */ + @java.lang.Override + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + 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(); + kmsKey_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The resource name for the configured Cloud KMS key. The format
+   * is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]
+   *
+   * For example:
+   *
+   * projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key
+   * 
+ * + * string kms_key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kmsKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KMS_KEY_VERSION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object kmsKeyVersion_ = ""; + + /** + * + * + *
+   * Output only. The CryptoKeyVersion resource name for the configured Cloud
+   * KMS key. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]
+   *
+   * For example:
+   *
+   * projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1
+   *
+   * This read-only field is used to convey the specific configured
+   * CryptoKeyVersion of the `kms_key` that has been configured. It is
+   * populated when the CMEK settings are bound to a single key version.
+   * 
+ * + * string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The kmsKeyVersion. + */ + @java.lang.Override + public java.lang.String getKmsKeyVersion() { + java.lang.Object ref = kmsKeyVersion_; + 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(); + kmsKeyVersion_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The CryptoKeyVersion resource name for the configured Cloud
+   * KMS key. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]
+   *
+   * For example:
+   *
+   * projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1
+   *
+   * This read-only field is used to convey the specific configured
+   * CryptoKeyVersion of the `kms_key` that has been configured. It is
+   * populated when the CMEK settings are bound to a single key version.
+   * 
+ * + * string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for kmsKeyVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyVersionBytes() { + java.lang.Object ref = kmsKeyVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ACCOUNT_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAccountId_ = ""; + + /** + * + * + *
+   * Output only. The service account used to access the key.
+   * 
+ * + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceAccountId. + */ + @java.lang.Override + public java.lang.String getServiceAccountId() { + java.lang.Object ref = serviceAccountId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccountId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The service account used to access the key.
+   * 
+ * + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceAccountId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountIdBytes() { + java.lang.Object ref = serviceAccountId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccountId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKey_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, kmsKey_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, kmsKeyVersion_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAccountId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, serviceAccountId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKey_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, kmsKey_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, kmsKeyVersion_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAccountId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, serviceAccountId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.CmekSettings)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.CmekSettings other = + (com.google.cloud.observability.v1.CmekSettings) obj; + + if (!getKmsKey().equals(other.getKmsKey())) return false; + if (!getKmsKeyVersion().equals(other.getKmsKeyVersion())) return false; + if (!getServiceAccountId().equals(other.getServiceAccountId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KMS_KEY_FIELD_NUMBER; + hash = (53 * hash) + getKmsKey().hashCode(); + hash = (37 * hash) + KMS_KEY_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getKmsKeyVersion().hashCode(); + hash = (37 * hash) + SERVICE_ACCOUNT_ID_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccountId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.CmekSettings parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.CmekSettings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.CmekSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.CmekSettings 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.cloud.observability.v1.CmekSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.CmekSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.CmekSettings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.CmekSettings parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.CmekSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.CmekSettings parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.CmekSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.CmekSettings parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.observability.v1.CmekSettings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Settings for configuring CMEK for a bucket.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.CmekSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.CmekSettings) + com.google.cloud.observability.v1.CmekSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_CmekSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_CmekSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.CmekSettings.class, + com.google.cloud.observability.v1.CmekSettings.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.CmekSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + kmsKey_ = ""; + kmsKeyVersion_ = ""; + serviceAccountId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_CmekSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.CmekSettings getDefaultInstanceForType() { + return com.google.cloud.observability.v1.CmekSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.CmekSettings build() { + com.google.cloud.observability.v1.CmekSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.CmekSettings buildPartial() { + com.google.cloud.observability.v1.CmekSettings result = + new com.google.cloud.observability.v1.CmekSettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.CmekSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kmsKey_ = kmsKey_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.kmsKeyVersion_ = kmsKeyVersion_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.serviceAccountId_ = serviceAccountId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.CmekSettings) { + return mergeFrom((com.google.cloud.observability.v1.CmekSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.CmekSettings other) { + if (other == com.google.cloud.observability.v1.CmekSettings.getDefaultInstance()) return this; + if (!other.getKmsKey().isEmpty()) { + kmsKey_ = other.kmsKey_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getKmsKeyVersion().isEmpty()) { + kmsKeyVersion_ = other.kmsKeyVersion_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getServiceAccountId().isEmpty()) { + serviceAccountId_ = other.serviceAccountId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + kmsKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + kmsKeyVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + serviceAccountId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object kmsKey_ = ""; + + /** + * + * + *
+     * Optional. The resource name for the configured Cloud KMS key. The format
+     * is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]
+     *
+     * For example:
+     *
+     * projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key
+     * 
+ * + * string kms_key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kmsKey. + */ + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The resource name for the configured Cloud KMS key. The format
+     * is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]
+     *
+     * For example:
+     *
+     * projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key
+     * 
+ * + * string kms_key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kmsKey. + */ + public com.google.protobuf.ByteString getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The resource name for the configured Cloud KMS key. The format
+     * is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]
+     *
+     * For example:
+     *
+     * projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key
+     * 
+ * + * string kms_key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The kmsKey to set. + * @return This builder for chaining. + */ + public Builder setKmsKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kmsKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The resource name for the configured Cloud KMS key. The format
+     * is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]
+     *
+     * For example:
+     *
+     * projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key
+     * 
+ * + * string kms_key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearKmsKey() { + kmsKey_ = getDefaultInstance().getKmsKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The resource name for the configured Cloud KMS key. The format
+     * is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]
+     *
+     * For example:
+     *
+     * projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key
+     * 
+ * + * string kms_key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for kmsKey to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kmsKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object kmsKeyVersion_ = ""; + + /** + * + * + *
+     * Output only. The CryptoKeyVersion resource name for the configured Cloud
+     * KMS key. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]
+     *
+     * For example:
+     *
+     * projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1
+     *
+     * This read-only field is used to convey the specific configured
+     * CryptoKeyVersion of the `kms_key` that has been configured. It is
+     * populated when the CMEK settings are bound to a single key version.
+     * 
+ * + * string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The kmsKeyVersion. + */ + public java.lang.String getKmsKeyVersion() { + java.lang.Object ref = kmsKeyVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The CryptoKeyVersion resource name for the configured Cloud
+     * KMS key. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]
+     *
+     * For example:
+     *
+     * projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1
+     *
+     * This read-only field is used to convey the specific configured
+     * CryptoKeyVersion of the `kms_key` that has been configured. It is
+     * populated when the CMEK settings are bound to a single key version.
+     * 
+ * + * string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for kmsKeyVersion. + */ + public com.google.protobuf.ByteString getKmsKeyVersionBytes() { + java.lang.Object ref = kmsKeyVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The CryptoKeyVersion resource name for the configured Cloud
+     * KMS key. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]
+     *
+     * For example:
+     *
+     * projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1
+     *
+     * This read-only field is used to convey the specific configured
+     * CryptoKeyVersion of the `kms_key` that has been configured. It is
+     * populated when the CMEK settings are bound to a single key version.
+     * 
+ * + * string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The kmsKeyVersion to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kmsKeyVersion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The CryptoKeyVersion resource name for the configured Cloud
+     * KMS key. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]
+     *
+     * For example:
+     *
+     * projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1
+     *
+     * This read-only field is used to convey the specific configured
+     * CryptoKeyVersion of the `kms_key` that has been configured. It is
+     * populated when the CMEK settings are bound to a single key version.
+     * 
+ * + * string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearKmsKeyVersion() { + kmsKeyVersion_ = getDefaultInstance().getKmsKeyVersion(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The CryptoKeyVersion resource name for the configured Cloud
+     * KMS key. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]
+     *
+     * For example:
+     *
+     * projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1
+     *
+     * This read-only field is used to convey the specific configured
+     * CryptoKeyVersion of the `kms_key` that has been configured. It is
+     * populated when the CMEK settings are bound to a single key version.
+     * 
+ * + * string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for kmsKeyVersion to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kmsKeyVersion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object serviceAccountId_ = ""; + + /** + * + * + *
+     * Output only. The service account used to access the key.
+     * 
+ * + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceAccountId. + */ + public java.lang.String getServiceAccountId() { + java.lang.Object ref = serviceAccountId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccountId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The service account used to access the key.
+     * 
+ * + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceAccountId. + */ + public com.google.protobuf.ByteString getServiceAccountIdBytes() { + java.lang.Object ref = serviceAccountId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccountId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The service account used to access the key.
+     * 
+ * + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The serviceAccountId to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccountId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The service account used to access the key.
+     * 
+ * + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccountId() { + serviceAccountId_ = getDefaultInstance().getServiceAccountId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The service account used to access the key.
+     * 
+ * + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for serviceAccountId to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAccountId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.CmekSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.CmekSettings) + private static final com.google.cloud.observability.v1.CmekSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.CmekSettings(); + } + + public static com.google.cloud.observability.v1.CmekSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CmekSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.CmekSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CmekSettingsOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CmekSettingsOrBuilder.java new file mode 100644 index 000000000000..efb1e49fec12 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CmekSettingsOrBuilder.java @@ -0,0 +1,142 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface CmekSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.CmekSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The resource name for the configured Cloud KMS key. The format
+   * is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]
+   *
+   * For example:
+   *
+   * projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key
+   * 
+ * + * string kms_key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kmsKey. + */ + java.lang.String getKmsKey(); + + /** + * + * + *
+   * Optional. The resource name for the configured Cloud KMS key. The format
+   * is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]
+   *
+   * For example:
+   *
+   * projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key
+   * 
+ * + * string kms_key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kmsKey. + */ + com.google.protobuf.ByteString getKmsKeyBytes(); + + /** + * + * + *
+   * Output only. The CryptoKeyVersion resource name for the configured Cloud
+   * KMS key. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]
+   *
+   * For example:
+   *
+   * projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1
+   *
+   * This read-only field is used to convey the specific configured
+   * CryptoKeyVersion of the `kms_key` that has been configured. It is
+   * populated when the CMEK settings are bound to a single key version.
+   * 
+ * + * string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The kmsKeyVersion. + */ + java.lang.String getKmsKeyVersion(); + + /** + * + * + *
+   * Output only. The CryptoKeyVersion resource name for the configured Cloud
+   * KMS key. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]
+   *
+   * For example:
+   *
+   * projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1
+   *
+   * This read-only field is used to convey the specific configured
+   * CryptoKeyVersion of the `kms_key` that has been configured. It is
+   * populated when the CMEK settings are bound to a single key version.
+   * 
+ * + * string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for kmsKeyVersion. + */ + com.google.protobuf.ByteString getKmsKeyVersionBytes(); + + /** + * + * + *
+   * Output only. The service account used to access the key.
+   * 
+ * + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceAccountId. + */ + java.lang.String getServiceAccountId(); + + /** + * + * + *
+   * Output only. The service account used to access the key.
+   * 
+ * + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceAccountId. + */ + com.google.protobuf.ByteString getServiceAccountIdBytes(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CreateBucketRequest.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CreateBucketRequest.java new file mode 100644 index 000000000000..c4542d985c3d --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CreateBucketRequest.java @@ -0,0 +1,1129 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Request for creating a bucket.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.CreateBucketRequest} + */ +@com.google.protobuf.Generated +public final class CreateBucketRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.CreateBucketRequest) + CreateBucketRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "CreateBucketRequest"); + } + + // Use CreateBucketRequest.newBuilder() to construct. + private CreateBucketRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateBucketRequest() { + parent_ = ""; + bucketId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_CreateBucketRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_CreateBucketRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.CreateBucketRequest.class, + com.google.cloud.observability.v1.CreateBucketRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Name of the project and location for the bucket. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]
+   * 
+ * + * + * 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. Name of the project and location for the bucket. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]
+   * 
+ * + * + * 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; + + @SuppressWarnings("serial") + private volatile java.lang.Object bucketId_ = ""; + + /** + * + * + *
+   * Required. Id of the bucket to create.
+   * 
+ * + * 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. Id of the bucket to create.
+   * 
+ * + * 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.cloud.observability.v1.Bucket bucket_; + + /** + * + * + *
+   * Required. Bucket to create.
+   * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the bucket field is set. + */ + @java.lang.Override + public boolean hasBucket() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Bucket to create.
+   * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bucket. + */ + @java.lang.Override + public com.google.cloud.observability.v1.Bucket getBucket() { + return bucket_ == null + ? com.google.cloud.observability.v1.Bucket.getDefaultInstance() + : bucket_; + } + + /** + * + * + *
+   * Required. Bucket to create.
+   * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.observability.v1.BucketOrBuilder getBucketOrBuilder() { + return bucket_ == null + ? com.google.cloud.observability.v1.Bucket.getDefaultInstance() + : bucket_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(bucketId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, bucketId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getBucket()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(bucketId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, bucketId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBucket()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.CreateBucketRequest)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.CreateBucketRequest other = + (com.google.cloud.observability.v1.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 (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.CreateBucketRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.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.cloud.observability.v1.CreateBucketRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.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.cloud.observability.v1.CreateBucketRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.CreateBucketRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.CreateBucketRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.CreateBucketRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.CreateBucketRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.CreateBucketRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.CreateBucketRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.CreateBucketRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.observability.v1.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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for creating a bucket.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.CreateBucketRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.CreateBucketRequest) + com.google.cloud.observability.v1.CreateBucketRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_CreateBucketRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_CreateBucketRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.CreateBucketRequest.class, + com.google.cloud.observability.v1.CreateBucketRequest.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.CreateBucketRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBucketFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + bucketId_ = ""; + bucket_ = null; + if (bucketBuilder_ != null) { + bucketBuilder_.dispose(); + bucketBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_CreateBucketRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.CreateBucketRequest getDefaultInstanceForType() { + return com.google.cloud.observability.v1.CreateBucketRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.CreateBucketRequest build() { + com.google.cloud.observability.v1.CreateBucketRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.CreateBucketRequest buildPartial() { + com.google.cloud.observability.v1.CreateBucketRequest result = + new com.google.cloud.observability.v1.CreateBucketRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.CreateBucketRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.bucketId_ = bucketId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.bucket_ = bucketBuilder_ == null ? bucket_ : bucketBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.CreateBucketRequest) { + return mergeFrom((com.google.cloud.observability.v1.CreateBucketRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.CreateBucketRequest other) { + if (other == com.google.cloud.observability.v1.CreateBucketRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBucketId().isEmpty()) { + bucketId_ = other.bucketId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasBucket()) { + mergeBucket(other.getBucket()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + bucketId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetBucketFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Name of the project and location for the bucket. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]
+     * 
+ * + * + * 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. Name of the project and location for the bucket. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]
+     * 
+ * + * + * 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. Name of the project and location for the bucket. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the project and location for the bucket. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the project and location for the bucket. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object bucketId_ = ""; + + /** + * + * + *
+     * Required. Id of the bucket to create.
+     * 
+ * + * 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. Id of the bucket to create.
+     * 
+ * + * 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. Id of the bucket to create.
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Id of the bucket to create.
+     * 
+ * + * string bucket_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBucketId() { + bucketId_ = getDefaultInstance().getBucketId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Id of the bucket to create.
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.observability.v1.Bucket bucket_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.Bucket, + com.google.cloud.observability.v1.Bucket.Builder, + com.google.cloud.observability.v1.BucketOrBuilder> + bucketBuilder_; + + /** + * + * + *
+     * Required. Bucket to create.
+     * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the bucket field is set. + */ + public boolean hasBucket() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. Bucket to create.
+     * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bucket. + */ + public com.google.cloud.observability.v1.Bucket getBucket() { + if (bucketBuilder_ == null) { + return bucket_ == null + ? com.google.cloud.observability.v1.Bucket.getDefaultInstance() + : bucket_; + } else { + return bucketBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Bucket to create.
+     * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBucket(com.google.cloud.observability.v1.Bucket value) { + if (bucketBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bucket_ = value; + } else { + bucketBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Bucket to create.
+     * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBucket(com.google.cloud.observability.v1.Bucket.Builder builderForValue) { + if (bucketBuilder_ == null) { + bucket_ = builderForValue.build(); + } else { + bucketBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Bucket to create.
+     * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeBucket(com.google.cloud.observability.v1.Bucket value) { + if (bucketBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && bucket_ != null + && bucket_ != com.google.cloud.observability.v1.Bucket.getDefaultInstance()) { + getBucketBuilder().mergeFrom(value); + } else { + bucket_ = value; + } + } else { + bucketBuilder_.mergeFrom(value); + } + if (bucket_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Bucket to create.
+     * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearBucket() { + bitField0_ = (bitField0_ & ~0x00000004); + bucket_ = null; + if (bucketBuilder_ != null) { + bucketBuilder_.dispose(); + bucketBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Bucket to create.
+     * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.observability.v1.Bucket.Builder getBucketBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetBucketFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Bucket to create.
+     * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.observability.v1.BucketOrBuilder getBucketOrBuilder() { + if (bucketBuilder_ != null) { + return bucketBuilder_.getMessageOrBuilder(); + } else { + return bucket_ == null + ? com.google.cloud.observability.v1.Bucket.getDefaultInstance() + : bucket_; + } + } + + /** + * + * + *
+     * Required. Bucket to create.
+     * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.Bucket, + com.google.cloud.observability.v1.Bucket.Builder, + com.google.cloud.observability.v1.BucketOrBuilder> + internalGetBucketFieldBuilder() { + if (bucketBuilder_ == null) { + bucketBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.Bucket, + com.google.cloud.observability.v1.Bucket.Builder, + com.google.cloud.observability.v1.BucketOrBuilder>( + getBucket(), getParentForChildren(), isClean()); + bucket_ = null; + } + return bucketBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.CreateBucketRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.CreateBucketRequest) + private static final com.google.cloud.observability.v1.CreateBucketRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.CreateBucketRequest(); + } + + public static com.google.cloud.observability.v1.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 { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.CreateBucketRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CreateBucketRequestOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CreateBucketRequestOrBuilder.java new file mode 100644 index 000000000000..5344589551f9 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CreateBucketRequestOrBuilder.java @@ -0,0 +1,131 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface CreateBucketRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.CreateBucketRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the project and location for the bucket. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Name of the project and location for the bucket. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Id of the bucket to create.
+   * 
+ * + * string bucket_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bucketId. + */ + java.lang.String getBucketId(); + + /** + * + * + *
+   * Required. Id of the bucket to create.
+   * 
+ * + * string bucket_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bucketId. + */ + com.google.protobuf.ByteString getBucketIdBytes(); + + /** + * + * + *
+   * Required. Bucket to create.
+   * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the bucket field is set. + */ + boolean hasBucket(); + + /** + * + * + *
+   * Required. Bucket to create.
+   * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bucket. + */ + com.google.cloud.observability.v1.Bucket getBucket(); + + /** + * + * + *
+   * Required. Bucket to create.
+   * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.observability.v1.BucketOrBuilder getBucketOrBuilder(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CreateLinkRequest.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CreateLinkRequest.java new file mode 100644 index 000000000000..c12871d89058 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CreateLinkRequest.java @@ -0,0 +1,1108 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Request for creating a link.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.CreateLinkRequest} + */ +@com.google.protobuf.Generated +public final class CreateLinkRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.CreateLinkRequest) + CreateLinkRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "CreateLinkRequest"); + } + + // Use CreateLinkRequest.newBuilder() to construct. + private CreateLinkRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateLinkRequest() { + parent_ = ""; + linkId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_CreateLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_CreateLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.CreateLinkRequest.class, + com.google.cloud.observability.v1.CreateLinkRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Name of the containing dataset for this link. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+   * 
+ * + * + * 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. Name of the containing dataset for this link. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+   * 
+ * + * + * 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 LINK_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object linkId_ = ""; + + /** + * + * + *
+   * Required. Id of the link to create.
+   * 
+ * + * string link_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The linkId. + */ + @java.lang.Override + public java.lang.String getLinkId() { + java.lang.Object ref = linkId_; + 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(); + linkId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Id of the link to create.
+   * 
+ * + * string link_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for linkId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLinkIdBytes() { + java.lang.Object ref = linkId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + linkId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LINK_FIELD_NUMBER = 3; + private com.google.cloud.observability.v1.Link link_; + + /** + * + * + *
+   * Required. Link to create.
+   * 
+ * + * .google.cloud.observability.v1.Link link = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the link field is set. + */ + @java.lang.Override + public boolean hasLink() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Link to create.
+   * 
+ * + * .google.cloud.observability.v1.Link link = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The link. + */ + @java.lang.Override + public com.google.cloud.observability.v1.Link getLink() { + return link_ == null ? com.google.cloud.observability.v1.Link.getDefaultInstance() : link_; + } + + /** + * + * + *
+   * Required. Link to create.
+   * 
+ * + * .google.cloud.observability.v1.Link link = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.observability.v1.LinkOrBuilder getLinkOrBuilder() { + return link_ == null ? com.google.cloud.observability.v1.Link.getDefaultInstance() : link_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(linkId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, linkId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getLink()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(linkId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, linkId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLink()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.CreateLinkRequest)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.CreateLinkRequest other = + (com.google.cloud.observability.v1.CreateLinkRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getLinkId().equals(other.getLinkId())) return false; + if (hasLink() != other.hasLink()) return false; + if (hasLink()) { + if (!getLink().equals(other.getLink())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + LINK_ID_FIELD_NUMBER; + hash = (53 * hash) + getLinkId().hashCode(); + if (hasLink()) { + hash = (37 * hash) + LINK_FIELD_NUMBER; + hash = (53 * hash) + getLink().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.CreateLinkRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.CreateLinkRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.CreateLinkRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.CreateLinkRequest 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.cloud.observability.v1.CreateLinkRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.CreateLinkRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.CreateLinkRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.CreateLinkRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.CreateLinkRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.CreateLinkRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.CreateLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.CreateLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.observability.v1.CreateLinkRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for creating a link.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.CreateLinkRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.CreateLinkRequest) + com.google.cloud.observability.v1.CreateLinkRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_CreateLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_CreateLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.CreateLinkRequest.class, + com.google.cloud.observability.v1.CreateLinkRequest.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.CreateLinkRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetLinkFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + linkId_ = ""; + link_ = null; + if (linkBuilder_ != null) { + linkBuilder_.dispose(); + linkBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_CreateLinkRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.CreateLinkRequest getDefaultInstanceForType() { + return com.google.cloud.observability.v1.CreateLinkRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.CreateLinkRequest build() { + com.google.cloud.observability.v1.CreateLinkRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.CreateLinkRequest buildPartial() { + com.google.cloud.observability.v1.CreateLinkRequest result = + new com.google.cloud.observability.v1.CreateLinkRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.CreateLinkRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.linkId_ = linkId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.link_ = linkBuilder_ == null ? link_ : linkBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.CreateLinkRequest) { + return mergeFrom((com.google.cloud.observability.v1.CreateLinkRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.CreateLinkRequest other) { + if (other == com.google.cloud.observability.v1.CreateLinkRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getLinkId().isEmpty()) { + linkId_ = other.linkId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasLink()) { + mergeLink(other.getLink()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + linkId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetLinkFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Name of the containing dataset for this link. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+     * 
+ * + * + * 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. Name of the containing dataset for this link. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+     * 
+ * + * + * 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. Name of the containing dataset for this link. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the containing dataset for this link. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the containing dataset for this link. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object linkId_ = ""; + + /** + * + * + *
+     * Required. Id of the link to create.
+     * 
+ * + * string link_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The linkId. + */ + public java.lang.String getLinkId() { + java.lang.Object ref = linkId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + linkId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Id of the link to create.
+     * 
+ * + * string link_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for linkId. + */ + public com.google.protobuf.ByteString getLinkIdBytes() { + java.lang.Object ref = linkId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + linkId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Id of the link to create.
+     * 
+ * + * string link_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The linkId to set. + * @return This builder for chaining. + */ + public Builder setLinkId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + linkId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Id of the link to create.
+     * 
+ * + * string link_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearLinkId() { + linkId_ = getDefaultInstance().getLinkId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Id of the link to create.
+     * 
+ * + * string link_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for linkId to set. + * @return This builder for chaining. + */ + public Builder setLinkIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + linkId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.observability.v1.Link link_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.Link, + com.google.cloud.observability.v1.Link.Builder, + com.google.cloud.observability.v1.LinkOrBuilder> + linkBuilder_; + + /** + * + * + *
+     * Required. Link to create.
+     * 
+ * + * .google.cloud.observability.v1.Link link = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the link field is set. + */ + public boolean hasLink() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. Link to create.
+     * 
+ * + * .google.cloud.observability.v1.Link link = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The link. + */ + public com.google.cloud.observability.v1.Link getLink() { + if (linkBuilder_ == null) { + return link_ == null ? com.google.cloud.observability.v1.Link.getDefaultInstance() : link_; + } else { + return linkBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Link to create.
+     * 
+ * + * .google.cloud.observability.v1.Link link = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setLink(com.google.cloud.observability.v1.Link value) { + if (linkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + link_ = value; + } else { + linkBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Link to create.
+     * 
+ * + * .google.cloud.observability.v1.Link link = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setLink(com.google.cloud.observability.v1.Link.Builder builderForValue) { + if (linkBuilder_ == null) { + link_ = builderForValue.build(); + } else { + linkBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Link to create.
+     * 
+ * + * .google.cloud.observability.v1.Link link = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeLink(com.google.cloud.observability.v1.Link value) { + if (linkBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && link_ != null + && link_ != com.google.cloud.observability.v1.Link.getDefaultInstance()) { + getLinkBuilder().mergeFrom(value); + } else { + link_ = value; + } + } else { + linkBuilder_.mergeFrom(value); + } + if (link_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Link to create.
+     * 
+ * + * .google.cloud.observability.v1.Link link = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearLink() { + bitField0_ = (bitField0_ & ~0x00000004); + link_ = null; + if (linkBuilder_ != null) { + linkBuilder_.dispose(); + linkBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Link to create.
+     * 
+ * + * .google.cloud.observability.v1.Link link = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.observability.v1.Link.Builder getLinkBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetLinkFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Link to create.
+     * 
+ * + * .google.cloud.observability.v1.Link link = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.observability.v1.LinkOrBuilder getLinkOrBuilder() { + if (linkBuilder_ != null) { + return linkBuilder_.getMessageOrBuilder(); + } else { + return link_ == null ? com.google.cloud.observability.v1.Link.getDefaultInstance() : link_; + } + } + + /** + * + * + *
+     * Required. Link to create.
+     * 
+ * + * .google.cloud.observability.v1.Link link = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.Link, + com.google.cloud.observability.v1.Link.Builder, + com.google.cloud.observability.v1.LinkOrBuilder> + internalGetLinkFieldBuilder() { + if (linkBuilder_ == null) { + linkBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.Link, + com.google.cloud.observability.v1.Link.Builder, + com.google.cloud.observability.v1.LinkOrBuilder>( + getLink(), getParentForChildren(), isClean()); + link_ = null; + } + return linkBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.CreateLinkRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.CreateLinkRequest) + private static final com.google.cloud.observability.v1.CreateLinkRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.CreateLinkRequest(); + } + + public static com.google.cloud.observability.v1.CreateLinkRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateLinkRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.CreateLinkRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CreateLinkRequestOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CreateLinkRequestOrBuilder.java new file mode 100644 index 000000000000..87adbc3958c5 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CreateLinkRequestOrBuilder.java @@ -0,0 +1,128 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface CreateLinkRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.CreateLinkRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the containing dataset for this link. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Name of the containing dataset for this link. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Id of the link to create.
+   * 
+ * + * string link_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The linkId. + */ + java.lang.String getLinkId(); + + /** + * + * + *
+   * Required. Id of the link to create.
+   * 
+ * + * string link_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for linkId. + */ + com.google.protobuf.ByteString getLinkIdBytes(); + + /** + * + * + *
+   * Required. Link to create.
+   * 
+ * + * .google.cloud.observability.v1.Link link = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the link field is set. + */ + boolean hasLink(); + + /** + * + * + *
+   * Required. Link to create.
+   * 
+ * + * .google.cloud.observability.v1.Link link = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The link. + */ + com.google.cloud.observability.v1.Link getLink(); + + /** + * + * + *
+   * Required. Link to create.
+   * 
+ * + * .google.cloud.observability.v1.Link link = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.observability.v1.LinkOrBuilder getLinkOrBuilder(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CreateTraceScopeRequest.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CreateTraceScopeRequest.java new file mode 100644 index 000000000000..b2fb8d481c4d --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CreateTraceScopeRequest.java @@ -0,0 +1,1166 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Request for creating a TraceScope.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.CreateTraceScopeRequest} + */ +@com.google.protobuf.Generated +public final class CreateTraceScopeRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.CreateTraceScopeRequest) + CreateTraceScopeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "CreateTraceScopeRequest"); + } + + // Use CreateTraceScopeRequest.newBuilder() to construct. + private CreateTraceScopeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateTraceScopeRequest() { + parent_ = ""; + traceScopeId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_CreateTraceScopeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_CreateTraceScopeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.CreateTraceScopeRequest.class, + com.google.cloud.observability.v1.CreateTraceScopeRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The full resource name of the location where the trace scope
+   * should be created
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION_ID]
+   *
+   * For example:
+   *
+   * projects/my-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 full resource name of the location where the trace scope
+   * should be created
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION_ID]
+   *
+   * For example:
+   *
+   * projects/my-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 TRACE_SCOPE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object traceScopeId_ = ""; + + /** + * + * + *
+   * Required. A client-assigned identifier for the trace scope.
+   * 
+ * + * string trace_scope_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The traceScopeId. + */ + @java.lang.Override + public java.lang.String getTraceScopeId() { + java.lang.Object ref = traceScopeId_; + 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(); + traceScopeId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. A client-assigned identifier for the trace scope.
+   * 
+ * + * string trace_scope_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for traceScopeId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTraceScopeIdBytes() { + java.lang.Object ref = traceScopeId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + traceScopeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRACE_SCOPE_FIELD_NUMBER = 3; + private com.google.cloud.observability.v1.TraceScope traceScope_; + + /** + * + * + *
+   * Required. The new trace scope.
+   * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the traceScope field is set. + */ + @java.lang.Override + public boolean hasTraceScope() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The new trace scope.
+   * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The traceScope. + */ + @java.lang.Override + public com.google.cloud.observability.v1.TraceScope getTraceScope() { + return traceScope_ == null + ? com.google.cloud.observability.v1.TraceScope.getDefaultInstance() + : traceScope_; + } + + /** + * + * + *
+   * Required. The new trace scope.
+   * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.observability.v1.TraceScopeOrBuilder getTraceScopeOrBuilder() { + return traceScope_ == null + ? com.google.cloud.observability.v1.TraceScope.getDefaultInstance() + : traceScope_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(traceScopeId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, traceScopeId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getTraceScope()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(traceScopeId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, traceScopeId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTraceScope()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.CreateTraceScopeRequest)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.CreateTraceScopeRequest other = + (com.google.cloud.observability.v1.CreateTraceScopeRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getTraceScopeId().equals(other.getTraceScopeId())) return false; + if (hasTraceScope() != other.hasTraceScope()) return false; + if (hasTraceScope()) { + if (!getTraceScope().equals(other.getTraceScope())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + TRACE_SCOPE_ID_FIELD_NUMBER; + hash = (53 * hash) + getTraceScopeId().hashCode(); + if (hasTraceScope()) { + hash = (37 * hash) + TRACE_SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getTraceScope().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.CreateTraceScopeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.CreateTraceScopeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.CreateTraceScopeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.CreateTraceScopeRequest 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.cloud.observability.v1.CreateTraceScopeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.CreateTraceScopeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.CreateTraceScopeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.CreateTraceScopeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.CreateTraceScopeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.CreateTraceScopeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.CreateTraceScopeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.CreateTraceScopeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.observability.v1.CreateTraceScopeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for creating a TraceScope.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.CreateTraceScopeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.CreateTraceScopeRequest) + com.google.cloud.observability.v1.CreateTraceScopeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_CreateTraceScopeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_CreateTraceScopeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.CreateTraceScopeRequest.class, + com.google.cloud.observability.v1.CreateTraceScopeRequest.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.CreateTraceScopeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTraceScopeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + traceScopeId_ = ""; + traceScope_ = null; + if (traceScopeBuilder_ != null) { + traceScopeBuilder_.dispose(); + traceScopeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_CreateTraceScopeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.CreateTraceScopeRequest getDefaultInstanceForType() { + return com.google.cloud.observability.v1.CreateTraceScopeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.CreateTraceScopeRequest build() { + com.google.cloud.observability.v1.CreateTraceScopeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.CreateTraceScopeRequest buildPartial() { + com.google.cloud.observability.v1.CreateTraceScopeRequest result = + new com.google.cloud.observability.v1.CreateTraceScopeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.CreateTraceScopeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.traceScopeId_ = traceScopeId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.traceScope_ = traceScopeBuilder_ == null ? traceScope_ : traceScopeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.CreateTraceScopeRequest) { + return mergeFrom((com.google.cloud.observability.v1.CreateTraceScopeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.CreateTraceScopeRequest other) { + if (other == com.google.cloud.observability.v1.CreateTraceScopeRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTraceScopeId().isEmpty()) { + traceScopeId_ = other.traceScopeId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasTraceScope()) { + mergeTraceScope(other.getTraceScope()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + traceScopeId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetTraceScopeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The full resource name of the location where the trace scope
+     * should be created
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION_ID]
+     *
+     * For example:
+     *
+     * projects/my-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 full resource name of the location where the trace scope
+     * should be created
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION_ID]
+     *
+     * For example:
+     *
+     * projects/my-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 full resource name of the location where the trace scope
+     * should be created
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION_ID]
+     *
+     * For example:
+     *
+     * projects/my-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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The full resource name of the location where the trace scope
+     * should be created
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION_ID]
+     *
+     * For example:
+     *
+     * projects/my-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(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The full resource name of the location where the trace scope
+     * should be created
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION_ID]
+     *
+     * For example:
+     *
+     * projects/my-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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object traceScopeId_ = ""; + + /** + * + * + *
+     * Required. A client-assigned identifier for the trace scope.
+     * 
+ * + * string trace_scope_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The traceScopeId. + */ + public java.lang.String getTraceScopeId() { + java.lang.Object ref = traceScopeId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + traceScopeId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. A client-assigned identifier for the trace scope.
+     * 
+ * + * string trace_scope_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for traceScopeId. + */ + public com.google.protobuf.ByteString getTraceScopeIdBytes() { + java.lang.Object ref = traceScopeId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + traceScopeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. A client-assigned identifier for the trace scope.
+     * 
+ * + * string trace_scope_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The traceScopeId to set. + * @return This builder for chaining. + */ + public Builder setTraceScopeId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + traceScopeId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A client-assigned identifier for the trace scope.
+     * 
+ * + * string trace_scope_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTraceScopeId() { + traceScopeId_ = getDefaultInstance().getTraceScopeId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A client-assigned identifier for the trace scope.
+     * 
+ * + * string trace_scope_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for traceScopeId to set. + * @return This builder for chaining. + */ + public Builder setTraceScopeIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + traceScopeId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.observability.v1.TraceScope traceScope_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.TraceScope, + com.google.cloud.observability.v1.TraceScope.Builder, + com.google.cloud.observability.v1.TraceScopeOrBuilder> + traceScopeBuilder_; + + /** + * + * + *
+     * Required. The new trace scope.
+     * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the traceScope field is set. + */ + public boolean hasTraceScope() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The new trace scope.
+     * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The traceScope. + */ + public com.google.cloud.observability.v1.TraceScope getTraceScope() { + if (traceScopeBuilder_ == null) { + return traceScope_ == null + ? com.google.cloud.observability.v1.TraceScope.getDefaultInstance() + : traceScope_; + } else { + return traceScopeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The new trace scope.
+     * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTraceScope(com.google.cloud.observability.v1.TraceScope value) { + if (traceScopeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + traceScope_ = value; + } else { + traceScopeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The new trace scope.
+     * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTraceScope( + com.google.cloud.observability.v1.TraceScope.Builder builderForValue) { + if (traceScopeBuilder_ == null) { + traceScope_ = builderForValue.build(); + } else { + traceScopeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The new trace scope.
+     * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTraceScope(com.google.cloud.observability.v1.TraceScope value) { + if (traceScopeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && traceScope_ != null + && traceScope_ != com.google.cloud.observability.v1.TraceScope.getDefaultInstance()) { + getTraceScopeBuilder().mergeFrom(value); + } else { + traceScope_ = value; + } + } else { + traceScopeBuilder_.mergeFrom(value); + } + if (traceScope_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The new trace scope.
+     * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTraceScope() { + bitField0_ = (bitField0_ & ~0x00000004); + traceScope_ = null; + if (traceScopeBuilder_ != null) { + traceScopeBuilder_.dispose(); + traceScopeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The new trace scope.
+     * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.observability.v1.TraceScope.Builder getTraceScopeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetTraceScopeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The new trace scope.
+     * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.observability.v1.TraceScopeOrBuilder getTraceScopeOrBuilder() { + if (traceScopeBuilder_ != null) { + return traceScopeBuilder_.getMessageOrBuilder(); + } else { + return traceScope_ == null + ? com.google.cloud.observability.v1.TraceScope.getDefaultInstance() + : traceScope_; + } + } + + /** + * + * + *
+     * Required. The new trace scope.
+     * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.TraceScope, + com.google.cloud.observability.v1.TraceScope.Builder, + com.google.cloud.observability.v1.TraceScopeOrBuilder> + internalGetTraceScopeFieldBuilder() { + if (traceScopeBuilder_ == null) { + traceScopeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.TraceScope, + com.google.cloud.observability.v1.TraceScope.Builder, + com.google.cloud.observability.v1.TraceScopeOrBuilder>( + getTraceScope(), getParentForChildren(), isClean()); + traceScope_ = null; + } + return traceScopeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.CreateTraceScopeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.CreateTraceScopeRequest) + private static final com.google.cloud.observability.v1.CreateTraceScopeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.CreateTraceScopeRequest(); + } + + public static com.google.cloud.observability.v1.CreateTraceScopeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateTraceScopeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.CreateTraceScopeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CreateTraceScopeRequestOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CreateTraceScopeRequestOrBuilder.java new file mode 100644 index 000000000000..422142e0354c --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/CreateTraceScopeRequestOrBuilder.java @@ -0,0 +1,141 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface CreateTraceScopeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.CreateTraceScopeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The full resource name of the location where the trace scope
+   * should be created
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION_ID]
+   *
+   * For example:
+   *
+   * projects/my-project/locations/global
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The full resource name of the location where the trace scope
+   * should be created
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION_ID]
+   *
+   * For example:
+   *
+   * projects/my-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 for the trace scope.
+   * 
+ * + * string trace_scope_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The traceScopeId. + */ + java.lang.String getTraceScopeId(); + + /** + * + * + *
+   * Required. A client-assigned identifier for the trace scope.
+   * 
+ * + * string trace_scope_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for traceScopeId. + */ + com.google.protobuf.ByteString getTraceScopeIdBytes(); + + /** + * + * + *
+   * Required. The new trace scope.
+   * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the traceScope field is set. + */ + boolean hasTraceScope(); + + /** + * + * + *
+   * Required. The new trace scope.
+   * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The traceScope. + */ + com.google.cloud.observability.v1.TraceScope getTraceScope(); + + /** + * + * + *
+   * Required. The new trace scope.
+   * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.observability.v1.TraceScopeOrBuilder getTraceScopeOrBuilder(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/Dataset.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/Dataset.java new file mode 100644 index 000000000000..40982571fbf1 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/Dataset.java @@ -0,0 +1,1883 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * A dataset is a collection of data that has a specific configuration. A
+ * dataset can be backed by multiple tables. One bucket can have multiple
+ * datasets.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.Dataset} + */ +@com.google.protobuf.Generated +public final class Dataset extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.Dataset) + DatasetOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Dataset"); + } + + // Use Dataset.newBuilder() to construct. + private Dataset(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Dataset() { + name_ = ""; + displayName_ = ""; + description_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Dataset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Dataset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.Dataset.class, + com.google.cloud.observability.v1.Dataset.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. Name of the dataset. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. Name of the dataset. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Optional. User friendly display name.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. User friendly display name.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. Description of the dataset.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Description of the dataset.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + 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. Create timestamp.
+   * 
+ * + * .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 ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Create timestamp.
+   * 
+ * + * .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. Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int DELETE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp deleteTime_; + + /** + * + * + *
+   * Output only. Delete timestamp.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + @java.lang.Override + public boolean hasDeleteTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. Delete timestamp.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getDeleteTime() { + return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_; + } + + /** + * + * + *
+   * Output only. Delete timestamp.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { + return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_; + } + + public static final int PURGE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp purgeTime_; + + /** + * + * + *
+   * Output only. Timestamp when the dataset in soft-deleted state is purged.
+   * 
+ * + * .google.protobuf.Timestamp purge_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the purgeTime field is set. + */ + @java.lang.Override + public boolean hasPurgeTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. Timestamp when the dataset in soft-deleted state is purged.
+   * 
+ * + * .google.protobuf.Timestamp purge_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The purgeTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getPurgeTime() { + return purgeTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : purgeTime_; + } + + /** + * + * + *
+   * Output only. Timestamp when the dataset in soft-deleted state is purged.
+   * 
+ * + * .google.protobuf.Timestamp purge_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder() { + return purgeTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : purgeTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getDeleteTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(6, getPurgeTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDeleteTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getPurgeTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.Dataset)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.Dataset other = + (com.google.cloud.observability.v1.Dataset) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) 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 (hasDeleteTime() != other.hasDeleteTime()) return false; + if (hasDeleteTime()) { + if (!getDeleteTime().equals(other.getDeleteTime())) return false; + } + if (hasPurgeTime() != other.hasPurgeTime()) return false; + if (hasPurgeTime()) { + if (!getPurgeTime().equals(other.getPurgeTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().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 (hasDeleteTime()) { + hash = (37 * hash) + DELETE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getDeleteTime().hashCode(); + } + if (hasPurgeTime()) { + hash = (37 * hash) + PURGE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getPurgeTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.Dataset parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.Dataset parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.Dataset parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.Dataset 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.cloud.observability.v1.Dataset parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.Dataset parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.Dataset parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.Dataset parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.Dataset parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.Dataset parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.Dataset parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.Dataset parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.observability.v1.Dataset prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A dataset is a collection of data that has a specific configuration. A
+   * dataset can be backed by multiple tables. One bucket can have multiple
+   * datasets.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.Dataset} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.Dataset) + com.google.cloud.observability.v1.DatasetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Dataset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Dataset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.Dataset.class, + com.google.cloud.observability.v1.Dataset.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.Dataset.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetDeleteTimeFieldBuilder(); + internalGetPurgeTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + description_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + deleteTime_ = null; + if (deleteTimeBuilder_ != null) { + deleteTimeBuilder_.dispose(); + deleteTimeBuilder_ = null; + } + purgeTime_ = null; + if (purgeTimeBuilder_ != null) { + purgeTimeBuilder_.dispose(); + purgeTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Dataset_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.Dataset getDefaultInstanceForType() { + return com.google.cloud.observability.v1.Dataset.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.Dataset build() { + com.google.cloud.observability.v1.Dataset result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.Dataset buildPartial() { + com.google.cloud.observability.v1.Dataset result = + new com.google.cloud.observability.v1.Dataset(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.Dataset result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.deleteTime_ = deleteTimeBuilder_ == null ? deleteTime_ : deleteTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.purgeTime_ = purgeTimeBuilder_ == null ? purgeTime_ : purgeTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.Dataset) { + return mergeFrom((com.google.cloud.observability.v1.Dataset) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.Dataset other) { + if (other == com.google.cloud.observability.v1.Dataset.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasDeleteTime()) { + mergeDeleteTime(other.getDeleteTime()); + } + if (other.hasPurgeTime()) { + mergePurgeTime(other.getPurgeTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetDeleteTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetPurgeTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. Name of the dataset. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. Name of the dataset. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. Name of the dataset. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Name of the dataset. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Name of the dataset. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Optional. User friendly display name.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. User friendly display name.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. User friendly display name.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. User friendly display name.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. User friendly display name.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. Description of the dataset.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Description of the dataset.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Description of the dataset.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Description of the dataset.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Description of the dataset.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .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. Create timestamp.
+     * 
+ * + * + * .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; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .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(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .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. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp deleteTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + deleteTimeBuilder_; + + /** + * + * + *
+     * Output only. Delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + public boolean hasDeleteTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. Delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + public com.google.protobuf.Timestamp getDeleteTime() { + if (deleteTimeBuilder_ == null) { + return deleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deleteTime_; + } else { + return deleteTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeleteTime(com.google.protobuf.Timestamp value) { + if (deleteTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deleteTime_ = value; + } else { + deleteTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (deleteTimeBuilder_ == null) { + deleteTime_ = builderForValue.build(); + } else { + deleteTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { + if (deleteTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && deleteTime_ != null + && deleteTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getDeleteTimeBuilder().mergeFrom(value); + } else { + deleteTime_ = value; + } + } else { + deleteTimeBuilder_.mergeFrom(value); + } + if (deleteTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDeleteTime() { + bitField0_ = (bitField0_ & ~0x00000010); + deleteTime_ = null; + if (deleteTimeBuilder_ != null) { + deleteTimeBuilder_.dispose(); + deleteTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetDeleteTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { + if (deleteTimeBuilder_ != null) { + return deleteTimeBuilder_.getMessageOrBuilder(); + } else { + return deleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deleteTime_; + } + } + + /** + * + * + *
+     * Output only. Delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetDeleteTimeFieldBuilder() { + if (deleteTimeBuilder_ == null) { + deleteTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getDeleteTime(), getParentForChildren(), isClean()); + deleteTime_ = null; + } + return deleteTimeBuilder_; + } + + private com.google.protobuf.Timestamp purgeTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + purgeTimeBuilder_; + + /** + * + * + *
+     * Output only. Timestamp when the dataset in soft-deleted state is purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the purgeTime field is set. + */ + public boolean hasPurgeTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Output only. Timestamp when the dataset in soft-deleted state is purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The purgeTime. + */ + public com.google.protobuf.Timestamp getPurgeTime() { + if (purgeTimeBuilder_ == null) { + return purgeTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : purgeTime_; + } else { + return purgeTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Timestamp when the dataset in soft-deleted state is purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPurgeTime(com.google.protobuf.Timestamp value) { + if (purgeTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + purgeTime_ = value; + } else { + purgeTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp when the dataset in soft-deleted state is purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPurgeTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (purgeTimeBuilder_ == null) { + purgeTime_ = builderForValue.build(); + } else { + purgeTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp when the dataset in soft-deleted state is purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergePurgeTime(com.google.protobuf.Timestamp value) { + if (purgeTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && purgeTime_ != null + && purgeTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getPurgeTimeBuilder().mergeFrom(value); + } else { + purgeTime_ = value; + } + } else { + purgeTimeBuilder_.mergeFrom(value); + } + if (purgeTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Timestamp when the dataset in soft-deleted state is purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPurgeTime() { + bitField0_ = (bitField0_ & ~0x00000020); + purgeTime_ = null; + if (purgeTimeBuilder_ != null) { + purgeTimeBuilder_.dispose(); + purgeTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp when the dataset in soft-deleted state is purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getPurgeTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetPurgeTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Timestamp when the dataset in soft-deleted state is purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder() { + if (purgeTimeBuilder_ != null) { + return purgeTimeBuilder_.getMessageOrBuilder(); + } else { + return purgeTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : purgeTime_; + } + } + + /** + * + * + *
+     * Output only. Timestamp when the dataset in soft-deleted state is purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetPurgeTimeFieldBuilder() { + if (purgeTimeBuilder_ == null) { + purgeTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getPurgeTime(), getParentForChildren(), isClean()); + purgeTime_ = null; + } + return purgeTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.Dataset) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.Dataset) + private static final com.google.cloud.observability.v1.Dataset DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.Dataset(); + } + + public static com.google.cloud.observability.v1.Dataset getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Dataset parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.Dataset getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/DatasetName.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/DatasetName.java new file mode 100644 index 000000000000..0983565d9ef7 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/DatasetName.java @@ -0,0 +1,260 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.cloud.observability.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class DatasetName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_BUCKET_DATASET = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/buckets/{bucket}/datasets/{dataset}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String bucket; + private final String dataset; + + @Deprecated + protected DatasetName() { + project = null; + location = null; + bucket = null; + dataset = null; + } + + private DatasetName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + bucket = Preconditions.checkNotNull(builder.getBucket()); + dataset = Preconditions.checkNotNull(builder.getDataset()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBucket() { + return bucket; + } + + public String getDataset() { + return dataset; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DatasetName of(String project, String location, String bucket, String dataset) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBucket(bucket) + .setDataset(dataset) + .build(); + } + + public static String format(String project, String location, String bucket, String dataset) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBucket(bucket) + .setDataset(dataset) + .build() + .toString(); + } + + public static @Nullable DatasetName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_BUCKET_DATASET.validatedMatch( + formattedString, "DatasetName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("bucket"), + matchMap.get("dataset")); + } + + 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<@Nullable DatasetName> values) { + List list = new ArrayList<>(values.size()); + for (DatasetName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_BUCKET_DATASET.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 (dataset != null) { + fieldMapBuilder.put("dataset", dataset); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_BUCKET_DATASET.instantiate( + "project", project, "location", location, "bucket", bucket, "dataset", dataset); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + DatasetName that = ((DatasetName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.bucket, that.bucket) + && Objects.equals(this.dataset, that.dataset); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(bucket); + h *= 1000003; + h ^= Objects.hashCode(dataset); + return h; + } + + /** Builder for projects/{project}/locations/{location}/buckets/{bucket}/datasets/{dataset}. */ + public static class Builder { + private String project; + private String location; + private String bucket; + private String dataset; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBucket() { + return bucket; + } + + public String getDataset() { + return dataset; + } + + 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 setDataset(String dataset) { + this.dataset = dataset; + return this; + } + + private Builder(DatasetName datasetName) { + this.project = datasetName.project; + this.location = datasetName.location; + this.bucket = datasetName.bucket; + this.dataset = datasetName.dataset; + } + + public DatasetName build() { + return new DatasetName(this); + } + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/DatasetOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/DatasetOrBuilder.java new file mode 100644 index 000000000000..4091dd44e846 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/DatasetOrBuilder.java @@ -0,0 +1,230 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface DatasetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.Dataset) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. Name of the dataset. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. Name of the dataset. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. User friendly display name.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Optional. User friendly display name.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. Description of the dataset.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. Description of the dataset.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Delete timestamp.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + boolean hasDeleteTime(); + + /** + * + * + *
+   * Output only. Delete timestamp.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + com.google.protobuf.Timestamp getDeleteTime(); + + /** + * + * + *
+   * Output only. Delete timestamp.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when the dataset in soft-deleted state is purged.
+   * 
+ * + * .google.protobuf.Timestamp purge_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the purgeTime field is set. + */ + boolean hasPurgeTime(); + + /** + * + * + *
+   * Output only. Timestamp when the dataset in soft-deleted state is purged.
+   * 
+ * + * .google.protobuf.Timestamp purge_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The purgeTime. + */ + com.google.protobuf.Timestamp getPurgeTime(); + + /** + * + * + *
+   * Output only. Timestamp when the dataset in soft-deleted state is purged.
+   * 
+ * + * .google.protobuf.Timestamp purge_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/DeleteLinkRequest.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/DeleteLinkRequest.java new file mode 100644 index 000000000000..f545b0d4aadc --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/DeleteLinkRequest.java @@ -0,0 +1,624 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Request for deleting a link.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.DeleteLinkRequest} + */ +@com.google.protobuf.Generated +public final class DeleteLinkRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.DeleteLinkRequest) + DeleteLinkRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DeleteLinkRequest"); + } + + // Use DeleteLinkRequest.newBuilder() to construct. + private DeleteLinkRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteLinkRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_DeleteLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_DeleteLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.DeleteLinkRequest.class, + com.google.cloud.observability.v1.DeleteLinkRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the link to delete. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_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. Name of the link to delete. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.DeleteLinkRequest)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.DeleteLinkRequest other = + (com.google.cloud.observability.v1.DeleteLinkRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.DeleteLinkRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.DeleteLinkRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.DeleteLinkRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.DeleteLinkRequest 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.cloud.observability.v1.DeleteLinkRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.DeleteLinkRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.DeleteLinkRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.DeleteLinkRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.DeleteLinkRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.DeleteLinkRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.DeleteLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.DeleteLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.observability.v1.DeleteLinkRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for deleting a link.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.DeleteLinkRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.DeleteLinkRequest) + com.google.cloud.observability.v1.DeleteLinkRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_DeleteLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_DeleteLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.DeleteLinkRequest.class, + com.google.cloud.observability.v1.DeleteLinkRequest.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.DeleteLinkRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_DeleteLinkRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.DeleteLinkRequest getDefaultInstanceForType() { + return com.google.cloud.observability.v1.DeleteLinkRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.DeleteLinkRequest build() { + com.google.cloud.observability.v1.DeleteLinkRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.DeleteLinkRequest buildPartial() { + com.google.cloud.observability.v1.DeleteLinkRequest result = + new com.google.cloud.observability.v1.DeleteLinkRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.DeleteLinkRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.DeleteLinkRequest) { + return mergeFrom((com.google.cloud.observability.v1.DeleteLinkRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.DeleteLinkRequest other) { + if (other == com.google.cloud.observability.v1.DeleteLinkRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the link to delete. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_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. Name of the link to delete. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_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. Name of the link to delete. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the link to delete. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID]
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the link to delete. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.DeleteLinkRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.DeleteLinkRequest) + private static final com.google.cloud.observability.v1.DeleteLinkRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.DeleteLinkRequest(); + } + + public static com.google.cloud.observability.v1.DeleteLinkRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteLinkRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.DeleteLinkRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/DeleteLinkRequestOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/DeleteLinkRequestOrBuilder.java new file mode 100644 index 000000000000..45f58af944e6 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/DeleteLinkRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface DeleteLinkRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.DeleteLinkRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the link to delete. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID]
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the link to delete. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_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/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/DeleteTraceScopeRequest.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/DeleteTraceScopeRequest.java new file mode 100644 index 000000000000..a6708e03a645 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/DeleteTraceScopeRequest.java @@ -0,0 +1,653 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Request for deleting a TraceScope.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.DeleteTraceScopeRequest} + */ +@com.google.protobuf.Generated +public final class DeleteTraceScopeRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.DeleteTraceScopeRequest) + DeleteTraceScopeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DeleteTraceScopeRequest"); + } + + // Use DeleteTraceScopeRequest.newBuilder() to construct. + private DeleteTraceScopeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteTraceScopeRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_DeleteTraceScopeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_DeleteTraceScopeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.DeleteTraceScopeRequest.class, + com.google.cloud.observability.v1.DeleteTraceScopeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The full resource name of the trace scope to delete:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID]
+   *
+   * For example:
+   *
+   * projects/my-project/locations/global/traceScopes/my-trace-scope
+   * 
+ * + * + * 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 trace scope to delete:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID]
+   *
+   * For example:
+   *
+   * projects/my-project/locations/global/traceScopes/my-trace-scope
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.DeleteTraceScopeRequest)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.DeleteTraceScopeRequest other = + (com.google.cloud.observability.v1.DeleteTraceScopeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.DeleteTraceScopeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.DeleteTraceScopeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.DeleteTraceScopeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.DeleteTraceScopeRequest 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.cloud.observability.v1.DeleteTraceScopeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.DeleteTraceScopeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.DeleteTraceScopeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.DeleteTraceScopeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.DeleteTraceScopeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.DeleteTraceScopeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.DeleteTraceScopeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.DeleteTraceScopeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.observability.v1.DeleteTraceScopeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for deleting a TraceScope.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.DeleteTraceScopeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.DeleteTraceScopeRequest) + com.google.cloud.observability.v1.DeleteTraceScopeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_DeleteTraceScopeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_DeleteTraceScopeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.DeleteTraceScopeRequest.class, + com.google.cloud.observability.v1.DeleteTraceScopeRequest.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.DeleteTraceScopeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_DeleteTraceScopeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.DeleteTraceScopeRequest getDefaultInstanceForType() { + return com.google.cloud.observability.v1.DeleteTraceScopeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.DeleteTraceScopeRequest build() { + com.google.cloud.observability.v1.DeleteTraceScopeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.DeleteTraceScopeRequest buildPartial() { + com.google.cloud.observability.v1.DeleteTraceScopeRequest result = + new com.google.cloud.observability.v1.DeleteTraceScopeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.DeleteTraceScopeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.DeleteTraceScopeRequest) { + return mergeFrom((com.google.cloud.observability.v1.DeleteTraceScopeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.DeleteTraceScopeRequest other) { + if (other == com.google.cloud.observability.v1.DeleteTraceScopeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The full resource name of the trace scope to delete:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID]
+     *
+     * For example:
+     *
+     * projects/my-project/locations/global/traceScopes/my-trace-scope
+     * 
+ * + * + * 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 trace scope to delete:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID]
+     *
+     * For example:
+     *
+     * projects/my-project/locations/global/traceScopes/my-trace-scope
+     * 
+ * + * + * 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 trace scope to delete:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID]
+     *
+     * For example:
+     *
+     * projects/my-project/locations/global/traceScopes/my-trace-scope
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The full resource name of the trace scope to delete:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID]
+     *
+     * For example:
+     *
+     * projects/my-project/locations/global/traceScopes/my-trace-scope
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The full resource name of the trace scope to delete:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID]
+     *
+     * For example:
+     *
+     * projects/my-project/locations/global/traceScopes/my-trace-scope
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.DeleteTraceScopeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.DeleteTraceScopeRequest) + private static final com.google.cloud.observability.v1.DeleteTraceScopeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.DeleteTraceScopeRequest(); + } + + public static com.google.cloud.observability.v1.DeleteTraceScopeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteTraceScopeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.DeleteTraceScopeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/DeleteTraceScopeRequestOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/DeleteTraceScopeRequestOrBuilder.java new file mode 100644 index 000000000000..f28870a594f9 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/DeleteTraceScopeRequestOrBuilder.java @@ -0,0 +1,70 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface DeleteTraceScopeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.DeleteTraceScopeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The full resource name of the trace scope to delete:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID]
+   *
+   * For example:
+   *
+   * projects/my-project/locations/global/traceScopes/my-trace-scope
+   * 
+ * + * + * 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 trace scope to delete:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID]
+   *
+   * For example:
+   *
+   * projects/my-project/locations/global/traceScopes/my-trace-scope
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetBucketRequest.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetBucketRequest.java new file mode 100644 index 000000000000..96322927d79d --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetBucketRequest.java @@ -0,0 +1,624 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Request for getting a bucket.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.GetBucketRequest} + */ +@com.google.protobuf.Generated +public final class GetBucketRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.GetBucketRequest) + GetBucketRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetBucketRequest"); + } + + // Use GetBucketRequest.newBuilder() to construct. + private GetBucketRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetBucketRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetBucketRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetBucketRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.GetBucketRequest.class, + com.google.cloud.observability.v1.GetBucketRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the bucket to retrieve. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[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. Name of the bucket to retrieve. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.GetBucketRequest)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.GetBucketRequest other = + (com.google.cloud.observability.v1.GetBucketRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.GetBucketRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.GetBucketRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetBucketRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.GetBucketRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetBucketRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.GetBucketRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetBucketRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.GetBucketRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetBucketRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.GetBucketRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetBucketRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.GetBucketRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.observability.v1.GetBucketRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for getting a bucket.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.GetBucketRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.GetBucketRequest) + com.google.cloud.observability.v1.GetBucketRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetBucketRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetBucketRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.GetBucketRequest.class, + com.google.cloud.observability.v1.GetBucketRequest.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.GetBucketRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetBucketRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetBucketRequest getDefaultInstanceForType() { + return com.google.cloud.observability.v1.GetBucketRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetBucketRequest build() { + com.google.cloud.observability.v1.GetBucketRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetBucketRequest buildPartial() { + com.google.cloud.observability.v1.GetBucketRequest result = + new com.google.cloud.observability.v1.GetBucketRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.GetBucketRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.GetBucketRequest) { + return mergeFrom((com.google.cloud.observability.v1.GetBucketRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.GetBucketRequest other) { + if (other == com.google.cloud.observability.v1.GetBucketRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the bucket to retrieve. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[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. Name of the bucket to retrieve. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[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. Name of the bucket to retrieve. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the bucket to retrieve. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[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(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the bucket to retrieve. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.GetBucketRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.GetBucketRequest) + private static final com.google.cloud.observability.v1.GetBucketRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.GetBucketRequest(); + } + + public static com.google.cloud.observability.v1.GetBucketRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetBucketRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetBucketRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetBucketRequestOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetBucketRequestOrBuilder.java new file mode 100644 index 000000000000..5f4525885058 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetBucketRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface GetBucketRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.GetBucketRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the bucket to retrieve. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the bucket to retrieve. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[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/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetDatasetRequest.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetDatasetRequest.java new file mode 100644 index 000000000000..6a0cb5c74378 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetDatasetRequest.java @@ -0,0 +1,624 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Request for getting a dataset.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.GetDatasetRequest} + */ +@com.google.protobuf.Generated +public final class GetDatasetRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.GetDatasetRequest) + GetDatasetRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetDatasetRequest"); + } + + // Use GetDatasetRequest.newBuilder() to construct. + private GetDatasetRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetDatasetRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.GetDatasetRequest.class, + com.google.cloud.observability.v1.GetDatasetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the dataset to retrieve. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_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. Name of the dataset to retrieve. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.GetDatasetRequest)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.GetDatasetRequest other = + (com.google.cloud.observability.v1.GetDatasetRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.GetDatasetRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.GetDatasetRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetDatasetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.GetDatasetRequest 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.cloud.observability.v1.GetDatasetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.GetDatasetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetDatasetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.GetDatasetRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetDatasetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.GetDatasetRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.GetDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.observability.v1.GetDatasetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for getting a dataset.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.GetDatasetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.GetDatasetRequest) + com.google.cloud.observability.v1.GetDatasetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.GetDatasetRequest.class, + com.google.cloud.observability.v1.GetDatasetRequest.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.GetDatasetRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetDatasetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetDatasetRequest getDefaultInstanceForType() { + return com.google.cloud.observability.v1.GetDatasetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetDatasetRequest build() { + com.google.cloud.observability.v1.GetDatasetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetDatasetRequest buildPartial() { + com.google.cloud.observability.v1.GetDatasetRequest result = + new com.google.cloud.observability.v1.GetDatasetRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.GetDatasetRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.GetDatasetRequest) { + return mergeFrom((com.google.cloud.observability.v1.GetDatasetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.GetDatasetRequest other) { + if (other == com.google.cloud.observability.v1.GetDatasetRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the dataset to retrieve. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_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. Name of the dataset to retrieve. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_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. Name of the dataset to retrieve. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the dataset to retrieve. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the dataset to retrieve. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.GetDatasetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.GetDatasetRequest) + private static final com.google.cloud.observability.v1.GetDatasetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.GetDatasetRequest(); + } + + public static com.google.cloud.observability.v1.GetDatasetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDatasetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetDatasetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetDatasetRequestOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetDatasetRequestOrBuilder.java new file mode 100644 index 000000000000..1fe47ba1b44b --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetDatasetRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface GetDatasetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.GetDatasetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the dataset to retrieve. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the dataset to retrieve. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_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/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetLinkRequest.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetLinkRequest.java new file mode 100644 index 000000000000..3bd2f74309a0 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetLinkRequest.java @@ -0,0 +1,624 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Request for getting a link.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.GetLinkRequest} + */ +@com.google.protobuf.Generated +public final class GetLinkRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.GetLinkRequest) + GetLinkRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetLinkRequest"); + } + + // Use GetLinkRequest.newBuilder() to construct. + private GetLinkRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetLinkRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.GetLinkRequest.class, + com.google.cloud.observability.v1.GetLinkRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the link to retrieve. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_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. Name of the link to retrieve. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.GetLinkRequest)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.GetLinkRequest other = + (com.google.cloud.observability.v1.GetLinkRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.GetLinkRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.GetLinkRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetLinkRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.GetLinkRequest 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.cloud.observability.v1.GetLinkRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.GetLinkRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetLinkRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.GetLinkRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetLinkRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.GetLinkRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.GetLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.observability.v1.GetLinkRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for getting a link.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.GetLinkRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.GetLinkRequest) + com.google.cloud.observability.v1.GetLinkRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.GetLinkRequest.class, + com.google.cloud.observability.v1.GetLinkRequest.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.GetLinkRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetLinkRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetLinkRequest getDefaultInstanceForType() { + return com.google.cloud.observability.v1.GetLinkRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetLinkRequest build() { + com.google.cloud.observability.v1.GetLinkRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetLinkRequest buildPartial() { + com.google.cloud.observability.v1.GetLinkRequest result = + new com.google.cloud.observability.v1.GetLinkRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.GetLinkRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.GetLinkRequest) { + return mergeFrom((com.google.cloud.observability.v1.GetLinkRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.GetLinkRequest other) { + if (other == com.google.cloud.observability.v1.GetLinkRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the link to retrieve. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_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. Name of the link to retrieve. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_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. Name of the link to retrieve. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the link to retrieve. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID]
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the link to retrieve. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.GetLinkRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.GetLinkRequest) + private static final com.google.cloud.observability.v1.GetLinkRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.GetLinkRequest(); + } + + public static com.google.cloud.observability.v1.GetLinkRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetLinkRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetLinkRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetLinkRequestOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetLinkRequestOrBuilder.java new file mode 100644 index 000000000000..8696704e0f62 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetLinkRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface GetLinkRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.GetLinkRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the link to retrieve. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID]
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the link to retrieve. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_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/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetScopeRequest.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetScopeRequest.java new file mode 100644 index 000000000000..d20db42d31f9 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetScopeRequest.java @@ -0,0 +1,645 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Message for getting a Scope.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.GetScopeRequest} + */ +@com.google.protobuf.Generated +public final class GetScopeRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.GetScopeRequest) + GetScopeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetScopeRequest"); + } + + // Use GetScopeRequest.newBuilder() to construct. + private GetScopeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetScopeRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetScopeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetScopeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.GetScopeRequest.class, + com.google.cloud.observability.v1.GetScopeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource. The format is:
+   *
+   * projects/{project}/locations/{location}/scopes/{scope}
+   *
+   * The `{location}` field must be set to `global`. The `{scope}` field must
+   * be set to `_Default`.
+   * 
+ * + * + * 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. Name of the resource. The format is:
+   *
+   * projects/{project}/locations/{location}/scopes/{scope}
+   *
+   * The `{location}` field must be set to `global`. The `{scope}` field must
+   * be set to `_Default`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.GetScopeRequest)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.GetScopeRequest other = + (com.google.cloud.observability.v1.GetScopeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.GetScopeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.GetScopeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetScopeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.GetScopeRequest 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.cloud.observability.v1.GetScopeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.GetScopeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetScopeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.GetScopeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetScopeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.GetScopeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetScopeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.GetScopeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.observability.v1.GetScopeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for getting a Scope.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.GetScopeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.GetScopeRequest) + com.google.cloud.observability.v1.GetScopeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetScopeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetScopeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.GetScopeRequest.class, + com.google.cloud.observability.v1.GetScopeRequest.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.GetScopeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetScopeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetScopeRequest getDefaultInstanceForType() { + return com.google.cloud.observability.v1.GetScopeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetScopeRequest build() { + com.google.cloud.observability.v1.GetScopeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetScopeRequest buildPartial() { + com.google.cloud.observability.v1.GetScopeRequest result = + new com.google.cloud.observability.v1.GetScopeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.GetScopeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.GetScopeRequest) { + return mergeFrom((com.google.cloud.observability.v1.GetScopeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.GetScopeRequest other) { + if (other == com.google.cloud.observability.v1.GetScopeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the resource. The format is:
+     *
+     * projects/{project}/locations/{location}/scopes/{scope}
+     *
+     * The `{location}` field must be set to `global`. The `{scope}` field must
+     * be set to `_Default`.
+     * 
+ * + * + * 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. Name of the resource. The format is:
+     *
+     * projects/{project}/locations/{location}/scopes/{scope}
+     *
+     * The `{location}` field must be set to `global`. The `{scope}` field must
+     * be set to `_Default`.
+     * 
+ * + * + * 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. Name of the resource. The format is:
+     *
+     * projects/{project}/locations/{location}/scopes/{scope}
+     *
+     * The `{location}` field must be set to `global`. The `{scope}` field must
+     * be set to `_Default`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource. The format is:
+     *
+     * projects/{project}/locations/{location}/scopes/{scope}
+     *
+     * The `{location}` field must be set to `global`. The `{scope}` field must
+     * be set to `_Default`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource. The format is:
+     *
+     * projects/{project}/locations/{location}/scopes/{scope}
+     *
+     * The `{location}` field must be set to `global`. The `{scope}` field must
+     * be set to `_Default`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.GetScopeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.GetScopeRequest) + private static final com.google.cloud.observability.v1.GetScopeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.GetScopeRequest(); + } + + public static com.google.cloud.observability.v1.GetScopeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetScopeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetScopeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetScopeRequestOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetScopeRequestOrBuilder.java new file mode 100644 index 000000000000..7e19bf173b25 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetScopeRequestOrBuilder.java @@ -0,0 +1,68 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface GetScopeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.GetScopeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource. The format is:
+   *
+   * projects/{project}/locations/{location}/scopes/{scope}
+   *
+   * The `{location}` field must be set to `global`. The `{scope}` field must
+   * be set to `_Default`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource. The format is:
+   *
+   * projects/{project}/locations/{location}/scopes/{scope}
+   *
+   * The `{location}` field must be set to `global`. The `{scope}` field must
+   * be set to `_Default`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetSettingsRequest.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetSettingsRequest.java new file mode 100644 index 000000000000..c4fe510d0635 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetSettingsRequest.java @@ -0,0 +1,652 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Request for getting Settings.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.GetSettingsRequest} + */ +@com.google.protobuf.Generated +public final class GetSettingsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.GetSettingsRequest) + GetSettingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetSettingsRequest"); + } + + // Use GetSettingsRequest.newBuilder() to construct. + private GetSettingsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetSettingsRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.GetSettingsRequest.class, + com.google.cloud.observability.v1.GetSettingsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the settings to retrieve.
+   *
+   * Name format:
+   *
+   * "projects/[PROJECT_ID]/locations/[LOCATION]/settings"
+   * "folders/[FOLDER_ID]/locations/[LOCATION]/settings"
+   * "organizations/[ORGANIZATION_ID]/locations/[LOCATION]/settings"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name of the settings to retrieve.
+   *
+   * Name format:
+   *
+   * "projects/[PROJECT_ID]/locations/[LOCATION]/settings"
+   * "folders/[FOLDER_ID]/locations/[LOCATION]/settings"
+   * "organizations/[ORGANIZATION_ID]/locations/[LOCATION]/settings"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.GetSettingsRequest)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.GetSettingsRequest other = + (com.google.cloud.observability.v1.GetSettingsRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.GetSettingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.GetSettingsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetSettingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.GetSettingsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetSettingsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.GetSettingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetSettingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.GetSettingsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetSettingsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.GetSettingsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetSettingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.GetSettingsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.observability.v1.GetSettingsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for getting Settings.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.GetSettingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.GetSettingsRequest) + com.google.cloud.observability.v1.GetSettingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.GetSettingsRequest.class, + com.google.cloud.observability.v1.GetSettingsRequest.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.GetSettingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetSettingsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetSettingsRequest getDefaultInstanceForType() { + return com.google.cloud.observability.v1.GetSettingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetSettingsRequest build() { + com.google.cloud.observability.v1.GetSettingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetSettingsRequest buildPartial() { + com.google.cloud.observability.v1.GetSettingsRequest result = + new com.google.cloud.observability.v1.GetSettingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.GetSettingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.GetSettingsRequest) { + return mergeFrom((com.google.cloud.observability.v1.GetSettingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.GetSettingsRequest other) { + if (other == com.google.cloud.observability.v1.GetSettingsRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the settings to retrieve.
+     *
+     * Name format:
+     *
+     * "projects/[PROJECT_ID]/locations/[LOCATION]/settings"
+     * "folders/[FOLDER_ID]/locations/[LOCATION]/settings"
+     * "organizations/[ORGANIZATION_ID]/locations/[LOCATION]/settings"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name of the settings to retrieve.
+     *
+     * Name format:
+     *
+     * "projects/[PROJECT_ID]/locations/[LOCATION]/settings"
+     * "folders/[FOLDER_ID]/locations/[LOCATION]/settings"
+     * "organizations/[ORGANIZATION_ID]/locations/[LOCATION]/settings"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name of the settings to retrieve.
+     *
+     * Name format:
+     *
+     * "projects/[PROJECT_ID]/locations/[LOCATION]/settings"
+     * "folders/[FOLDER_ID]/locations/[LOCATION]/settings"
+     * "organizations/[ORGANIZATION_ID]/locations/[LOCATION]/settings"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the settings to retrieve.
+     *
+     * Name format:
+     *
+     * "projects/[PROJECT_ID]/locations/[LOCATION]/settings"
+     * "folders/[FOLDER_ID]/locations/[LOCATION]/settings"
+     * "organizations/[ORGANIZATION_ID]/locations/[LOCATION]/settings"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the settings to retrieve.
+     *
+     * Name format:
+     *
+     * "projects/[PROJECT_ID]/locations/[LOCATION]/settings"
+     * "folders/[FOLDER_ID]/locations/[LOCATION]/settings"
+     * "organizations/[ORGANIZATION_ID]/locations/[LOCATION]/settings"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.GetSettingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.GetSettingsRequest) + private static final com.google.cloud.observability.v1.GetSettingsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.GetSettingsRequest(); + } + + public static com.google.cloud.observability.v1.GetSettingsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSettingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetSettingsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetSettingsRequestOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetSettingsRequestOrBuilder.java new file mode 100644 index 000000000000..d6b4456d5aa8 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetSettingsRequestOrBuilder.java @@ -0,0 +1,70 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface GetSettingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.GetSettingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the settings to retrieve.
+   *
+   * Name format:
+   *
+   * "projects/[PROJECT_ID]/locations/[LOCATION]/settings"
+   * "folders/[FOLDER_ID]/locations/[LOCATION]/settings"
+   * "organizations/[ORGANIZATION_ID]/locations/[LOCATION]/settings"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the settings to retrieve.
+   *
+   * Name format:
+   *
+   * "projects/[PROJECT_ID]/locations/[LOCATION]/settings"
+   * "folders/[FOLDER_ID]/locations/[LOCATION]/settings"
+   * "organizations/[ORGANIZATION_ID]/locations/[LOCATION]/settings"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetTraceScopeRequest.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetTraceScopeRequest.java new file mode 100644 index 000000000000..0b0e9a95f442 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetTraceScopeRequest.java @@ -0,0 +1,653 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Request for getting a TraceScope.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.GetTraceScopeRequest} + */ +@com.google.protobuf.Generated +public final class GetTraceScopeRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.GetTraceScopeRequest) + GetTraceScopeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetTraceScopeRequest"); + } + + // Use GetTraceScopeRequest.newBuilder() to construct. + private GetTraceScopeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetTraceScopeRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetTraceScopeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetTraceScopeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.GetTraceScopeRequest.class, + com.google.cloud.observability.v1.GetTraceScopeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the trace scope:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID]
+   *
+   * For example:
+   *
+   * projects/my-project/locations/global/traceScopes/my-trace-scope
+   * 
+ * + * + * 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 trace scope:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID]
+   *
+   * For example:
+   *
+   * projects/my-project/locations/global/traceScopes/my-trace-scope
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.GetTraceScopeRequest)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.GetTraceScopeRequest other = + (com.google.cloud.observability.v1.GetTraceScopeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.GetTraceScopeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.GetTraceScopeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetTraceScopeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.GetTraceScopeRequest 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.cloud.observability.v1.GetTraceScopeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.GetTraceScopeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetTraceScopeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.GetTraceScopeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetTraceScopeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.GetTraceScopeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetTraceScopeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.GetTraceScopeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.observability.v1.GetTraceScopeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for getting a TraceScope.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.GetTraceScopeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.GetTraceScopeRequest) + com.google.cloud.observability.v1.GetTraceScopeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetTraceScopeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetTraceScopeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.GetTraceScopeRequest.class, + com.google.cloud.observability.v1.GetTraceScopeRequest.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.GetTraceScopeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetTraceScopeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetTraceScopeRequest getDefaultInstanceForType() { + return com.google.cloud.observability.v1.GetTraceScopeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetTraceScopeRequest build() { + com.google.cloud.observability.v1.GetTraceScopeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetTraceScopeRequest buildPartial() { + com.google.cloud.observability.v1.GetTraceScopeRequest result = + new com.google.cloud.observability.v1.GetTraceScopeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.GetTraceScopeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.GetTraceScopeRequest) { + return mergeFrom((com.google.cloud.observability.v1.GetTraceScopeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.GetTraceScopeRequest other) { + if (other == com.google.cloud.observability.v1.GetTraceScopeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The resource name of the trace scope:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID]
+     *
+     * For example:
+     *
+     * projects/my-project/locations/global/traceScopes/my-trace-scope
+     * 
+ * + * + * 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 trace scope:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID]
+     *
+     * For example:
+     *
+     * projects/my-project/locations/global/traceScopes/my-trace-scope
+     * 
+ * + * + * 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 trace scope:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID]
+     *
+     * For example:
+     *
+     * projects/my-project/locations/global/traceScopes/my-trace-scope
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the trace scope:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID]
+     *
+     * For example:
+     *
+     * projects/my-project/locations/global/traceScopes/my-trace-scope
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the trace scope:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID]
+     *
+     * For example:
+     *
+     * projects/my-project/locations/global/traceScopes/my-trace-scope
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.GetTraceScopeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.GetTraceScopeRequest) + private static final com.google.cloud.observability.v1.GetTraceScopeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.GetTraceScopeRequest(); + } + + public static com.google.cloud.observability.v1.GetTraceScopeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetTraceScopeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetTraceScopeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetTraceScopeRequestOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetTraceScopeRequestOrBuilder.java new file mode 100644 index 000000000000..ccd03ced9ba4 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetTraceScopeRequestOrBuilder.java @@ -0,0 +1,70 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface GetTraceScopeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.GetTraceScopeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the trace scope:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID]
+   *
+   * For example:
+   *
+   * projects/my-project/locations/global/traceScopes/my-trace-scope
+   * 
+ * + * + * 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 trace scope:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID]
+   *
+   * For example:
+   *
+   * projects/my-project/locations/global/traceScopes/my-trace-scope
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetViewRequest.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetViewRequest.java new file mode 100644 index 000000000000..50c299e64493 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetViewRequest.java @@ -0,0 +1,624 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Request for getting a view.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.GetViewRequest} + */ +@com.google.protobuf.Generated +public final class GetViewRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.GetViewRequest) + GetViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetViewRequest"); + } + + // Use GetViewRequest.newBuilder() to construct. + private GetViewRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetViewRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.GetViewRequest.class, + com.google.cloud.observability.v1.GetViewRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the view to retrieve. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[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. Name of the view to retrieve. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.GetViewRequest)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.GetViewRequest other = + (com.google.cloud.observability.v1.GetViewRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.GetViewRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.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.cloud.observability.v1.GetViewRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.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.cloud.observability.v1.GetViewRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.GetViewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetViewRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.GetViewRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetViewRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.GetViewRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.GetViewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.GetViewRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.observability.v1.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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for getting a view.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.GetViewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.GetViewRequest) + com.google.cloud.observability.v1.GetViewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.GetViewRequest.class, + com.google.cloud.observability.v1.GetViewRequest.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.GetViewRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_GetViewRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetViewRequest getDefaultInstanceForType() { + return com.google.cloud.observability.v1.GetViewRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetViewRequest build() { + com.google.cloud.observability.v1.GetViewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetViewRequest buildPartial() { + com.google.cloud.observability.v1.GetViewRequest result = + new com.google.cloud.observability.v1.GetViewRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.GetViewRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.GetViewRequest) { + return mergeFrom((com.google.cloud.observability.v1.GetViewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.GetViewRequest other) { + if (other == com.google.cloud.observability.v1.GetViewRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the view to retrieve. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[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. Name of the view to retrieve. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[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. Name of the view to retrieve. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the view to retrieve. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[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(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the view to retrieve. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.GetViewRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.GetViewRequest) + private static final com.google.cloud.observability.v1.GetViewRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.GetViewRequest(); + } + + public static com.google.cloud.observability.v1.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 { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.GetViewRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetViewRequestOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetViewRequestOrBuilder.java new file mode 100644 index 000000000000..60bfb2504626 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/GetViewRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface GetViewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.GetViewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the view to retrieve. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[VIEW_ID]
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the view to retrieve. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[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/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/Link.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/Link.java new file mode 100644 index 000000000000..5a6bab34c0d3 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/Link.java @@ -0,0 +1,1295 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * A link lets a dataset be accessible to BigQuery via usage of linked datasets.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.Link} + */ +@com.google.protobuf.Generated +public final class Link extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.Link) + LinkOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Link"); + } + + // Use Link.newBuilder() to construct. + private Link(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Link() { + name_ = ""; + displayName_ = ""; + description_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Link_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Link_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.Link.class, + com.google.cloud.observability.v1.Link.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. Name of the link. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID]
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. Name of the link. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID]
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Optional. A user friendly display name.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A user friendly display name.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. Description of the link.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Description of the link.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + 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. Create timestamp.
+   * 
+ * + * .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 ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Create timestamp.
+   * 
+ * + * .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. Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getCreateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.Link)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.Link other = (com.google.cloud.observability.v1.Link) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) 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 (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().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(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.Link parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.Link parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.Link parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.Link parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.Link parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.Link parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.Link parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.Link parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.Link parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.Link parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.Link parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.Link parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.observability.v1.Link prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A link lets a dataset be accessible to BigQuery via usage of linked datasets.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.Link} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.Link) + com.google.cloud.observability.v1.LinkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Link_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Link_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.Link.class, + com.google.cloud.observability.v1.Link.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.Link.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + description_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Link_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.Link getDefaultInstanceForType() { + return com.google.cloud.observability.v1.Link.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.Link build() { + com.google.cloud.observability.v1.Link result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.Link buildPartial() { + com.google.cloud.observability.v1.Link result = + new com.google.cloud.observability.v1.Link(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.Link result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.Link) { + return mergeFrom((com.google.cloud.observability.v1.Link) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.Link other) { + if (other == com.google.cloud.observability.v1.Link.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. Name of the link. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID]
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. Name of the link. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID]
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. Name of the link. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID]
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Name of the link. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID]
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Name of the link. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID]
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Optional. A user friendly display name.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A user friendly display name.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A user friendly display name.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A user friendly display name.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A user friendly display name.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. Description of the link.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Description of the link.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Description of the link.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Description of the link.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Description of the link.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .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. Create timestamp.
+     * 
+ * + * + * .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; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .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(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .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. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.Link) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.Link) + private static final com.google.cloud.observability.v1.Link DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.Link(); + } + + public static com.google.cloud.observability.v1.Link getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Link parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.Link getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/LinkName.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/LinkName.java new file mode 100644 index 000000000000..0d61f3024841 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/LinkName.java @@ -0,0 +1,301 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.cloud.observability.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class LinkName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_BUCKET_DATASET_LINK = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/buckets/{bucket}/datasets/{dataset}/links/{link}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String bucket; + private final String dataset; + private final String link; + + @Deprecated + protected LinkName() { + project = null; + location = null; + bucket = null; + dataset = null; + link = null; + } + + private LinkName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + bucket = Preconditions.checkNotNull(builder.getBucket()); + dataset = Preconditions.checkNotNull(builder.getDataset()); + link = Preconditions.checkNotNull(builder.getLink()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBucket() { + return bucket; + } + + public String getDataset() { + return dataset; + } + + public String getLink() { + return link; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LinkName of( + String project, String location, String bucket, String dataset, String link) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBucket(bucket) + .setDataset(dataset) + .setLink(link) + .build(); + } + + public static String format( + String project, String location, String bucket, String dataset, String link) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBucket(bucket) + .setDataset(dataset) + .setLink(link) + .build() + .toString(); + } + + public static @Nullable LinkName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_BUCKET_DATASET_LINK.validatedMatch( + formattedString, "LinkName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("bucket"), + matchMap.get("dataset"), + matchMap.get("link")); + } + + 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<@Nullable LinkName> values) { + List list = new ArrayList<>(values.size()); + for (LinkName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_BUCKET_DATASET_LINK.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 (dataset != null) { + fieldMapBuilder.put("dataset", dataset); + } + if (link != null) { + fieldMapBuilder.put("link", link); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_BUCKET_DATASET_LINK.instantiate( + "project", + project, + "location", + location, + "bucket", + bucket, + "dataset", + dataset, + "link", + link); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + LinkName that = ((LinkName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.bucket, that.bucket) + && Objects.equals(this.dataset, that.dataset) + && Objects.equals(this.link, that.link); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(bucket); + h *= 1000003; + h ^= Objects.hashCode(dataset); + h *= 1000003; + h ^= Objects.hashCode(link); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/buckets/{bucket}/datasets/{dataset}/links/{link}. + */ + public static class Builder { + private String project; + private String location; + private String bucket; + private String dataset; + private String link; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBucket() { + return bucket; + } + + public String getDataset() { + return dataset; + } + + public String getLink() { + return link; + } + + 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 setDataset(String dataset) { + this.dataset = dataset; + return this; + } + + public Builder setLink(String link) { + this.link = link; + return this; + } + + private Builder(LinkName linkName) { + this.project = linkName.project; + this.location = linkName.location; + this.bucket = linkName.bucket; + this.dataset = linkName.dataset; + this.link = linkName.link; + } + + public LinkName build() { + return new LinkName(this); + } + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/LinkOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/LinkOrBuilder.java new file mode 100644 index 000000000000..e106b65e9e9f --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/LinkOrBuilder.java @@ -0,0 +1,150 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface LinkOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.Link) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. Name of the link. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID]
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. Name of the link. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID]
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. A user friendly display name.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Optional. A user friendly display name.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. Description of the link.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. Description of the link.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListBucketsRequest.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListBucketsRequest.java new file mode 100644 index 000000000000..96f6de03407c --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListBucketsRequest.java @@ -0,0 +1,1022 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Request for listing buckets.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.ListBucketsRequest} + */ +@com.google.protobuf.Generated +public final class ListBucketsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.ListBucketsRequest) + ListBucketsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListBucketsRequest"); + } + + // Use ListBucketsRequest.newBuilder() to construct. + private ListBucketsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListBucketsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListBucketsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListBucketsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.ListBucketsRequest.class, + com.google.cloud.observability.v1.ListBucketsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent, which owns this collection of buckets. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent, which owns this collection of buckets. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of buckets to return. If unspecified, then at
+   * most 100 buckets are returned. The maximum value is 1000; values above 1000
+   * are coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListBuckets` call.
+   * Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListBuckets` call.
+   * Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHOW_DELETED_FIELD_NUMBER = 4; + private boolean showDeleted_ = false; + + /** + * + * + *
+   * Optional. If true, then the response will include deleted buckets.
+   * 
+ * + * bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The showDeleted. + */ + @java.lang.Override + public boolean getShowDeleted() { + return showDeleted_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (showDeleted_ != false) { + output.writeBool(4, showDeleted_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (showDeleted_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, showDeleted_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.ListBucketsRequest)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.ListBucketsRequest other = + (com.google.cloud.observability.v1.ListBucketsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (getShowDeleted() != other.getShowDeleted()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + SHOW_DELETED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getShowDeleted()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.ListBucketsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListBucketsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListBucketsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListBucketsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListBucketsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListBucketsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListBucketsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListBucketsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListBucketsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListBucketsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListBucketsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListBucketsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.observability.v1.ListBucketsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for listing buckets.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.ListBucketsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.ListBucketsRequest) + com.google.cloud.observability.v1.ListBucketsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListBucketsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListBucketsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.ListBucketsRequest.class, + com.google.cloud.observability.v1.ListBucketsRequest.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.ListBucketsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + showDeleted_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListBucketsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListBucketsRequest getDefaultInstanceForType() { + return com.google.cloud.observability.v1.ListBucketsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListBucketsRequest build() { + com.google.cloud.observability.v1.ListBucketsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListBucketsRequest buildPartial() { + com.google.cloud.observability.v1.ListBucketsRequest result = + new com.google.cloud.observability.v1.ListBucketsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.ListBucketsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.showDeleted_ = showDeleted_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.ListBucketsRequest) { + return mergeFrom((com.google.cloud.observability.v1.ListBucketsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.ListBucketsRequest other) { + if (other == com.google.cloud.observability.v1.ListBucketsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getShowDeleted() != false) { + setShowDeleted(other.getShowDeleted()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + showDeleted_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent, which owns this collection of buckets. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent, which owns this collection of buckets. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent, which owns this collection of buckets. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent, which owns this collection of buckets. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent, which owns this collection of buckets. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of buckets to return. If unspecified, then at
+     * most 100 buckets are returned. The maximum value is 1000; values above 1000
+     * are coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of buckets to return. If unspecified, then at
+     * most 100 buckets are returned. The maximum value is 1000; values above 1000
+     * are coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of buckets to return. If unspecified, then at
+     * most 100 buckets are returned. The maximum value is 1000; values above 1000
+     * are coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListBuckets` call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListBuckets` call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListBuckets` call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListBuckets` call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListBuckets` call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean showDeleted_; + + /** + * + * + *
+     * Optional. If true, then the response will include deleted buckets.
+     * 
+ * + * bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The showDeleted. + */ + @java.lang.Override + public boolean getShowDeleted() { + return showDeleted_; + } + + /** + * + * + *
+     * Optional. If true, then the response will include deleted buckets.
+     * 
+ * + * bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The showDeleted to set. + * @return This builder for chaining. + */ + public Builder setShowDeleted(boolean value) { + + showDeleted_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If true, then the response will include deleted buckets.
+     * 
+ * + * bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearShowDeleted() { + bitField0_ = (bitField0_ & ~0x00000008); + showDeleted_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.ListBucketsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.ListBucketsRequest) + private static final com.google.cloud.observability.v1.ListBucketsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.ListBucketsRequest(); + } + + public static com.google.cloud.observability.v1.ListBucketsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBucketsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListBucketsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListBucketsRequestOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListBucketsRequestOrBuilder.java new file mode 100644 index 000000000000..a525aa8be5d5 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListBucketsRequestOrBuilder.java @@ -0,0 +1,118 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface ListBucketsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.ListBucketsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent, which owns this collection of buckets. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent, which owns this collection of buckets. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of buckets to return. If unspecified, then at
+   * most 100 buckets are returned. The maximum value is 1000; values above 1000
+   * are coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListBuckets` call.
+   * Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListBuckets` call.
+   * Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. If true, then the response will include deleted buckets.
+   * 
+ * + * bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The showDeleted. + */ + boolean getShowDeleted(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListBucketsResponse.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListBucketsResponse.java new file mode 100644 index 000000000000..199325819e2c --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListBucketsResponse.java @@ -0,0 +1,1165 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Response for listing buckets.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.ListBucketsResponse} + */ +@com.google.protobuf.Generated +public final class ListBucketsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.ListBucketsResponse) + ListBucketsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListBucketsResponse"); + } + + // Use ListBucketsResponse.newBuilder() to construct. + private ListBucketsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListBucketsResponse() { + buckets_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListBucketsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListBucketsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.ListBucketsResponse.class, + com.google.cloud.observability.v1.ListBucketsResponse.Builder.class); + } + + public static final int BUCKETS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List buckets_; + + /** + * + * + *
+   * Optional. The list of buckets.
+   * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getBucketsList() { + return buckets_; + } + + /** + * + * + *
+   * Optional. The list of buckets.
+   * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getBucketsOrBuilderList() { + return buckets_; + } + + /** + * + * + *
+   * Optional. The list of buckets.
+   * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getBucketsCount() { + return buckets_.size(); + } + + /** + * + * + *
+   * Optional. The list of buckets.
+   * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.observability.v1.Bucket getBuckets(int index) { + return buckets_.get(index); + } + + /** + * + * + *
+   * Optional. The list of buckets.
+   * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.observability.v1.BucketOrBuilder getBucketsOrBuilder(int index) { + return buckets_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * Optional. A token that can be sent as `page_token` to retrieve the next
+   * page. When this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A token that can be sent as `page_token` to retrieve the next
+   * page. When this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < buckets_.size(); i++) { + output.writeMessage(1, buckets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < buckets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, buckets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.ListBucketsResponse)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.ListBucketsResponse other = + (com.google.cloud.observability.v1.ListBucketsResponse) obj; + + if (!getBucketsList().equals(other.getBucketsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBucketsCount() > 0) { + hash = (37 * hash) + BUCKETS_FIELD_NUMBER; + hash = (53 * hash) + getBucketsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.ListBucketsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListBucketsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListBucketsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListBucketsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListBucketsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListBucketsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListBucketsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListBucketsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListBucketsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListBucketsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListBucketsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListBucketsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.observability.v1.ListBucketsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response for listing buckets.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.ListBucketsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.ListBucketsResponse) + com.google.cloud.observability.v1.ListBucketsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListBucketsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListBucketsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.ListBucketsResponse.class, + com.google.cloud.observability.v1.ListBucketsResponse.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.ListBucketsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (bucketsBuilder_ == null) { + buckets_ = java.util.Collections.emptyList(); + } else { + buckets_ = null; + bucketsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListBucketsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListBucketsResponse getDefaultInstanceForType() { + return com.google.cloud.observability.v1.ListBucketsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListBucketsResponse build() { + com.google.cloud.observability.v1.ListBucketsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListBucketsResponse buildPartial() { + com.google.cloud.observability.v1.ListBucketsResponse result = + new com.google.cloud.observability.v1.ListBucketsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.observability.v1.ListBucketsResponse result) { + if (bucketsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + buckets_ = java.util.Collections.unmodifiableList(buckets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.buckets_ = buckets_; + } else { + result.buckets_ = bucketsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.observability.v1.ListBucketsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.ListBucketsResponse) { + return mergeFrom((com.google.cloud.observability.v1.ListBucketsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.ListBucketsResponse other) { + if (other == com.google.cloud.observability.v1.ListBucketsResponse.getDefaultInstance()) + return this; + if (bucketsBuilder_ == null) { + if (!other.buckets_.isEmpty()) { + if (buckets_.isEmpty()) { + buckets_ = other.buckets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBucketsIsMutable(); + buckets_.addAll(other.buckets_); + } + onChanged(); + } + } else { + if (!other.buckets_.isEmpty()) { + if (bucketsBuilder_.isEmpty()) { + bucketsBuilder_.dispose(); + bucketsBuilder_ = null; + buckets_ = other.buckets_; + bitField0_ = (bitField0_ & ~0x00000001); + bucketsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBucketsFieldBuilder() + : null; + } else { + bucketsBuilder_.addAllMessages(other.buckets_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.observability.v1.Bucket m = + input.readMessage( + com.google.cloud.observability.v1.Bucket.parser(), extensionRegistry); + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.add(m); + } else { + bucketsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List buckets_ = + java.util.Collections.emptyList(); + + private void ensureBucketsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + buckets_ = new java.util.ArrayList(buckets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.observability.v1.Bucket, + com.google.cloud.observability.v1.Bucket.Builder, + com.google.cloud.observability.v1.BucketOrBuilder> + bucketsBuilder_; + + /** + * + * + *
+     * Optional. The list of buckets.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getBucketsList() { + if (bucketsBuilder_ == null) { + return java.util.Collections.unmodifiableList(buckets_); + } else { + return bucketsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. The list of buckets.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getBucketsCount() { + if (bucketsBuilder_ == null) { + return buckets_.size(); + } else { + return bucketsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. The list of buckets.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.observability.v1.Bucket getBuckets(int index) { + if (bucketsBuilder_ == null) { + return buckets_.get(index); + } else { + return bucketsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. The list of buckets.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBuckets(int index, com.google.cloud.observability.v1.Bucket value) { + if (bucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketsIsMutable(); + buckets_.set(index, value); + onChanged(); + } else { + bucketsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of buckets.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBuckets( + int index, com.google.cloud.observability.v1.Bucket.Builder builderForValue) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.set(index, builderForValue.build()); + onChanged(); + } else { + bucketsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of buckets.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBuckets(com.google.cloud.observability.v1.Bucket value) { + if (bucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketsIsMutable(); + buckets_.add(value); + onChanged(); + } else { + bucketsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of buckets.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBuckets(int index, com.google.cloud.observability.v1.Bucket value) { + if (bucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketsIsMutable(); + buckets_.add(index, value); + onChanged(); + } else { + bucketsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of buckets.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBuckets(com.google.cloud.observability.v1.Bucket.Builder builderForValue) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.add(builderForValue.build()); + onChanged(); + } else { + bucketsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of buckets.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBuckets( + int index, com.google.cloud.observability.v1.Bucket.Builder builderForValue) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.add(index, builderForValue.build()); + onChanged(); + } else { + bucketsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of buckets.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllBuckets( + java.lang.Iterable values) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, buckets_); + onChanged(); + } else { + bucketsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of buckets.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearBuckets() { + if (bucketsBuilder_ == null) { + buckets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + bucketsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of buckets.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeBuckets(int index) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.remove(index); + onChanged(); + } else { + bucketsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of buckets.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.observability.v1.Bucket.Builder getBucketsBuilder(int index) { + return internalGetBucketsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. The list of buckets.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.observability.v1.BucketOrBuilder getBucketsOrBuilder(int index) { + if (bucketsBuilder_ == null) { + return buckets_.get(index); + } else { + return bucketsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. The list of buckets.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getBucketsOrBuilderList() { + if (bucketsBuilder_ != null) { + return bucketsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(buckets_); + } + } + + /** + * + * + *
+     * Optional. The list of buckets.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.observability.v1.Bucket.Builder addBucketsBuilder() { + return internalGetBucketsFieldBuilder() + .addBuilder(com.google.cloud.observability.v1.Bucket.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The list of buckets.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.observability.v1.Bucket.Builder addBucketsBuilder(int index) { + return internalGetBucketsFieldBuilder() + .addBuilder(index, com.google.cloud.observability.v1.Bucket.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The list of buckets.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getBucketsBuilderList() { + return internalGetBucketsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.observability.v1.Bucket, + com.google.cloud.observability.v1.Bucket.Builder, + com.google.cloud.observability.v1.BucketOrBuilder> + internalGetBucketsFieldBuilder() { + if (bucketsBuilder_ == null) { + bucketsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.observability.v1.Bucket, + com.google.cloud.observability.v1.Bucket.Builder, + com.google.cloud.observability.v1.BucketOrBuilder>( + buckets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + buckets_ = null; + } + return bucketsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * Optional. A token that can be sent as `page_token` to retrieve the next
+     * page. When this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token that can be sent as `page_token` to retrieve the next
+     * page. When this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token that can be sent as `page_token` to retrieve the next
+     * page. When this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token that can be sent as `page_token` to retrieve the next
+     * page. When this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token that can be sent as `page_token` to retrieve the next
+     * page. When this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.ListBucketsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.ListBucketsResponse) + private static final com.google.cloud.observability.v1.ListBucketsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.ListBucketsResponse(); + } + + public static com.google.cloud.observability.v1.ListBucketsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBucketsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListBucketsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListBucketsResponseOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListBucketsResponseOrBuilder.java new file mode 100644 index 000000000000..6a25f43aff79 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListBucketsResponseOrBuilder.java @@ -0,0 +1,122 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface ListBucketsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.ListBucketsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The list of buckets.
+   * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getBucketsList(); + + /** + * + * + *
+   * Optional. The list of buckets.
+   * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.observability.v1.Bucket getBuckets(int index); + + /** + * + * + *
+   * Optional. The list of buckets.
+   * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getBucketsCount(); + + /** + * + * + *
+   * Optional. The list of buckets.
+   * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getBucketsOrBuilderList(); + + /** + * + * + *
+   * Optional. The list of buckets.
+   * 
+ * + * + * repeated .google.cloud.observability.v1.Bucket buckets = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.observability.v1.BucketOrBuilder getBucketsOrBuilder(int index); + + /** + * + * + *
+   * Optional. A token that can be sent as `page_token` to retrieve the next
+   * page. When this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * Optional. A token that can be sent as `page_token` to retrieve the next
+   * page. When this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListDatasetsRequest.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListDatasetsRequest.java new file mode 100644 index 000000000000..df78e2988470 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListDatasetsRequest.java @@ -0,0 +1,1030 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Request for listing datasets.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.ListDatasetsRequest} + */ +@com.google.protobuf.Generated +public final class ListDatasetsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.ListDatasetsRequest) + ListDatasetsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListDatasetsRequest"); + } + + // Use ListDatasetsRequest.newBuilder() to construct. + private ListDatasetsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListDatasetsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListDatasetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListDatasetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.ListDatasetsRequest.class, + com.google.cloud.observability.v1.ListDatasetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent bucket that owns this collection of datasets. The
+   * format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent bucket that owns this collection of datasets. The
+   * format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of datasets to return. If unspecified, then at
+   * most 100 datasets are returned. The maximum value is 1000; values above
+   * 1000 are coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListDatasets` call.
+   * Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListDatasets` call.
+   * Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHOW_DELETED_FIELD_NUMBER = 4; + private boolean showDeleted_ = false; + + /** + * + * + *
+   * Optional. If true, then the response will include deleted datasets.
+   * 
+ * + * bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The showDeleted. + */ + @java.lang.Override + public boolean getShowDeleted() { + return showDeleted_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (showDeleted_ != false) { + output.writeBool(4, showDeleted_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (showDeleted_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, showDeleted_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.ListDatasetsRequest)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.ListDatasetsRequest other = + (com.google.cloud.observability.v1.ListDatasetsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (getShowDeleted() != other.getShowDeleted()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + SHOW_DELETED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getShowDeleted()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.ListDatasetsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListDatasetsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListDatasetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListDatasetsRequest 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.cloud.observability.v1.ListDatasetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListDatasetsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListDatasetsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListDatasetsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListDatasetsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListDatasetsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListDatasetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListDatasetsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.observability.v1.ListDatasetsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for listing datasets.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.ListDatasetsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.ListDatasetsRequest) + com.google.cloud.observability.v1.ListDatasetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListDatasetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListDatasetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.ListDatasetsRequest.class, + com.google.cloud.observability.v1.ListDatasetsRequest.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.ListDatasetsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + showDeleted_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListDatasetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListDatasetsRequest getDefaultInstanceForType() { + return com.google.cloud.observability.v1.ListDatasetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListDatasetsRequest build() { + com.google.cloud.observability.v1.ListDatasetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListDatasetsRequest buildPartial() { + com.google.cloud.observability.v1.ListDatasetsRequest result = + new com.google.cloud.observability.v1.ListDatasetsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.ListDatasetsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.showDeleted_ = showDeleted_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.ListDatasetsRequest) { + return mergeFrom((com.google.cloud.observability.v1.ListDatasetsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.ListDatasetsRequest other) { + if (other == com.google.cloud.observability.v1.ListDatasetsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getShowDeleted() != false) { + setShowDeleted(other.getShowDeleted()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + showDeleted_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent bucket that owns this collection of datasets. The
+     * format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent bucket that owns this collection of datasets. The
+     * format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent bucket that owns this collection of datasets. The
+     * format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent bucket that owns this collection of datasets. The
+     * format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent bucket that owns this collection of datasets. The
+     * format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of datasets to return. If unspecified, then at
+     * most 100 datasets are returned. The maximum value is 1000; values above
+     * 1000 are coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of datasets to return. If unspecified, then at
+     * most 100 datasets are returned. The maximum value is 1000; values above
+     * 1000 are coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of datasets to return. If unspecified, then at
+     * most 100 datasets are returned. The maximum value is 1000; values above
+     * 1000 are coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDatasets` call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDatasets` call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDatasets` call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDatasets` call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDatasets` call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean showDeleted_; + + /** + * + * + *
+     * Optional. If true, then the response will include deleted datasets.
+     * 
+ * + * bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The showDeleted. + */ + @java.lang.Override + public boolean getShowDeleted() { + return showDeleted_; + } + + /** + * + * + *
+     * Optional. If true, then the response will include deleted datasets.
+     * 
+ * + * bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The showDeleted to set. + * @return This builder for chaining. + */ + public Builder setShowDeleted(boolean value) { + + showDeleted_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If true, then the response will include deleted datasets.
+     * 
+ * + * bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearShowDeleted() { + bitField0_ = (bitField0_ & ~0x00000008); + showDeleted_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.ListDatasetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.ListDatasetsRequest) + private static final com.google.cloud.observability.v1.ListDatasetsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.ListDatasetsRequest(); + } + + public static com.google.cloud.observability.v1.ListDatasetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDatasetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListDatasetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListDatasetsRequestOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListDatasetsRequestOrBuilder.java new file mode 100644 index 000000000000..34e8736b6d99 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListDatasetsRequestOrBuilder.java @@ -0,0 +1,120 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface ListDatasetsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.ListDatasetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent bucket that owns this collection of datasets. The
+   * format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent bucket that owns this collection of datasets. The
+   * format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of datasets to return. If unspecified, then at
+   * most 100 datasets are returned. The maximum value is 1000; values above
+   * 1000 are coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListDatasets` call.
+   * Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListDatasets` call.
+   * Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. If true, then the response will include deleted datasets.
+   * 
+ * + * bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The showDeleted. + */ + boolean getShowDeleted(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListDatasetsResponse.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListDatasetsResponse.java new file mode 100644 index 000000000000..7789ee54e5d6 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListDatasetsResponse.java @@ -0,0 +1,1119 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Response for listing datasets.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.ListDatasetsResponse} + */ +@com.google.protobuf.Generated +public final class ListDatasetsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.ListDatasetsResponse) + ListDatasetsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListDatasetsResponse"); + } + + // Use ListDatasetsResponse.newBuilder() to construct. + private ListDatasetsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListDatasetsResponse() { + datasets_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListDatasetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListDatasetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.ListDatasetsResponse.class, + com.google.cloud.observability.v1.ListDatasetsResponse.Builder.class); + } + + public static final int DATASETS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List datasets_; + + /** + * + * + *
+   * The list of datasets.
+   * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + @java.lang.Override + public java.util.List getDatasetsList() { + return datasets_; + } + + /** + * + * + *
+   * The list of datasets.
+   * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + @java.lang.Override + public java.util.List + getDatasetsOrBuilderList() { + return datasets_; + } + + /** + * + * + *
+   * The list of datasets.
+   * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + @java.lang.Override + public int getDatasetsCount() { + return datasets_.size(); + } + + /** + * + * + *
+   * The list of datasets.
+   * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + @java.lang.Override + public com.google.cloud.observability.v1.Dataset getDatasets(int index) { + return datasets_.get(index); + } + + /** + * + * + *
+   * The list of datasets.
+   * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + @java.lang.Override + public com.google.cloud.observability.v1.DatasetOrBuilder getDatasetsOrBuilder(int index) { + return datasets_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token that can be sent as `page_token` to retrieve the next page. When
+   * this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A token that can be sent as `page_token` to retrieve the next page. When
+   * this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < datasets_.size(); i++) { + output.writeMessage(1, datasets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < datasets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, datasets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.ListDatasetsResponse)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.ListDatasetsResponse other = + (com.google.cloud.observability.v1.ListDatasetsResponse) obj; + + if (!getDatasetsList().equals(other.getDatasetsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDatasetsCount() > 0) { + hash = (37 * hash) + DATASETS_FIELD_NUMBER; + hash = (53 * hash) + getDatasetsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.ListDatasetsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListDatasetsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListDatasetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListDatasetsResponse 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.cloud.observability.v1.ListDatasetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListDatasetsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListDatasetsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListDatasetsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListDatasetsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListDatasetsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListDatasetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListDatasetsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.observability.v1.ListDatasetsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response for listing datasets.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.ListDatasetsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.ListDatasetsResponse) + com.google.cloud.observability.v1.ListDatasetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListDatasetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListDatasetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.ListDatasetsResponse.class, + com.google.cloud.observability.v1.ListDatasetsResponse.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.ListDatasetsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (datasetsBuilder_ == null) { + datasets_ = java.util.Collections.emptyList(); + } else { + datasets_ = null; + datasetsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListDatasetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListDatasetsResponse getDefaultInstanceForType() { + return com.google.cloud.observability.v1.ListDatasetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListDatasetsResponse build() { + com.google.cloud.observability.v1.ListDatasetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListDatasetsResponse buildPartial() { + com.google.cloud.observability.v1.ListDatasetsResponse result = + new com.google.cloud.observability.v1.ListDatasetsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.observability.v1.ListDatasetsResponse result) { + if (datasetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + datasets_ = java.util.Collections.unmodifiableList(datasets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.datasets_ = datasets_; + } else { + result.datasets_ = datasetsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.observability.v1.ListDatasetsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.ListDatasetsResponse) { + return mergeFrom((com.google.cloud.observability.v1.ListDatasetsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.ListDatasetsResponse other) { + if (other == com.google.cloud.observability.v1.ListDatasetsResponse.getDefaultInstance()) + return this; + if (datasetsBuilder_ == null) { + if (!other.datasets_.isEmpty()) { + if (datasets_.isEmpty()) { + datasets_ = other.datasets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDatasetsIsMutable(); + datasets_.addAll(other.datasets_); + } + onChanged(); + } + } else { + if (!other.datasets_.isEmpty()) { + if (datasetsBuilder_.isEmpty()) { + datasetsBuilder_.dispose(); + datasetsBuilder_ = null; + datasets_ = other.datasets_; + bitField0_ = (bitField0_ & ~0x00000001); + datasetsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDatasetsFieldBuilder() + : null; + } else { + datasetsBuilder_.addAllMessages(other.datasets_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.observability.v1.Dataset m = + input.readMessage( + com.google.cloud.observability.v1.Dataset.parser(), extensionRegistry); + if (datasetsBuilder_ == null) { + ensureDatasetsIsMutable(); + datasets_.add(m); + } else { + datasetsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List datasets_ = + java.util.Collections.emptyList(); + + private void ensureDatasetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + datasets_ = new java.util.ArrayList(datasets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.observability.v1.Dataset, + com.google.cloud.observability.v1.Dataset.Builder, + com.google.cloud.observability.v1.DatasetOrBuilder> + datasetsBuilder_; + + /** + * + * + *
+     * The list of datasets.
+     * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + public java.util.List getDatasetsList() { + if (datasetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(datasets_); + } else { + return datasetsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of datasets.
+     * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + public int getDatasetsCount() { + if (datasetsBuilder_ == null) { + return datasets_.size(); + } else { + return datasetsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of datasets.
+     * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + public com.google.cloud.observability.v1.Dataset getDatasets(int index) { + if (datasetsBuilder_ == null) { + return datasets_.get(index); + } else { + return datasetsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of datasets.
+     * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + public Builder setDatasets(int index, com.google.cloud.observability.v1.Dataset value) { + if (datasetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatasetsIsMutable(); + datasets_.set(index, value); + onChanged(); + } else { + datasetsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of datasets.
+     * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + public Builder setDatasets( + int index, com.google.cloud.observability.v1.Dataset.Builder builderForValue) { + if (datasetsBuilder_ == null) { + ensureDatasetsIsMutable(); + datasets_.set(index, builderForValue.build()); + onChanged(); + } else { + datasetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of datasets.
+     * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + public Builder addDatasets(com.google.cloud.observability.v1.Dataset value) { + if (datasetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatasetsIsMutable(); + datasets_.add(value); + onChanged(); + } else { + datasetsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of datasets.
+     * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + public Builder addDatasets(int index, com.google.cloud.observability.v1.Dataset value) { + if (datasetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatasetsIsMutable(); + datasets_.add(index, value); + onChanged(); + } else { + datasetsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of datasets.
+     * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + public Builder addDatasets(com.google.cloud.observability.v1.Dataset.Builder builderForValue) { + if (datasetsBuilder_ == null) { + ensureDatasetsIsMutable(); + datasets_.add(builderForValue.build()); + onChanged(); + } else { + datasetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of datasets.
+     * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + public Builder addDatasets( + int index, com.google.cloud.observability.v1.Dataset.Builder builderForValue) { + if (datasetsBuilder_ == null) { + ensureDatasetsIsMutable(); + datasets_.add(index, builderForValue.build()); + onChanged(); + } else { + datasetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of datasets.
+     * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + public Builder addAllDatasets( + java.lang.Iterable values) { + if (datasetsBuilder_ == null) { + ensureDatasetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, datasets_); + onChanged(); + } else { + datasetsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of datasets.
+     * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + public Builder clearDatasets() { + if (datasetsBuilder_ == null) { + datasets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + datasetsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of datasets.
+     * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + public Builder removeDatasets(int index) { + if (datasetsBuilder_ == null) { + ensureDatasetsIsMutable(); + datasets_.remove(index); + onChanged(); + } else { + datasetsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of datasets.
+     * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + public com.google.cloud.observability.v1.Dataset.Builder getDatasetsBuilder(int index) { + return internalGetDatasetsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of datasets.
+     * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + public com.google.cloud.observability.v1.DatasetOrBuilder getDatasetsOrBuilder(int index) { + if (datasetsBuilder_ == null) { + return datasets_.get(index); + } else { + return datasetsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of datasets.
+     * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + public java.util.List + getDatasetsOrBuilderList() { + if (datasetsBuilder_ != null) { + return datasetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(datasets_); + } + } + + /** + * + * + *
+     * The list of datasets.
+     * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + public com.google.cloud.observability.v1.Dataset.Builder addDatasetsBuilder() { + return internalGetDatasetsFieldBuilder() + .addBuilder(com.google.cloud.observability.v1.Dataset.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of datasets.
+     * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + public com.google.cloud.observability.v1.Dataset.Builder addDatasetsBuilder(int index) { + return internalGetDatasetsFieldBuilder() + .addBuilder(index, com.google.cloud.observability.v1.Dataset.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of datasets.
+     * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + public java.util.List + getDatasetsBuilderList() { + return internalGetDatasetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.observability.v1.Dataset, + com.google.cloud.observability.v1.Dataset.Builder, + com.google.cloud.observability.v1.DatasetOrBuilder> + internalGetDatasetsFieldBuilder() { + if (datasetsBuilder_ == null) { + datasetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.observability.v1.Dataset, + com.google.cloud.observability.v1.Dataset.Builder, + com.google.cloud.observability.v1.DatasetOrBuilder>( + datasets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + datasets_ = null; + } + return datasetsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token that can be sent as `page_token` to retrieve the next page. When
+     * this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A token that can be sent as `page_token` to retrieve the next page. When
+     * this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A token that can be sent as `page_token` to retrieve the next page. When
+     * this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token that can be sent as `page_token` to retrieve the next page. When
+     * this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token that can be sent as `page_token` to retrieve the next page. When
+     * this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.ListDatasetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.ListDatasetsResponse) + private static final com.google.cloud.observability.v1.ListDatasetsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.ListDatasetsResponse(); + } + + public static com.google.cloud.observability.v1.ListDatasetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDatasetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListDatasetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListDatasetsResponseOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListDatasetsResponseOrBuilder.java new file mode 100644 index 000000000000..97ede5139ae8 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListDatasetsResponseOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface ListDatasetsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.ListDatasetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of datasets.
+   * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + java.util.List getDatasetsList(); + + /** + * + * + *
+   * The list of datasets.
+   * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + com.google.cloud.observability.v1.Dataset getDatasets(int index); + + /** + * + * + *
+   * The list of datasets.
+   * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + int getDatasetsCount(); + + /** + * + * + *
+   * The list of datasets.
+   * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + java.util.List + getDatasetsOrBuilderList(); + + /** + * + * + *
+   * The list of datasets.
+   * 
+ * + * repeated .google.cloud.observability.v1.Dataset datasets = 1; + */ + com.google.cloud.observability.v1.DatasetOrBuilder getDatasetsOrBuilder(int index); + + /** + * + * + *
+   * A token that can be sent as `page_token` to retrieve the next page. When
+   * this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token that can be sent as `page_token` to retrieve the next page. When
+   * this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListLinksRequest.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListLinksRequest.java new file mode 100644 index 000000000000..1faf050d0d4b --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListLinksRequest.java @@ -0,0 +1,932 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Request for listing links.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.ListLinksRequest} + */ +@com.google.protobuf.Generated +public final class ListLinksRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.ListLinksRequest) + ListLinksRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListLinksRequest"); + } + + // Use ListLinksRequest.newBuilder() to construct. + private ListLinksRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListLinksRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListLinksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListLinksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.ListLinksRequest.class, + com.google.cloud.observability.v1.ListLinksRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent dataset that owns this collection of links. The format
+   * is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent dataset that owns this collection of links. The format
+   * is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of links to return. If unspecified, then at
+   * most 100 links are returned. The maximum value is 1000; values above 1000
+   * are coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListLinks` call. Provide
+   * this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListLinks` call. Provide
+   * this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.ListLinksRequest)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.ListLinksRequest other = + (com.google.cloud.observability.v1.ListLinksRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.ListLinksRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListLinksRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListLinksRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListLinksRequest 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.cloud.observability.v1.ListLinksRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListLinksRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListLinksRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListLinksRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListLinksRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListLinksRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListLinksRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListLinksRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.observability.v1.ListLinksRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for listing links.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.ListLinksRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.ListLinksRequest) + com.google.cloud.observability.v1.ListLinksRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListLinksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListLinksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.ListLinksRequest.class, + com.google.cloud.observability.v1.ListLinksRequest.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.ListLinksRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListLinksRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListLinksRequest getDefaultInstanceForType() { + return com.google.cloud.observability.v1.ListLinksRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListLinksRequest build() { + com.google.cloud.observability.v1.ListLinksRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListLinksRequest buildPartial() { + com.google.cloud.observability.v1.ListLinksRequest result = + new com.google.cloud.observability.v1.ListLinksRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.ListLinksRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.ListLinksRequest) { + return mergeFrom((com.google.cloud.observability.v1.ListLinksRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.ListLinksRequest other) { + if (other == com.google.cloud.observability.v1.ListLinksRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent dataset that owns this collection of links. The format
+     * is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent dataset that owns this collection of links. The format
+     * is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent dataset that owns this collection of links. The format
+     * is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent dataset that owns this collection of links. The format
+     * is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent dataset that owns this collection of links. The format
+     * is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of links to return. If unspecified, then at
+     * most 100 links are returned. The maximum value is 1000; values above 1000
+     * are coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of links to return. If unspecified, then at
+     * most 100 links are returned. The maximum value is 1000; values above 1000
+     * are coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of links to return. If unspecified, then at
+     * most 100 links are returned. The maximum value is 1000; values above 1000
+     * are coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListLinks` call. Provide
+     * this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListLinks` call. Provide
+     * this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListLinks` call. Provide
+     * this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListLinks` call. Provide
+     * this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListLinks` call. Provide
+     * this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.ListLinksRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.ListLinksRequest) + private static final com.google.cloud.observability.v1.ListLinksRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.ListLinksRequest(); + } + + public static com.google.cloud.observability.v1.ListLinksRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListLinksRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListLinksRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListLinksRequestOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListLinksRequestOrBuilder.java new file mode 100644 index 000000000000..d07f5a4b772f --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListLinksRequestOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface ListLinksRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.ListLinksRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent dataset that owns this collection of links. The format
+   * is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent dataset that owns this collection of links. The format
+   * is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of links to return. If unspecified, then at
+   * most 100 links are returned. The maximum value is 1000; values above 1000
+   * are coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListLinks` call. Provide
+   * this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListLinks` call. Provide
+   * this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListLinksResponse.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListLinksResponse.java new file mode 100644 index 000000000000..e8702b4cb953 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListLinksResponse.java @@ -0,0 +1,1117 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Response for listing links.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.ListLinksResponse} + */ +@com.google.protobuf.Generated +public final class ListLinksResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.ListLinksResponse) + ListLinksResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListLinksResponse"); + } + + // Use ListLinksResponse.newBuilder() to construct. + private ListLinksResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListLinksResponse() { + links_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListLinksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListLinksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.ListLinksResponse.class, + com.google.cloud.observability.v1.ListLinksResponse.Builder.class); + } + + public static final int LINKS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List links_; + + /** + * + * + *
+   * The list of links.
+   * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + @java.lang.Override + public java.util.List getLinksList() { + return links_; + } + + /** + * + * + *
+   * The list of links.
+   * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + @java.lang.Override + public java.util.List + getLinksOrBuilderList() { + return links_; + } + + /** + * + * + *
+   * The list of links.
+   * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + @java.lang.Override + public int getLinksCount() { + return links_.size(); + } + + /** + * + * + *
+   * The list of links.
+   * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + @java.lang.Override + public com.google.cloud.observability.v1.Link getLinks(int index) { + return links_.get(index); + } + + /** + * + * + *
+   * The list of links.
+   * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + @java.lang.Override + public com.google.cloud.observability.v1.LinkOrBuilder getLinksOrBuilder(int index) { + return links_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * Optional. A token that can be sent as `page_token` to retrieve the next
+   * page. When this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A token that can be sent as `page_token` to retrieve the next
+   * page. When this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 < links_.size(); i++) { + output.writeMessage(1, links_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < links_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, links_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.ListLinksResponse)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.ListLinksResponse other = + (com.google.cloud.observability.v1.ListLinksResponse) obj; + + if (!getLinksList().equals(other.getLinksList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getLinksCount() > 0) { + hash = (37 * hash) + LINKS_FIELD_NUMBER; + hash = (53 * hash) + getLinksList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.ListLinksResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListLinksResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListLinksResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListLinksResponse 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.cloud.observability.v1.ListLinksResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListLinksResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListLinksResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListLinksResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListLinksResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListLinksResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListLinksResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListLinksResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.observability.v1.ListLinksResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response for listing links.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.ListLinksResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.ListLinksResponse) + com.google.cloud.observability.v1.ListLinksResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListLinksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListLinksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.ListLinksResponse.class, + com.google.cloud.observability.v1.ListLinksResponse.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.ListLinksResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (linksBuilder_ == null) { + links_ = java.util.Collections.emptyList(); + } else { + links_ = null; + linksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListLinksResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListLinksResponse getDefaultInstanceForType() { + return com.google.cloud.observability.v1.ListLinksResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListLinksResponse build() { + com.google.cloud.observability.v1.ListLinksResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListLinksResponse buildPartial() { + com.google.cloud.observability.v1.ListLinksResponse result = + new com.google.cloud.observability.v1.ListLinksResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.observability.v1.ListLinksResponse result) { + if (linksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + links_ = java.util.Collections.unmodifiableList(links_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.links_ = links_; + } else { + result.links_ = linksBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.observability.v1.ListLinksResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.ListLinksResponse) { + return mergeFrom((com.google.cloud.observability.v1.ListLinksResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.ListLinksResponse other) { + if (other == com.google.cloud.observability.v1.ListLinksResponse.getDefaultInstance()) + return this; + if (linksBuilder_ == null) { + if (!other.links_.isEmpty()) { + if (links_.isEmpty()) { + links_ = other.links_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLinksIsMutable(); + links_.addAll(other.links_); + } + onChanged(); + } + } else { + if (!other.links_.isEmpty()) { + if (linksBuilder_.isEmpty()) { + linksBuilder_.dispose(); + linksBuilder_ = null; + links_ = other.links_; + bitField0_ = (bitField0_ & ~0x00000001); + linksBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetLinksFieldBuilder() + : null; + } else { + linksBuilder_.addAllMessages(other.links_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.observability.v1.Link m = + input.readMessage( + com.google.cloud.observability.v1.Link.parser(), extensionRegistry); + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(m); + } else { + linksBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List links_ = + java.util.Collections.emptyList(); + + private void ensureLinksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + links_ = new java.util.ArrayList(links_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.observability.v1.Link, + com.google.cloud.observability.v1.Link.Builder, + com.google.cloud.observability.v1.LinkOrBuilder> + linksBuilder_; + + /** + * + * + *
+     * The list of links.
+     * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + public java.util.List getLinksList() { + if (linksBuilder_ == null) { + return java.util.Collections.unmodifiableList(links_); + } else { + return linksBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of links.
+     * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + public int getLinksCount() { + if (linksBuilder_ == null) { + return links_.size(); + } else { + return linksBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of links.
+     * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + public com.google.cloud.observability.v1.Link getLinks(int index) { + if (linksBuilder_ == null) { + return links_.get(index); + } else { + return linksBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of links.
+     * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + public Builder setLinks(int index, com.google.cloud.observability.v1.Link value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.set(index, value); + onChanged(); + } else { + linksBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of links.
+     * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + public Builder setLinks( + int index, com.google.cloud.observability.v1.Link.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.set(index, builderForValue.build()); + onChanged(); + } else { + linksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of links.
+     * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + public Builder addLinks(com.google.cloud.observability.v1.Link value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.add(value); + onChanged(); + } else { + linksBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of links.
+     * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + public Builder addLinks(int index, com.google.cloud.observability.v1.Link value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.add(index, value); + onChanged(); + } else { + linksBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of links.
+     * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + public Builder addLinks(com.google.cloud.observability.v1.Link.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(builderForValue.build()); + onChanged(); + } else { + linksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of links.
+     * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + public Builder addLinks( + int index, com.google.cloud.observability.v1.Link.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(index, builderForValue.build()); + onChanged(); + } else { + linksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of links.
+     * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + public Builder addAllLinks( + java.lang.Iterable values) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, links_); + onChanged(); + } else { + linksBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of links.
+     * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + public Builder clearLinks() { + if (linksBuilder_ == null) { + links_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + linksBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of links.
+     * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + public Builder removeLinks(int index) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.remove(index); + onChanged(); + } else { + linksBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of links.
+     * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + public com.google.cloud.observability.v1.Link.Builder getLinksBuilder(int index) { + return internalGetLinksFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of links.
+     * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + public com.google.cloud.observability.v1.LinkOrBuilder getLinksOrBuilder(int index) { + if (linksBuilder_ == null) { + return links_.get(index); + } else { + return linksBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of links.
+     * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + public java.util.List + getLinksOrBuilderList() { + if (linksBuilder_ != null) { + return linksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(links_); + } + } + + /** + * + * + *
+     * The list of links.
+     * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + public com.google.cloud.observability.v1.Link.Builder addLinksBuilder() { + return internalGetLinksFieldBuilder() + .addBuilder(com.google.cloud.observability.v1.Link.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of links.
+     * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + public com.google.cloud.observability.v1.Link.Builder addLinksBuilder(int index) { + return internalGetLinksFieldBuilder() + .addBuilder(index, com.google.cloud.observability.v1.Link.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of links.
+     * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + public java.util.List getLinksBuilderList() { + return internalGetLinksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.observability.v1.Link, + com.google.cloud.observability.v1.Link.Builder, + com.google.cloud.observability.v1.LinkOrBuilder> + internalGetLinksFieldBuilder() { + if (linksBuilder_ == null) { + linksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.observability.v1.Link, + com.google.cloud.observability.v1.Link.Builder, + com.google.cloud.observability.v1.LinkOrBuilder>( + links_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + links_ = null; + } + return linksBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * Optional. A token that can be sent as `page_token` to retrieve the next
+     * page. When this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token that can be sent as `page_token` to retrieve the next
+     * page. When this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token that can be sent as `page_token` to retrieve the next
+     * page. When this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token that can be sent as `page_token` to retrieve the next
+     * page. When this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token that can be sent as `page_token` to retrieve the next
+     * page. When this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.ListLinksResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.ListLinksResponse) + private static final com.google.cloud.observability.v1.ListLinksResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.ListLinksResponse(); + } + + public static com.google.cloud.observability.v1.ListLinksResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListLinksResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListLinksResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListLinksResponseOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListLinksResponseOrBuilder.java new file mode 100644 index 000000000000..dbb4b45863da --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListLinksResponseOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface ListLinksResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.ListLinksResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of links.
+   * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + java.util.List getLinksList(); + + /** + * + * + *
+   * The list of links.
+   * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + com.google.cloud.observability.v1.Link getLinks(int index); + + /** + * + * + *
+   * The list of links.
+   * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + int getLinksCount(); + + /** + * + * + *
+   * The list of links.
+   * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + java.util.List getLinksOrBuilderList(); + + /** + * + * + *
+   * The list of links.
+   * 
+ * + * repeated .google.cloud.observability.v1.Link links = 1; + */ + com.google.cloud.observability.v1.LinkOrBuilder getLinksOrBuilder(int index); + + /** + * + * + *
+   * Optional. A token that can be sent as `page_token` to retrieve the next
+   * page. When this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * Optional. A token that can be sent as `page_token` to retrieve the next
+   * page. When this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListTraceScopesRequest.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListTraceScopesRequest.java new file mode 100644 index 000000000000..e8cfb3ebe4ed --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListTraceScopesRequest.java @@ -0,0 +1,972 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Request for listing TraceScopes.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.ListTraceScopesRequest} + */ +@com.google.protobuf.Generated +public final class ListTraceScopesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.ListTraceScopesRequest) + ListTraceScopesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListTraceScopesRequest"); + } + + // Use ListTraceScopesRequest.newBuilder() to construct. + private ListTraceScopesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListTraceScopesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListTraceScopesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListTraceScopesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.ListTraceScopesRequest.class, + com.google.cloud.observability.v1.ListTraceScopesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The full resource name of the location to look for trace scopes:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION_ID]
+   *
+   * For example:
+   *
+   * projects/my-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 full resource name of the location to look for trace scopes:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION_ID]
+   *
+   * For example:
+   *
+   * projects/my-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 PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of results to return from this request.
+   *
+   * Non-positive values are ignored. The presence of `next_page_token` in the
+   * response indicates that more results might be available.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. If present, then retrieve the next batch of results from the
+   * preceding call to this method. `page_token` must be the value of
+   * `next_page_token` from the previous response. The values of other method
+   * parameters should be identical to those in the previous call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. If present, then retrieve the next batch of results from the
+   * preceding call to this method. `page_token` must be the value of
+   * `next_page_token` from the previous response. The values of other method
+   * parameters should be identical to those in the previous call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.ListTraceScopesRequest)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.ListTraceScopesRequest other = + (com.google.cloud.observability.v1.ListTraceScopesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.ListTraceScopesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListTraceScopesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListTraceScopesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListTraceScopesRequest 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.cloud.observability.v1.ListTraceScopesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListTraceScopesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListTraceScopesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListTraceScopesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListTraceScopesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListTraceScopesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListTraceScopesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListTraceScopesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.observability.v1.ListTraceScopesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for listing TraceScopes.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.ListTraceScopesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.ListTraceScopesRequest) + com.google.cloud.observability.v1.ListTraceScopesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListTraceScopesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListTraceScopesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.ListTraceScopesRequest.class, + com.google.cloud.observability.v1.ListTraceScopesRequest.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.ListTraceScopesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListTraceScopesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListTraceScopesRequest getDefaultInstanceForType() { + return com.google.cloud.observability.v1.ListTraceScopesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListTraceScopesRequest build() { + com.google.cloud.observability.v1.ListTraceScopesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListTraceScopesRequest buildPartial() { + com.google.cloud.observability.v1.ListTraceScopesRequest result = + new com.google.cloud.observability.v1.ListTraceScopesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.ListTraceScopesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.ListTraceScopesRequest) { + return mergeFrom((com.google.cloud.observability.v1.ListTraceScopesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.ListTraceScopesRequest other) { + if (other == com.google.cloud.observability.v1.ListTraceScopesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The full resource name of the location to look for trace scopes:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION_ID]
+     *
+     * For example:
+     *
+     * projects/my-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 full resource name of the location to look for trace scopes:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION_ID]
+     *
+     * For example:
+     *
+     * projects/my-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 full resource name of the location to look for trace scopes:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION_ID]
+     *
+     * For example:
+     *
+     * projects/my-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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The full resource name of the location to look for trace scopes:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION_ID]
+     *
+     * For example:
+     *
+     * projects/my-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(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The full resource name of the location to look for trace scopes:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION_ID]
+     *
+     * For example:
+     *
+     * projects/my-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; + bitField0_ |= 0x00000001; + 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 `next_page_token` in the
+     * response indicates that more results might be available.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of results to return from this request.
+     *
+     * Non-positive values are ignored. The presence of `next_page_token` in the
+     * response indicates that more results might be available.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of results to return from this request.
+     *
+     * Non-positive values are ignored. The presence of `next_page_token` in the
+     * response indicates that more results might be available.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. If present, then retrieve the next batch of results from the
+     * preceding call to this method. `page_token` must be the value of
+     * `next_page_token` from the previous response. The values of other method
+     * parameters should be identical to those in the previous call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. If present, then retrieve the next batch of results from the
+     * preceding call to this method. `page_token` must be the value of
+     * `next_page_token` from the previous response. The values of other method
+     * parameters should be identical to those in the previous call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. If present, then retrieve the next batch of results from the
+     * preceding call to this method. `page_token` must be the value of
+     * `next_page_token` from the previous response. The values of other method
+     * parameters should be identical to those in the previous call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If present, then retrieve the next batch of results from the
+     * preceding call to this method. `page_token` must be the value of
+     * `next_page_token` from the previous response. The values of other method
+     * parameters should be identical to those in the previous call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If present, then retrieve the next batch of results from the
+     * preceding call to this method. `page_token` must be the value of
+     * `next_page_token` from the previous response. The values of other method
+     * parameters should be identical to those in the previous call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.ListTraceScopesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.ListTraceScopesRequest) + private static final com.google.cloud.observability.v1.ListTraceScopesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.ListTraceScopesRequest(); + } + + public static com.google.cloud.observability.v1.ListTraceScopesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTraceScopesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListTraceScopesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListTraceScopesRequestOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListTraceScopesRequestOrBuilder.java new file mode 100644 index 000000000000..35b15b9b40c1 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListTraceScopesRequestOrBuilder.java @@ -0,0 +1,118 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface ListTraceScopesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.ListTraceScopesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The full resource name of the location to look for trace scopes:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION_ID]
+   *
+   * For example:
+   *
+   * projects/my-project/locations/global
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The full resource name of the location to look for trace scopes:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION_ID]
+   *
+   * For example:
+   *
+   * projects/my-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(); + + /** + * + * + *
+   * Optional. The maximum number of results to return from this request.
+   *
+   * Non-positive values are ignored. The presence of `next_page_token` in the
+   * response indicates that more results might be available.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. If present, then retrieve the next batch of results from the
+   * preceding call to this method. `page_token` must be the value of
+   * `next_page_token` from the previous response. The values of other method
+   * parameters should be identical to those in the previous call.
+   * 
+ * + * string page_token = 3 [(.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. `page_token` must be the value of
+   * `next_page_token` from the previous response. The values of other method
+   * parameters should be identical to those in the previous call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListTraceScopesResponse.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListTraceScopesResponse.java new file mode 100644 index 000000000000..eb69da535820 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListTraceScopesResponse.java @@ -0,0 +1,1175 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Response for listing TraceScopes.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.ListTraceScopesResponse} + */ +@com.google.protobuf.Generated +public final class ListTraceScopesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.ListTraceScopesResponse) + ListTraceScopesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListTraceScopesResponse"); + } + + // Use ListTraceScopesResponse.newBuilder() to construct. + private ListTraceScopesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListTraceScopesResponse() { + traceScopes_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListTraceScopesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListTraceScopesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.ListTraceScopesResponse.class, + com.google.cloud.observability.v1.ListTraceScopesResponse.Builder.class); + } + + public static final int TRACE_SCOPES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List traceScopes_; + + /** + * + * + *
+   * Optional. A list of trace scopes.
+   * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getTraceScopesList() { + return traceScopes_; + } + + /** + * + * + *
+   * Optional. A list of trace scopes.
+   * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getTraceScopesOrBuilderList() { + return traceScopes_; + } + + /** + * + * + *
+   * Optional. A list of trace scopes.
+   * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getTraceScopesCount() { + return traceScopes_.size(); + } + + /** + * + * + *
+   * Optional. A list of trace scopes.
+   * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.observability.v1.TraceScope getTraceScopes(int index) { + return traceScopes_.get(index); + } + + /** + * + * + *
+   * Optional. A list of trace scopes.
+   * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.observability.v1.TraceScopeOrBuilder getTraceScopesOrBuilder(int index) { + return traceScopes_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * Optional. If there might be more results than appear in this response, then
+   * `next_page_token` is included. To get the next set of results, call the
+   * same method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. If there might be more results than appear in this response, then
+   * `next_page_token` is included. To get the next set of results, call the
+   * same method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 < traceScopes_.size(); i++) { + output.writeMessage(1, traceScopes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < traceScopes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, traceScopes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.ListTraceScopesResponse)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.ListTraceScopesResponse other = + (com.google.cloud.observability.v1.ListTraceScopesResponse) obj; + + if (!getTraceScopesList().equals(other.getTraceScopesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTraceScopesCount() > 0) { + hash = (37 * hash) + TRACE_SCOPES_FIELD_NUMBER; + hash = (53 * hash) + getTraceScopesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.ListTraceScopesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListTraceScopesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListTraceScopesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListTraceScopesResponse 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.cloud.observability.v1.ListTraceScopesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListTraceScopesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListTraceScopesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListTraceScopesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListTraceScopesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListTraceScopesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListTraceScopesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListTraceScopesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.observability.v1.ListTraceScopesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response for listing TraceScopes.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.ListTraceScopesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.ListTraceScopesResponse) + com.google.cloud.observability.v1.ListTraceScopesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListTraceScopesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListTraceScopesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.ListTraceScopesResponse.class, + com.google.cloud.observability.v1.ListTraceScopesResponse.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.ListTraceScopesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (traceScopesBuilder_ == null) { + traceScopes_ = java.util.Collections.emptyList(); + } else { + traceScopes_ = null; + traceScopesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListTraceScopesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListTraceScopesResponse getDefaultInstanceForType() { + return com.google.cloud.observability.v1.ListTraceScopesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListTraceScopesResponse build() { + com.google.cloud.observability.v1.ListTraceScopesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListTraceScopesResponse buildPartial() { + com.google.cloud.observability.v1.ListTraceScopesResponse result = + new com.google.cloud.observability.v1.ListTraceScopesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.observability.v1.ListTraceScopesResponse result) { + if (traceScopesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + traceScopes_ = java.util.Collections.unmodifiableList(traceScopes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.traceScopes_ = traceScopes_; + } else { + result.traceScopes_ = traceScopesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.observability.v1.ListTraceScopesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.ListTraceScopesResponse) { + return mergeFrom((com.google.cloud.observability.v1.ListTraceScopesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.ListTraceScopesResponse other) { + if (other == com.google.cloud.observability.v1.ListTraceScopesResponse.getDefaultInstance()) + return this; + if (traceScopesBuilder_ == null) { + if (!other.traceScopes_.isEmpty()) { + if (traceScopes_.isEmpty()) { + traceScopes_ = other.traceScopes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTraceScopesIsMutable(); + traceScopes_.addAll(other.traceScopes_); + } + onChanged(); + } + } else { + if (!other.traceScopes_.isEmpty()) { + if (traceScopesBuilder_.isEmpty()) { + traceScopesBuilder_.dispose(); + traceScopesBuilder_ = null; + traceScopes_ = other.traceScopes_; + bitField0_ = (bitField0_ & ~0x00000001); + traceScopesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetTraceScopesFieldBuilder() + : null; + } else { + traceScopesBuilder_.addAllMessages(other.traceScopes_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.observability.v1.TraceScope m = + input.readMessage( + com.google.cloud.observability.v1.TraceScope.parser(), extensionRegistry); + if (traceScopesBuilder_ == null) { + ensureTraceScopesIsMutable(); + traceScopes_.add(m); + } else { + traceScopesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List traceScopes_ = + java.util.Collections.emptyList(); + + private void ensureTraceScopesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + traceScopes_ = + new java.util.ArrayList(traceScopes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.observability.v1.TraceScope, + com.google.cloud.observability.v1.TraceScope.Builder, + com.google.cloud.observability.v1.TraceScopeOrBuilder> + traceScopesBuilder_; + + /** + * + * + *
+     * Optional. A list of trace scopes.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getTraceScopesList() { + if (traceScopesBuilder_ == null) { + return java.util.Collections.unmodifiableList(traceScopes_); + } else { + return traceScopesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. A list of trace scopes.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getTraceScopesCount() { + if (traceScopesBuilder_ == null) { + return traceScopes_.size(); + } else { + return traceScopesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. A list of trace scopes.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.observability.v1.TraceScope getTraceScopes(int index) { + if (traceScopesBuilder_ == null) { + return traceScopes_.get(index); + } else { + return traceScopesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. A list of trace scopes.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTraceScopes(int index, com.google.cloud.observability.v1.TraceScope value) { + if (traceScopesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTraceScopesIsMutable(); + traceScopes_.set(index, value); + onChanged(); + } else { + traceScopesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of trace scopes.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTraceScopes( + int index, com.google.cloud.observability.v1.TraceScope.Builder builderForValue) { + if (traceScopesBuilder_ == null) { + ensureTraceScopesIsMutable(); + traceScopes_.set(index, builderForValue.build()); + onChanged(); + } else { + traceScopesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of trace scopes.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addTraceScopes(com.google.cloud.observability.v1.TraceScope value) { + if (traceScopesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTraceScopesIsMutable(); + traceScopes_.add(value); + onChanged(); + } else { + traceScopesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of trace scopes.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addTraceScopes(int index, com.google.cloud.observability.v1.TraceScope value) { + if (traceScopesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTraceScopesIsMutable(); + traceScopes_.add(index, value); + onChanged(); + } else { + traceScopesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of trace scopes.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addTraceScopes( + com.google.cloud.observability.v1.TraceScope.Builder builderForValue) { + if (traceScopesBuilder_ == null) { + ensureTraceScopesIsMutable(); + traceScopes_.add(builderForValue.build()); + onChanged(); + } else { + traceScopesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of trace scopes.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addTraceScopes( + int index, com.google.cloud.observability.v1.TraceScope.Builder builderForValue) { + if (traceScopesBuilder_ == null) { + ensureTraceScopesIsMutable(); + traceScopes_.add(index, builderForValue.build()); + onChanged(); + } else { + traceScopesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of trace scopes.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllTraceScopes( + java.lang.Iterable values) { + if (traceScopesBuilder_ == null) { + ensureTraceScopesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, traceScopes_); + onChanged(); + } else { + traceScopesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of trace scopes.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearTraceScopes() { + if (traceScopesBuilder_ == null) { + traceScopes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + traceScopesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of trace scopes.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeTraceScopes(int index) { + if (traceScopesBuilder_ == null) { + ensureTraceScopesIsMutable(); + traceScopes_.remove(index); + onChanged(); + } else { + traceScopesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of trace scopes.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.observability.v1.TraceScope.Builder getTraceScopesBuilder(int index) { + return internalGetTraceScopesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. A list of trace scopes.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.observability.v1.TraceScopeOrBuilder getTraceScopesOrBuilder( + int index) { + if (traceScopesBuilder_ == null) { + return traceScopes_.get(index); + } else { + return traceScopesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. A list of trace scopes.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getTraceScopesOrBuilderList() { + if (traceScopesBuilder_ != null) { + return traceScopesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(traceScopes_); + } + } + + /** + * + * + *
+     * Optional. A list of trace scopes.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.observability.v1.TraceScope.Builder addTraceScopesBuilder() { + return internalGetTraceScopesFieldBuilder() + .addBuilder(com.google.cloud.observability.v1.TraceScope.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A list of trace scopes.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.observability.v1.TraceScope.Builder addTraceScopesBuilder(int index) { + return internalGetTraceScopesFieldBuilder() + .addBuilder(index, com.google.cloud.observability.v1.TraceScope.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A list of trace scopes.
+     * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getTraceScopesBuilderList() { + return internalGetTraceScopesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.observability.v1.TraceScope, + com.google.cloud.observability.v1.TraceScope.Builder, + com.google.cloud.observability.v1.TraceScopeOrBuilder> + internalGetTraceScopesFieldBuilder() { + if (traceScopesBuilder_ == null) { + traceScopesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.observability.v1.TraceScope, + com.google.cloud.observability.v1.TraceScope.Builder, + com.google.cloud.observability.v1.TraceScopeOrBuilder>( + traceScopes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + traceScopes_ = null; + } + return traceScopesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * Optional. If there might be more results than appear in this response, then
+     * `next_page_token` is included. To get the next set of results, call the
+     * same method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. If there might be more results than appear in this response, then
+     * `next_page_token` is included. To get the next set of results, call the
+     * same method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. If there might be more results than appear in this response, then
+     * `next_page_token` is included. To get the next set of results, call the
+     * same method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If there might be more results than appear in this response, then
+     * `next_page_token` is included. To get the next set of results, call the
+     * same method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If there might be more results than appear in this response, then
+     * `next_page_token` is included. To get the next set of results, call the
+     * same method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.ListTraceScopesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.ListTraceScopesResponse) + private static final com.google.cloud.observability.v1.ListTraceScopesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.ListTraceScopesResponse(); + } + + public static com.google.cloud.observability.v1.ListTraceScopesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTraceScopesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListTraceScopesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListTraceScopesResponseOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListTraceScopesResponseOrBuilder.java new file mode 100644 index 000000000000..93d4919e852b --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListTraceScopesResponseOrBuilder.java @@ -0,0 +1,124 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface ListTraceScopesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.ListTraceScopesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. A list of trace scopes.
+   * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getTraceScopesList(); + + /** + * + * + *
+   * Optional. A list of trace scopes.
+   * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.observability.v1.TraceScope getTraceScopes(int index); + + /** + * + * + *
+   * Optional. A list of trace scopes.
+   * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getTraceScopesCount(); + + /** + * + * + *
+   * Optional. A list of trace scopes.
+   * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getTraceScopesOrBuilderList(); + + /** + * + * + *
+   * Optional. A list of trace scopes.
+   * 
+ * + * + * repeated .google.cloud.observability.v1.TraceScope trace_scopes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.observability.v1.TraceScopeOrBuilder getTraceScopesOrBuilder(int index); + + /** + * + * + *
+   * Optional. If there might be more results than appear in this response, then
+   * `next_page_token` is included. To get the next set of results, call the
+   * same method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * Optional. If there might be more results than appear in this response, then
+   * `next_page_token` is included. To get the next set of results, call the
+   * same method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListViewsRequest.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListViewsRequest.java new file mode 100644 index 000000000000..22d1c5fa1cc1 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListViewsRequest.java @@ -0,0 +1,925 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Request for listing views.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.ListViewsRequest} + */ +@com.google.protobuf.Generated +public final class ListViewsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.ListViewsRequest) + ListViewsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListViewsRequest"); + } + + // Use ListViewsRequest.newBuilder() to construct. + private ListViewsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListViewsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListViewsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListViewsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.ListViewsRequest.class, + com.google.cloud.observability.v1.ListViewsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Dataset whose views are to be listed. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+   * 
+ * + * + * 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. Dataset whose views are to be listed. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of views to return. If unspecified, then at
+   * most 100 views are returned. The maximum value is 1000; values above 1000
+   * are coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListViews` call. Provide
+   * this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListViews` call. Provide
+   * this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.ListViewsRequest)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.ListViewsRequest other = + (com.google.cloud.observability.v1.ListViewsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.ListViewsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.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.cloud.observability.v1.ListViewsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.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.cloud.observability.v1.ListViewsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListViewsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListViewsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListViewsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListViewsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListViewsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListViewsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListViewsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.observability.v1.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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for listing views.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.ListViewsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.ListViewsRequest) + com.google.cloud.observability.v1.ListViewsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListViewsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListViewsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.ListViewsRequest.class, + com.google.cloud.observability.v1.ListViewsRequest.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.ListViewsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListViewsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListViewsRequest getDefaultInstanceForType() { + return com.google.cloud.observability.v1.ListViewsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListViewsRequest build() { + com.google.cloud.observability.v1.ListViewsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListViewsRequest buildPartial() { + com.google.cloud.observability.v1.ListViewsRequest result = + new com.google.cloud.observability.v1.ListViewsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.ListViewsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.ListViewsRequest) { + return mergeFrom((com.google.cloud.observability.v1.ListViewsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.ListViewsRequest other) { + if (other == com.google.cloud.observability.v1.ListViewsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Dataset whose views are to be listed. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+     * 
+ * + * + * 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. Dataset whose views are to be listed. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+     * 
+ * + * + * 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. Dataset whose views are to be listed. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Dataset whose views are to be listed. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Dataset whose views are to be listed. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of views to return. If unspecified, then at
+     * most 100 views are returned. The maximum value is 1000; values above 1000
+     * are coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of views to return. If unspecified, then at
+     * most 100 views are returned. The maximum value is 1000; values above 1000
+     * are coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of views to return. If unspecified, then at
+     * most 100 views are returned. The maximum value is 1000; values above 1000
+     * are coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListViews` call. Provide
+     * this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListViews` call. Provide
+     * this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListViews` call. Provide
+     * this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListViews` call. Provide
+     * this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListViews` call. Provide
+     * this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.ListViewsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.ListViewsRequest) + private static final com.google.cloud.observability.v1.ListViewsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.ListViewsRequest(); + } + + public static com.google.cloud.observability.v1.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 { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListViewsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListViewsRequestOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListViewsRequestOrBuilder.java new file mode 100644 index 000000000000..ef0632f2e971 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListViewsRequestOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface ListViewsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.ListViewsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Dataset whose views are to be listed. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Dataset whose views are to be listed. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of views to return. If unspecified, then at
+   * most 100 views are returned. The maximum value is 1000; values above 1000
+   * are coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListViews` call. Provide
+   * this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListViews` call. Provide
+   * this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListViewsResponse.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListViewsResponse.java new file mode 100644 index 000000000000..b765af19a2f9 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListViewsResponse.java @@ -0,0 +1,1117 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Response for listing views.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.ListViewsResponse} + */ +@com.google.protobuf.Generated +public final class ListViewsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.ListViewsResponse) + ListViewsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListViewsResponse"); + } + + // Use ListViewsResponse.newBuilder() to construct. + private ListViewsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListViewsResponse() { + views_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListViewsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListViewsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.ListViewsResponse.class, + com.google.cloud.observability.v1.ListViewsResponse.Builder.class); + } + + public static final int VIEWS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List views_; + + /** + * + * + *
+   * The list of views.
+   * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + @java.lang.Override + public java.util.List getViewsList() { + return views_; + } + + /** + * + * + *
+   * The list of views.
+   * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + @java.lang.Override + public java.util.List + getViewsOrBuilderList() { + return views_; + } + + /** + * + * + *
+   * The list of views.
+   * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + @java.lang.Override + public int getViewsCount() { + return views_.size(); + } + + /** + * + * + *
+   * The list of views.
+   * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + @java.lang.Override + public com.google.cloud.observability.v1.View getViews(int index) { + return views_.get(index); + } + + /** + * + * + *
+   * The list of views.
+   * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + @java.lang.Override + public com.google.cloud.observability.v1.ViewOrBuilder getViewsOrBuilder(int index) { + return views_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * Optional. A token that can be sent as `page_token` to retrieve the next
+   * page. When this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A token that can be sent as `page_token` to retrieve the next
+   * page. When this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < views_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, views_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.ListViewsResponse)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.ListViewsResponse other = + (com.google.cloud.observability.v1.ListViewsResponse) obj; + + if (!getViewsList().equals(other.getViewsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.ListViewsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.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.cloud.observability.v1.ListViewsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.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.cloud.observability.v1.ListViewsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.ListViewsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListViewsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListViewsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListViewsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListViewsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.ListViewsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.ListViewsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.observability.v1.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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response for listing views.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.ListViewsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.ListViewsResponse) + com.google.cloud.observability.v1.ListViewsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListViewsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListViewsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.ListViewsResponse.class, + com.google.cloud.observability.v1.ListViewsResponse.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.ListViewsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (viewsBuilder_ == null) { + views_ = java.util.Collections.emptyList(); + } else { + views_ = null; + viewsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_ListViewsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListViewsResponse getDefaultInstanceForType() { + return com.google.cloud.observability.v1.ListViewsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListViewsResponse build() { + com.google.cloud.observability.v1.ListViewsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListViewsResponse buildPartial() { + com.google.cloud.observability.v1.ListViewsResponse result = + new com.google.cloud.observability.v1.ListViewsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.observability.v1.ListViewsResponse result) { + if (viewsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + views_ = java.util.Collections.unmodifiableList(views_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.views_ = views_; + } else { + result.views_ = viewsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.observability.v1.ListViewsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.ListViewsResponse) { + return mergeFrom((com.google.cloud.observability.v1.ListViewsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.ListViewsResponse other) { + if (other == com.google.cloud.observability.v1.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.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetViewsFieldBuilder() + : null; + } else { + viewsBuilder_.addAllMessages(other.views_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.observability.v1.View m = + input.readMessage( + com.google.cloud.observability.v1.View.parser(), extensionRegistry); + if (viewsBuilder_ == null) { + ensureViewsIsMutable(); + views_.add(m); + } else { + viewsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List views_ = + java.util.Collections.emptyList(); + + private void ensureViewsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + views_ = new java.util.ArrayList(views_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.observability.v1.View, + com.google.cloud.observability.v1.View.Builder, + com.google.cloud.observability.v1.ViewOrBuilder> + viewsBuilder_; + + /** + * + * + *
+     * The list of views.
+     * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + public java.util.List getViewsList() { + if (viewsBuilder_ == null) { + return java.util.Collections.unmodifiableList(views_); + } else { + return viewsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of views.
+     * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + public int getViewsCount() { + if (viewsBuilder_ == null) { + return views_.size(); + } else { + return viewsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of views.
+     * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + public com.google.cloud.observability.v1.View getViews(int index) { + if (viewsBuilder_ == null) { + return views_.get(index); + } else { + return viewsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of views.
+     * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + public Builder setViews(int index, com.google.cloud.observability.v1.View value) { + if (viewsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureViewsIsMutable(); + views_.set(index, value); + onChanged(); + } else { + viewsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of views.
+     * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + public Builder setViews( + int index, com.google.cloud.observability.v1.View.Builder builderForValue) { + if (viewsBuilder_ == null) { + ensureViewsIsMutable(); + views_.set(index, builderForValue.build()); + onChanged(); + } else { + viewsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of views.
+     * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + public Builder addViews(com.google.cloud.observability.v1.View value) { + if (viewsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureViewsIsMutable(); + views_.add(value); + onChanged(); + } else { + viewsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of views.
+     * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + public Builder addViews(int index, com.google.cloud.observability.v1.View value) { + if (viewsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureViewsIsMutable(); + views_.add(index, value); + onChanged(); + } else { + viewsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of views.
+     * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + public Builder addViews(com.google.cloud.observability.v1.View.Builder builderForValue) { + if (viewsBuilder_ == null) { + ensureViewsIsMutable(); + views_.add(builderForValue.build()); + onChanged(); + } else { + viewsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of views.
+     * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + public Builder addViews( + int index, com.google.cloud.observability.v1.View.Builder builderForValue) { + if (viewsBuilder_ == null) { + ensureViewsIsMutable(); + views_.add(index, builderForValue.build()); + onChanged(); + } else { + viewsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of views.
+     * 
+ * + * repeated .google.cloud.observability.v1.View 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; + } + + /** + * + * + *
+     * The list of views.
+     * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + public Builder clearViews() { + if (viewsBuilder_ == null) { + views_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + viewsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of views.
+     * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + public Builder removeViews(int index) { + if (viewsBuilder_ == null) { + ensureViewsIsMutable(); + views_.remove(index); + onChanged(); + } else { + viewsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of views.
+     * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + public com.google.cloud.observability.v1.View.Builder getViewsBuilder(int index) { + return internalGetViewsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of views.
+     * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + public com.google.cloud.observability.v1.ViewOrBuilder getViewsOrBuilder(int index) { + if (viewsBuilder_ == null) { + return views_.get(index); + } else { + return viewsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of views.
+     * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + public java.util.List + getViewsOrBuilderList() { + if (viewsBuilder_ != null) { + return viewsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(views_); + } + } + + /** + * + * + *
+     * The list of views.
+     * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + public com.google.cloud.observability.v1.View.Builder addViewsBuilder() { + return internalGetViewsFieldBuilder() + .addBuilder(com.google.cloud.observability.v1.View.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of views.
+     * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + public com.google.cloud.observability.v1.View.Builder addViewsBuilder(int index) { + return internalGetViewsFieldBuilder() + .addBuilder(index, com.google.cloud.observability.v1.View.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of views.
+     * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + public java.util.List getViewsBuilderList() { + return internalGetViewsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.observability.v1.View, + com.google.cloud.observability.v1.View.Builder, + com.google.cloud.observability.v1.ViewOrBuilder> + internalGetViewsFieldBuilder() { + if (viewsBuilder_ == null) { + viewsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.observability.v1.View, + com.google.cloud.observability.v1.View.Builder, + com.google.cloud.observability.v1.ViewOrBuilder>( + views_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + views_ = null; + } + return viewsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * Optional. A token that can be sent as `page_token` to retrieve the next
+     * page. When this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token that can be sent as `page_token` to retrieve the next
+     * page. When this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token that can be sent as `page_token` to retrieve the next
+     * page. When this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token that can be sent as `page_token` to retrieve the next
+     * page. When this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token that can be sent as `page_token` to retrieve the next
+     * page. When this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.ListViewsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.ListViewsResponse) + private static final com.google.cloud.observability.v1.ListViewsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.ListViewsResponse(); + } + + public static com.google.cloud.observability.v1.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 { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.ListViewsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListViewsResponseOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListViewsResponseOrBuilder.java new file mode 100644 index 000000000000..283f71d266bc --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ListViewsResponseOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface ListViewsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.ListViewsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of views.
+   * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + java.util.List getViewsList(); + + /** + * + * + *
+   * The list of views.
+   * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + com.google.cloud.observability.v1.View getViews(int index); + + /** + * + * + *
+   * The list of views.
+   * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + int getViewsCount(); + + /** + * + * + *
+   * The list of views.
+   * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + java.util.List getViewsOrBuilderList(); + + /** + * + * + *
+   * The list of views.
+   * 
+ * + * repeated .google.cloud.observability.v1.View views = 1; + */ + com.google.cloud.observability.v1.ViewOrBuilder getViewsOrBuilder(int index); + + /** + * + * + *
+   * Optional. A token that can be sent as `page_token` to retrieve the next
+   * page. When this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * Optional. A token that can be sent as `page_token` to retrieve the next
+   * page. When this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/LocationName.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/LocationName.java new file mode 100644 index 000000000000..05ef501c432d --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/LocationName.java @@ -0,0 +1,195 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.cloud.observability.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static @Nullable LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List<@Nullable LocationName> values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.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); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ObservabilityProto.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ObservabilityProto.java new file mode 100644 index 000000000000..67420cee836b --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ObservabilityProto.java @@ -0,0 +1,847 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public final class ObservabilityProto extends com.google.protobuf.GeneratedFile { + private ObservabilityProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ObservabilityProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_CmekSettings_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_CmekSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_Settings_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_Settings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_Bucket_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_Bucket_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_CreateBucketRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_CreateBucketRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_UpdateBucketRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_UpdateBucketRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_GetBucketRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_GetBucketRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_ListBucketsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_ListBucketsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_ListBucketsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_ListBucketsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_Dataset_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_Dataset_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_GetDatasetRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_GetDatasetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_ListDatasetsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_ListDatasetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_ListDatasetsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_ListDatasetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_View_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_View_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_GetViewRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_GetViewRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_ListViewsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_ListViewsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_ListViewsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_ListViewsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_Link_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_Link_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_CreateLinkRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_CreateLinkRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_UpdateLinkRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_UpdateLinkRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_GetLinkRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_GetLinkRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_ListLinksRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_ListLinksRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_ListLinksResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_ListLinksResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_DeleteLinkRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_DeleteLinkRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_Scope_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_Scope_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_GetScopeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_GetScopeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_UpdateScopeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_UpdateScopeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_TraceScope_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_TraceScope_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_CreateTraceScopeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_CreateTraceScopeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_GetTraceScopeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_GetTraceScopeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_ListTraceScopesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_ListTraceScopesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_ListTraceScopesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_ListTraceScopesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_UpdateTraceScopeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_UpdateTraceScopeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_DeleteTraceScopeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_DeleteTraceScopeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_GetSettingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_GetSettingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_observability_v1_UpdateSettingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_observability_v1_UpdateSettingsRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "1google/cloud/observability/v1/observability.proto\022\035google.cloud.observability." + + "v1\032\034google/api/annotations.proto\032\027google" + + "/api/client.proto\032\037google/api/field_beha" + + "vior.proto\032\031google/api/resource.proto\032#g" + + "oogle/longrunning/operations.proto\032\033google/protobuf/empty.proto\032" + + " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\"f\n" + + "\014CmekSettings\022\025\n" + + "\007kms_key\030\001 \001(\tB\004\342A\001\001\022\035\n" + + "\017kms_key_version\030\002 \001(\tB\004\342A\001\003\022 \n" + + "\022service_account_id\030\003 \001(\tB\004\342A\001\003\"\344\002\n" + + "\010Settings\022\022\n" + + "\004name\030\001 \001(\tB\004\342A\001\010\022&\n" + + "\030default_storage_location\030\002 \001(\tB\004\342A\001\001\022 \n" + + "\022service_account_id\030\003 \001(\tB\004\342A\001\003\022\032\n" + + "\014kms_key_name\030\004 \001(\tB\004\342A\001\001:\335\001\352A\331\001\n" + + "%observability.googleapis.com/Settings\0220projects/{project}/loca" + + "tions/{location}/settings\022:organizations/{organization}/locations/{location}/set" + + "tings\022.folders/{folder}/locations/{location}/settings*\010settings2\010settings\"\355\003\n" + + "\006Bucket\022\022\n" + + "\004name\030\001 \001(\tB\004\342A\001\010\022\032\n" + + "\014display_name\030\002 \001(\tB\004\342A\001\001\022\031\n" + + "\013description\030\003 \001(\tB\004\342A\001\001\0225\n" + + "\013create_time\030\004" + + " \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\0225\n" + + "\013update_time\030\005" + + " \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\0225\n" + + "\013delete_time\030\006" + + " \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\0224\n\n" + + "purge_time\030\007 \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\022H\n\r" + + "cmek_settings\030\t \001(" + + "\0132+.google.cloud.observability.v1.CmekSettingsB\004\342A\001\001:s\352Ap\n" + + "#observability.googleapis.com/Bucket\0228projects/{project}/locat" + + "ions/{location}/buckets/{bucket}*\007buckets2\006bucket\"\251\001\n" + + "\023CreateBucketRequest\022<\n" + + "\006parent\030\001 \001(" + + "\tB,\342A\001\002\372A%\022#observability.googleapis.com/Bucket\022\027\n" + + "\tbucket_id\030\002 \001(\tB\004\342A\001\002\022;\n" + + "\006bucket\030\003" + + " \001(\0132%.google.cloud.observability.v1.BucketB\004\342A\001\002\"\211\001\n" + + "\023UpdateBucketRequest\022;\n" + + "\006bucket\030\001" + + " \001(\0132%.google.cloud.observability.v1.BucketB\004\342A\001\002\0225\n" + + "\013update_mask\030\002" + + " \001(\0132\032.google.protobuf.FieldMaskB\004\342A\001\001\"N\n" + + "\020GetBucketRequest\022:\n" + + "\004name\030\001 \001(\tB,\342A\001\002\372A%\n" + + "#observability.googleapis.com/Bucket\"\241\001\n" + + "\022ListBucketsRequest\022<\n" + + "\006parent\030\001 \001(\t" + + "B,\342A\001\002\372A%\022#observability.googleapis.com/Bucket\022\027\n" + + "\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\n" + + "page_token\030\003 \001(\tB\004\342A\001\001\022\032\n" + + "\014show_deleted\030\004 \001(\010B\004\342A\001\001\"r\n" + + "\023ListBucketsResponse\022<\n" + + "\007buckets\030\001" + + " \003(\0132%.google.cloud.observability.v1.BucketB\004\342A\001\001\022\035\n" + + "\017next_page_token\030\002 \001(\tB\004\342A\001\001\"\205\003\n" + + "\007Dataset\022\022\n" + + "\004name\030\001 \001(\tB\004\342A\001\010\022\032\n" + + "\014display_name\030\002 \001(\tB\004\342A\001\001\022\031\n" + + "\013description\030\003 \001(\tB\004\342A\001\001\0225\n" + + "\013create_time\030\004" + + " \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\0225\n" + + "\013delete_time\030\005" + + " \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\0224\n\n" + + "purge_time\030\006" + + " \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003:\212\001\352A\206\001\n" + + "$observability.googleapis.com/Dataset\022Kprojects/{project}/lo" + + "cations/{location}/buckets/{bucket}/datasets/{dataset}*\010datasets2\007dataset\"P\n" + + "\021GetDatasetRequest\022;\n" + + "\004name\030\001 \001(\tB-\342A\001\002\372A&\n" + + "$observability.googleapis.com/Dataset\"\243\001\n" + + "\023ListDatasetsRequest\022=\n" + + "\006parent\030\001 \001(\tB-\342A\001" + + "\002\372A&\022$observability.googleapis.com/Dataset\022\027\n" + + "\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\n" + + "page_token\030\003 \001(\tB\004\342A\001\001\022\032\n" + + "\014show_deleted\030\004 \001(\010B\004\342A\001\001\"i\n" + + "\024ListDatasetsResponse\0228\n" + + "\010datasets\030\001 \003(\0132&.google.cloud.observability.v1.Dataset\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\320\002\n" + + "\004View\022\022\n" + + "\004name\030\001 \001(\tB\004\342A\001\010\022\032\n" + + "\014display_name\030\002 \001(\tB\004\342A\001\001\022\031\n" + + "\013description\030\006 \001(\tB\004\342A\001\001\0225\n" + + "\013create_time\030\004" + + " \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\0225\n" + + "\013update_time\030\005" + + " \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003:\216\001\352A\212\001\n" + + "!observability.googleapis.com/View\022Xprojects/{proj" + + "ect}/locations/{location}/buckets/{bucke" + + "t}/datasets/{dataset}/views/{view}*\005views2\004view\"J\n" + + "\016GetViewRequest\0228\n" + + "\004name\030\001 \001(\tB*\342A\001\002\372A#\n" + + "!observability.googleapis.com/View\"\201\001\n" + + "\020ListViewsRequest\022:\n" + + "\006parent\030\001 \001(\t" + + "B*\342A\001\002\372A#\022!observability.googleapis.com/View\022\027\n" + + "\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\n" + + "page_token\030\003 \001(\tB\004\342A\001\001\"f\n" + + "\021ListViewsResponse\0222\n" + + "\005views\030\001 \003(\0132#.google.cloud.observability.v1.View\022\035\n" + + "\017next_page_token\030\002 \001(\tB\004\342A\001\001\"\231\002\n" + + "\004Link\022\022\n" + + "\004name\030\001 \001(\tB\004\342A\001\010\022\032\n" + + "\014display_name\030\002 \001(\tB\004\342A\001\001\022\031\n" + + "\013description\030\003 \001(\tB\004\342A\001\001\0225\n" + + "\013create_time\030\004" + + " \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003:\216\001\352A\212\001\n" + + "!observability.googleapis.com/Link\022Xprojects/{project}" + + "/locations/{location}/buckets/{bucket}/d" + + "atasets/{dataset}/links/{link}*\005links2\004link\"\237\001\n" + + "\021CreateLinkRequest\022:\n" + + "\006parent\030\001 \001(" + + "\tB*\342A\001\002\372A#\022!observability.googleapis.com/Link\022\025\n" + + "\007link_id\030\002 \001(\tB\004\342A\001\002\0227\n" + + "\004link\030\003 \001" + + "(\0132#.google.cloud.observability.v1.LinkB\004\342A\001\002\"\203\001\n" + + "\021UpdateLinkRequest\0227\n" + + "\004link\030\001 \001(" + + "\0132#.google.cloud.observability.v1.LinkB\004\342A\001\002\0225\n" + + "\013update_mask\030\002" + + " \001(\0132\032.google.protobuf.FieldMaskB\004\342A\001\001\"J\n" + + "\016GetLinkRequest\0228\n" + + "\004name\030\001 \001(\tB*\342A\001\002\372A#\n" + + "!observability.googleapis.com/Link\"\201\001\n" + + "\020ListLinksRequest\022:\n" + + "\006parent\030\001 \001(" + + "\tB*\342A\001\002\372A#\022!observability.googleapis.com/Link\022\027\n" + + "\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\n" + + "page_token\030\003 \001(\tB\004\342A\001\001\"f\n" + + "\021ListLinksResponse\0222\n" + + "\005links\030\001 \003(\0132#.google.cloud.observability.v1.Link\022\035\n" + + "\017next_page_token\030\002 \001(\tB\004\342A\001\001\"M\n" + + "\021DeleteLinkRequest\0228\n" + + "\004name\030\001 \001(\tB*\342A\001\002\372A#\n" + + "!observability.googleapis.com/Link\"\202\002\n" + + "\005Scope\022\022\n" + + "\004name\030\001 \001(\tB\004\342A\001\010\0225\n" + + "\013update_time\030\003" + + " \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\022\035\n" + + "\tlog_scope\030\005 \001(\tB\n" + + "\342A\001\002\372A\003\n" + + "\001*\022\037\n" + + "\013trace_scope\030\006 \001(\tB\n" + + "\342A\001\002\372A\003\n" + + "\001*:n\352Ak\n" + + "\"observability.googleapis.com/Scope" + + "\0226projects/{project}/locations/{location}/scopes/{scope}*\006scopes2\005scope\"L\n" + + "\017GetScopeRequest\0229\n" + + "\004name\030\001 \001(\tB+\342A\001\002\372A$\n" + + "\"observability.googleapis.com/Scope\"\206\001\n" + + "\022UpdateScopeRequest\0225\n" + + "\013update_mask\030\001" + + " \001(\0132\032.google.protobuf.FieldMaskB\004\342A\001\001\0229\n" + + "\005scope\030\002 \001" + + "(\0132$.google.cloud.observability.v1.ScopeB\004\342A\001\002\"\207\002\n" + + "\021OperationMetadata\0225\n" + + "\013create_time\030\001" + + " \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\0222\n" + + "\010end_time\030\002" + + " \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\022\024\n" + + "\006target\030\003 \001(\tB\004\342A\001\003\022\022\n" + + "\004verb\030\004 \001(\tB\004\342A\001\003\022\034\n" + + "\016status_message\030\005 \001(\tB\004\342A\001\003\022$\n" + + "\026requested_cancellation\030\006 \001(\010B\004\342A\001\003\022\031\n" + + "\013api_version\030\007 \001(\tB\004\342A\001\003\"\331\002\n\n" + + "TraceScope\022\022\n" + + "\004name\030\001 \001(\tB\004\342A\001\010\022\"\n" + + "\016resource_names\030\002 \003(\tB\n" + + "\342A\001\002\372A\003\n" + + "\001*\022\031\n" + + "\013description\030\003 \001(\tB\004\342A\001\001\0225\n" + + "\013create_time\030\004" + + " \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\0225\n" + + "\013update_time\030\005" + + " \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003:\211\001\352A\205\001\n" + + "\'observability.googleapis.com/TraceScope\022Aprojects/{project}/locations/{" + + "location}/traceScopes/{trace_scope}*\013traceScopes2\n" + + "traceScope\"\277\001\n" + + "\027CreateTraceScopeRequest\022@\n" + + "\006parent\030\001 \001(" + + "\tB0\342A\001\002\372A)\022\'observability.googleapis.com/TraceScope\022\034\n" + + "\016trace_scope_id\030\002 \001(\tB\004\342A\001\002\022D\n" + + "\013trace_scope\030\003" + + " \001(\0132).google.cloud.observability.v1.TraceScopeB\004\342A\001\002\"V\n" + + "\024GetTraceScopeRequest\022>\n" + + "\004name\030\001 \001(\tB0\342A\001\002\372A)\n" + + "\'observability.googleapis.com/TraceScope\"\215\001\n" + + "\026ListTraceScopesRequest\022@\n" + + "\006parent\030\001 \001(" + + "\tB0\342A\001\002\372A)\022\'observability.googleapis.com/TraceScope\022\027\n" + + "\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\n" + + "page_token\030\003 \001(\tB\004\342A\001\001\"\177\n" + + "\027ListTraceScopesResponse\022E\n" + + "\014trace_scopes\030\001" + + " \003(\0132).google.cloud.observability.v1.TraceScopeB\004\342A\001\001\022\035\n" + + "\017next_page_token\030\002 \001(\tB\004\342A\001\001\"\226\001\n" + + "\027UpdateTraceScopeRequest\022D\n" + + "\013trace_scope\030\001" + + " \001(\0132).google.cloud.observability.v1.TraceScopeB\004\342A\001\002\0225\n" + + "\013update_mask\030\002" + + " \001(\0132\032.google.protobuf.FieldMaskB\004\342A\001\001\"Y\n" + + "\027DeleteTraceScopeRequest\022>\n" + + "\004name\030\001 \001(\tB0\342A\001\002\372A)\n" + + "\'observability.googleapis.com/TraceScope\"R\n" + + "\022GetSettingsRequest\022<\n" + + "\004name\030\001 \001(\tB.\342A\001\002\372A\'\n" + + "%observability.googleapis.com/Settings\"\217\001\n" + + "\025UpdateSettingsRequest\022?\n" + + "\010settings\030\001" + + " \001(\0132\'.google.cloud.observability.v1.SettingsB\004\342A\001\002\0225\n" + + "\013update_mask\030\002" + + " \001(\0132\032.google.protobuf.FieldMaskB\004\342A\001\0012\225$\n\r" + + "Observability\022\233\001\n" + + "\010GetScope\022..google.cloud.observability.v1.GetScop" + + "eRequest\032$.google.cloud.observability.v1" + + ".Scope\"9\332A\004name\202\323\344\223\002,\022*/v1/{name=projects/*/locations/*/scopes/*}\022\273\001\n" + + "\013UpdateScope\0221.google.cloud.observability.v1.Update" + + "ScopeRequest\032$.google.cloud.observabilit" + + "y.v1.Scope\"S\332A\021scope,update_mask\202\323\344\223\002920" + + "/v1/{scope.name=projects/*/locations/*/scopes/*}:\005scope\022\237\001\n" + + "\tGetBucket\022/.google.cloud.observability.v1.GetBucketRequest\032%" + + ".google.cloud.observability.v1.Bucket\":\332" + + "A\004name\202\323\344\223\002-\022+/v1/{name=projects/*/locations/*/buckets/*}\022\262\001\n" + + "\013ListBuckets\0221.google.cloud.observability.v1.ListBucketsReq" + + "uest\0322.google.cloud.observability.v1.Lis" + + "tBucketsResponse\"<\332A\006parent\202\323\344\223\002-\022+/v1/{" + + "parent=projects/*/locations/*}/buckets\022\326\001\n" + + "\014CreateBucket\0222.google.cloud.observabi" + + "lity.v1.CreateBucketRequest\032\035.google.longrunning.Operation\"s\312A\033\n" + + "\006Bucket\022\021OperationMetadata\332A\027parent,bucket,bucket_id\202\323\344\223" + + "\0025\"+/v1/{parent=projects/*/locations/*}/buckets:\006bucket\022\330\001\n" + + "\014UpdateBucket\0222.google.cloud.observability.v1.UpdateBucketReq" + + "uest\032\035.google.longrunning.Operation\"u\312A\033\n" + + "\006Bucket\022\021OperationMetadata\332A\022bucket,upd" + + "ate_mask\202\323\344\223\002<22/v1/{bucket.name=projects/*/locations/*/buckets/*}:\006bucket\022\255\001\n\n" + + "GetDataset\0220.google.cloud.observability.v" + + "1.GetDatasetRequest\032&.google.cloud.obser" + + "vability.v1.Dataset\"E\332A\004name\202\323\344\223\0028\0226/v1/" + + "{name=projects/*/locations/*/buckets/*/datasets/*}\022\300\001\n" + + "\014ListDatasets\0222.google.cloud.observability.v1.ListDatasetsRequest\032" + + "3.google.cloud.observability.v1.ListData" + + "setsResponse\"G\332A\006parent\202\323\344\223\0028\0226/v1/{pare" + + "nt=projects/*/locations/*/buckets/*}/datasets\022\254\001\n" + + "\007GetView\022-.google.cloud.observability.v1.GetViewRequest\032#.google.cloud." + + "observability.v1.View\"M\332A\004name\202\323\344\223\002@\022>/v" + + "1/{name=projects/*/locations/*/buckets/*/datasets/*/views/*}\022\277\001\n" + + "\tListViews\022/.google.cloud.observability.v1.ListViewsRequ" + + "est\0320.google.cloud.observability.v1.List" + + "ViewsResponse\"O\332A\006parent\202\323\344\223\002@\022>/v1/{par" + + "ent=projects/*/locations/*/buckets/*/datasets/*}/views\022\254\001\n" + + "\007GetLink\022-.google.cloud.observability.v1.GetLinkRequest\032#.goog" + + "le.cloud.observability.v1.Link\"M\332A\004name\202" + + "\323\344\223\002@\022>/v1/{name=projects/*/locations/*/buckets/*/datasets/*/links/*}\022\277\001\n" + + "\tListLinks\022/.google.cloud.observability.v1.List" + + "LinksRequest\0320.google.cloud.observabilit" + + "y.v1.ListLinksResponse\"O\332A\006parent\202\323\344\223\002@\022" + + ">/v1/{parent=projects/*/locations/*/buckets/*/datasets/*}/links\022\335\001\n\n" + + "CreateLink\0220.google.cloud.observability.v1.CreateLin" + + "kRequest\032\035.google.longrunning.Operation\"~\312A\031\n" + + "\004Link\022\021OperationMetadata\332A\023parent,l" + + "ink,link_id\202\323\344\223\002F\">/v1/{parent=projects/" + + "*/locations/*/buckets/*/datasets/*}/links:\004link\022\340\001\n\n" + + "UpdateLink\0220.google.cloud.ob" + + "servability.v1.UpdateLinkRequest\032\035.google.longrunning.Operation\"\200\001\312A\031\n" + + "\004Link\022\021OperationMetadata\332A\020link,update_mask\202\323\344\223\002K2" + + "C/v1/{link.name=projects/*/locations/*/buckets/*/datasets/*/links/*}:\004link\022\331\001\n\n" + + "DeleteLink\0220.google.cloud.observability.v" + + "1.DeleteLinkRequest\032\035.google.longrunning.Operation\"z\312A*\n" + + "\025google.protobuf.Empty\022\021" + + "OperationMetadata\332A\004name\202\323\344\223\002@*>/v1/{nam" + + "e=projects/*/locations/*/buckets/*/datasets/*/links/*}\022\257\001\n\r" + + "GetTraceScope\0223.google.cloud.observability.v1.GetTraceScopeRe" + + "quest\032).google.cloud.observability.v1.Tr" + + "aceScope\">\332A\004name\202\323\344\223\0021\022//v1/{name=projects/*/locations/*/traceScopes/*}\022\302\001\n" + + "\017ListTraceScopes\0225.google.cloud.observabilit" + + "y.v1.ListTraceScopesRequest\0326.google.cloud.observability.v1.ListTraceScopesRespo" + + "nse\"@\332A\006parent\202\323\344\223\0021\022//v1/{parent=projects/*/locations/*}/traceScopes\022\337\001\n" + + "\020CreateTraceScope\0226.google.cloud.observability." + + "v1.CreateTraceScopeRequest\032).google.clou" + + "d.observability.v1.TraceScope\"h\332A!parent" + + ",trace_scope,trace_scope_id\202\323\344\223\002>\"//v1/{" + + "parent=projects/*/locations/*}/traceScopes:\013trace_scope\022\341\001\n" + + "\020UpdateTraceScope\0226.google.cloud.observability.v1.UpdateTrace" + + "ScopeRequest\032).google.cloud.observabilit" + + "y.v1.TraceScope\"j\332A\027trace_scope,update_m" + + "ask\202\323\344\223\002J2;/v1/{trace_scope.name=project" + + "s/*/locations/*/traceScopes/*}:\013trace_scope\022\242\001\n" + + "\020DeleteTraceScope\0226.google.cloud.observability.v1.DeleteTraceScopeRequest" + + "\032\026.google.protobuf.Empty\">\332A\004name\202\323\344\223\0021*" + + "//v1/{name=projects/*/locations/*/traceScopes/*}\022\206\002\n" + + "\013GetSettings\0221.google.cloud.observability.v1.GetSettingsRequest\032\'.go" + + "ogle.cloud.observability.v1.Settings\"\232\001\332" + + "A\004name\202\323\344\223\002\214\001\022*/v1/{name=projects/*/loca" + + "tions/*/settings}Z+\022)/v1/{name=folders/*" + + "/locations/*/settings}Z1\022//v1/{name=organizations/*/locations/*/settings}\022\353\002\n" + + "\016UpdateSettings\0224.google.cloud.observabilit" + + "y.v1.UpdateSettingsRequest\032\035.google.longrunning.Operation\"\203\002\312A\035\n" + + "\010Settings\022\021OperationMetadata\332A\024settings,update_mask\202\323\344\223\002" + + "\305\00123/v1/{settings.name=projects/*/locati" + + "ons/*/settings}:\010settingsZ>22/v1/{settings.name=folders/*/locations/*/settings}:" + + "\010settingsZD28/v1/{settings.name=organiza" + + "tions/*/locations/*/settings}:\010settings\032" + + "P\312A\034observability.googleapis.com\322A.https" + + "://www.googleapis.com/auth/cloud-platformB\345\001\n" + + "!com.google.cloud.observability.v1B\022ObservabilityProtoP\001ZGcloud.google.com/" + + "go/observability/apiv1/observabilitypb;o" + + "bservabilitypb\252\002\035Google.Cloud.Observabil" + + "ity.V1\312\002\035Google\\Cloud\\Observability\\V1\352\002" + + " Google::Cloud::Observability::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_observability_v1_CmekSettings_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_observability_v1_CmekSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_CmekSettings_descriptor, + new java.lang.String[] { + "KmsKey", "KmsKeyVersion", "ServiceAccountId", + }); + internal_static_google_cloud_observability_v1_Settings_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_observability_v1_Settings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_Settings_descriptor, + new java.lang.String[] { + "Name", "DefaultStorageLocation", "ServiceAccountId", "KmsKeyName", + }); + internal_static_google_cloud_observability_v1_Bucket_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_cloud_observability_v1_Bucket_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_Bucket_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "Description", + "CreateTime", + "UpdateTime", + "DeleteTime", + "PurgeTime", + "CmekSettings", + }); + internal_static_google_cloud_observability_v1_CreateBucketRequest_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_cloud_observability_v1_CreateBucketRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_CreateBucketRequest_descriptor, + new java.lang.String[] { + "Parent", "BucketId", "Bucket", + }); + internal_static_google_cloud_observability_v1_UpdateBucketRequest_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_cloud_observability_v1_UpdateBucketRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_UpdateBucketRequest_descriptor, + new java.lang.String[] { + "Bucket", "UpdateMask", + }); + internal_static_google_cloud_observability_v1_GetBucketRequest_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_cloud_observability_v1_GetBucketRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_GetBucketRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_observability_v1_ListBucketsRequest_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_cloud_observability_v1_ListBucketsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_ListBucketsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "ShowDeleted", + }); + internal_static_google_cloud_observability_v1_ListBucketsResponse_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_cloud_observability_v1_ListBucketsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_ListBucketsResponse_descriptor, + new java.lang.String[] { + "Buckets", "NextPageToken", + }); + internal_static_google_cloud_observability_v1_Dataset_descriptor = + getDescriptor().getMessageType(8); + internal_static_google_cloud_observability_v1_Dataset_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_Dataset_descriptor, + new java.lang.String[] { + "Name", "DisplayName", "Description", "CreateTime", "DeleteTime", "PurgeTime", + }); + internal_static_google_cloud_observability_v1_GetDatasetRequest_descriptor = + getDescriptor().getMessageType(9); + internal_static_google_cloud_observability_v1_GetDatasetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_GetDatasetRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_observability_v1_ListDatasetsRequest_descriptor = + getDescriptor().getMessageType(10); + internal_static_google_cloud_observability_v1_ListDatasetsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_ListDatasetsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "ShowDeleted", + }); + internal_static_google_cloud_observability_v1_ListDatasetsResponse_descriptor = + getDescriptor().getMessageType(11); + internal_static_google_cloud_observability_v1_ListDatasetsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_ListDatasetsResponse_descriptor, + new java.lang.String[] { + "Datasets", "NextPageToken", + }); + internal_static_google_cloud_observability_v1_View_descriptor = + getDescriptor().getMessageType(12); + internal_static_google_cloud_observability_v1_View_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_View_descriptor, + new java.lang.String[] { + "Name", "DisplayName", "Description", "CreateTime", "UpdateTime", + }); + internal_static_google_cloud_observability_v1_GetViewRequest_descriptor = + getDescriptor().getMessageType(13); + internal_static_google_cloud_observability_v1_GetViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_GetViewRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_observability_v1_ListViewsRequest_descriptor = + getDescriptor().getMessageType(14); + internal_static_google_cloud_observability_v1_ListViewsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_ListViewsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_observability_v1_ListViewsResponse_descriptor = + getDescriptor().getMessageType(15); + internal_static_google_cloud_observability_v1_ListViewsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_ListViewsResponse_descriptor, + new java.lang.String[] { + "Views", "NextPageToken", + }); + internal_static_google_cloud_observability_v1_Link_descriptor = + getDescriptor().getMessageType(16); + internal_static_google_cloud_observability_v1_Link_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_Link_descriptor, + new java.lang.String[] { + "Name", "DisplayName", "Description", "CreateTime", + }); + internal_static_google_cloud_observability_v1_CreateLinkRequest_descriptor = + getDescriptor().getMessageType(17); + internal_static_google_cloud_observability_v1_CreateLinkRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_CreateLinkRequest_descriptor, + new java.lang.String[] { + "Parent", "LinkId", "Link", + }); + internal_static_google_cloud_observability_v1_UpdateLinkRequest_descriptor = + getDescriptor().getMessageType(18); + internal_static_google_cloud_observability_v1_UpdateLinkRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_UpdateLinkRequest_descriptor, + new java.lang.String[] { + "Link", "UpdateMask", + }); + internal_static_google_cloud_observability_v1_GetLinkRequest_descriptor = + getDescriptor().getMessageType(19); + internal_static_google_cloud_observability_v1_GetLinkRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_GetLinkRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_observability_v1_ListLinksRequest_descriptor = + getDescriptor().getMessageType(20); + internal_static_google_cloud_observability_v1_ListLinksRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_ListLinksRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_observability_v1_ListLinksResponse_descriptor = + getDescriptor().getMessageType(21); + internal_static_google_cloud_observability_v1_ListLinksResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_ListLinksResponse_descriptor, + new java.lang.String[] { + "Links", "NextPageToken", + }); + internal_static_google_cloud_observability_v1_DeleteLinkRequest_descriptor = + getDescriptor().getMessageType(22); + internal_static_google_cloud_observability_v1_DeleteLinkRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_DeleteLinkRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_observability_v1_Scope_descriptor = + getDescriptor().getMessageType(23); + internal_static_google_cloud_observability_v1_Scope_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_Scope_descriptor, + new java.lang.String[] { + "Name", "UpdateTime", "LogScope", "TraceScope", + }); + internal_static_google_cloud_observability_v1_GetScopeRequest_descriptor = + getDescriptor().getMessageType(24); + internal_static_google_cloud_observability_v1_GetScopeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_GetScopeRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_observability_v1_UpdateScopeRequest_descriptor = + getDescriptor().getMessageType(25); + internal_static_google_cloud_observability_v1_UpdateScopeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_UpdateScopeRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Scope", + }); + internal_static_google_cloud_observability_v1_OperationMetadata_descriptor = + getDescriptor().getMessageType(26); + internal_static_google_cloud_observability_v1_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_OperationMetadata_descriptor, + new java.lang.String[] { + "CreateTime", + "EndTime", + "Target", + "Verb", + "StatusMessage", + "RequestedCancellation", + "ApiVersion", + }); + internal_static_google_cloud_observability_v1_TraceScope_descriptor = + getDescriptor().getMessageType(27); + internal_static_google_cloud_observability_v1_TraceScope_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_TraceScope_descriptor, + new java.lang.String[] { + "Name", "ResourceNames", "Description", "CreateTime", "UpdateTime", + }); + internal_static_google_cloud_observability_v1_CreateTraceScopeRequest_descriptor = + getDescriptor().getMessageType(28); + internal_static_google_cloud_observability_v1_CreateTraceScopeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_CreateTraceScopeRequest_descriptor, + new java.lang.String[] { + "Parent", "TraceScopeId", "TraceScope", + }); + internal_static_google_cloud_observability_v1_GetTraceScopeRequest_descriptor = + getDescriptor().getMessageType(29); + internal_static_google_cloud_observability_v1_GetTraceScopeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_GetTraceScopeRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_observability_v1_ListTraceScopesRequest_descriptor = + getDescriptor().getMessageType(30); + internal_static_google_cloud_observability_v1_ListTraceScopesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_ListTraceScopesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_observability_v1_ListTraceScopesResponse_descriptor = + getDescriptor().getMessageType(31); + internal_static_google_cloud_observability_v1_ListTraceScopesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_ListTraceScopesResponse_descriptor, + new java.lang.String[] { + "TraceScopes", "NextPageToken", + }); + internal_static_google_cloud_observability_v1_UpdateTraceScopeRequest_descriptor = + getDescriptor().getMessageType(32); + internal_static_google_cloud_observability_v1_UpdateTraceScopeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_UpdateTraceScopeRequest_descriptor, + new java.lang.String[] { + "TraceScope", "UpdateMask", + }); + internal_static_google_cloud_observability_v1_DeleteTraceScopeRequest_descriptor = + getDescriptor().getMessageType(33); + internal_static_google_cloud_observability_v1_DeleteTraceScopeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_DeleteTraceScopeRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_observability_v1_GetSettingsRequest_descriptor = + getDescriptor().getMessageType(34); + internal_static_google_cloud_observability_v1_GetSettingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_GetSettingsRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_observability_v1_UpdateSettingsRequest_descriptor = + getDescriptor().getMessageType(35); + internal_static_google_cloud_observability_v1_UpdateSettingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_observability_v1_UpdateSettingsRequest_descriptor, + new java.lang.String[] { + "Settings", "UpdateMask", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/OperationMetadata.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/OperationMetadata.java new file mode 100644 index 000000000000..c93d4ea8cd96 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/OperationMetadata.java @@ -0,0 +1,1869 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Represents the metadata of the long-running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.OperationMetadata} + */ +@com.google.protobuf.Generated +public final class OperationMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "OperationMetadata"); + } + + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.OperationMetadata.class, + com.google.cloud.observability.v1.OperationMetadata.Builder.class); + } + + private int bitField0_; + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.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 time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int TARGET_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + 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(); + target_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object verb_ = ""; + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + 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(); + verb_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object statusMessage_ = ""; + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + 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(); + statusMessage_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_ = false; + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have been cancelled successfully
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object apiVersion_ = ""; + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + 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(); + apiVersion_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, target_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(verb_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, verb_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(statusMessage_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(apiVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, apiVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, target_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(verb_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, verb_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(apiVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, apiVersion_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.OperationMetadata other = + (com.google.cloud.observability.v1.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getVerb().equals(other.getVerb())) return false; + if (!getStatusMessage().equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() != other.getRequestedCancellation()) return false; + if (!getApiVersion().equals(other.getApiVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.OperationMetadata 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.cloud.observability.v1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.OperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.OperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.observability.v1.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the metadata of the long-running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.OperationMetadata) + com.google.cloud.observability.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.OperationMetadata.class, + com.google.cloud.observability.v1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + requestedCancellation_ = false; + apiVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.observability.v1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.OperationMetadata build() { + com.google.cloud.observability.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.OperationMetadata buildPartial() { + com.google.cloud.observability.v1.OperationMetadata result = + new com.google.cloud.observability.v1.OperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.OperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.verb_ = verb_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.statusMessage_ = statusMessage_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.requestedCancellation_ = requestedCancellation_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.apiVersion_ = apiVersion_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.OperationMetadata) { + return mergeFrom((com.google.cloud.observability.v1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.OperationMetadata other) { + if (other == com.google.cloud.observability.v1.OperationMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + verb_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + requestedCancellation_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + apiVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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 time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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 time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + verb_ = getDefaultInstance().getVerb(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + statusMessage_ = getDefaultInstance().getStatusMessage(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean requestedCancellation_; + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have been cancelled successfully
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have been cancelled successfully
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have been cancelled successfully
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + bitField0_ = (bitField0_ & ~0x00000020); + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + apiVersion_ = getDefaultInstance().getApiVersion(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.OperationMetadata) + private static final com.google.cloud.observability.v1.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.OperationMetadata(); + } + + public static com.google.cloud.observability.v1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/OperationMetadataOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..bf47ad0a8e2f --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,229 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + java.lang.String getTarget(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + java.lang.String getVerb(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString getStatusMessageBytes(); + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have been cancelled successfully
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/Scope.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/Scope.java new file mode 100644 index 000000000000..a3ff0870d72b --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/Scope.java @@ -0,0 +1,1398 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Message describing Scope object
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.Scope} + */ +@com.google.protobuf.Generated +public final class Scope extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.Scope) + ScopeOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Scope"); + } + + // Use Scope.newBuilder() to construct. + private Scope(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Scope() { + name_ = ""; + logScope_ = ""; + traceScope_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Scope_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Scope_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.Scope.class, + com.google.cloud.observability.v1.Scope.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. Name of the resource. The format is:
+   *
+   * projects/{project}/locations/{location}/scopes/{scope}
+   *
+   * The `{location}` field must be set to `global`. The `{scope}` field must
+   * be set to `_Default`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. Name of the resource. The format is:
+   *
+   * projects/{project}/locations/{location}/scopes/{scope}
+   *
+   * The `{location}` field must be set to `global`. The `{scope}` field must
+   * be set to `_Default`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. Update timestamp.
+   * Note: The Update timestamp for the default scope is initially unset.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Update timestamp.
+   * Note: The Update timestamp for the default scope is initially unset.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.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. Update timestamp.
+   * Note: The Update timestamp for the default scope is initially unset.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LOG_SCOPE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object logScope_ = ""; + + /** + * + * + *
+   * Required. The full resource name of the `logging.googleapis.com/LogScope`.
+   * For example:
+   *
+   * //logging.googleapis.com/projects/myproject/locations/global/logScopes/my-log-scope
+   * 
+ * + * + * string log_scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The logScope. + */ + @java.lang.Override + public java.lang.String getLogScope() { + java.lang.Object ref = logScope_; + 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(); + logScope_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The full resource name of the `logging.googleapis.com/LogScope`.
+   * For example:
+   *
+   * //logging.googleapis.com/projects/myproject/locations/global/logScopes/my-log-scope
+   * 
+ * + * + * string log_scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for logScope. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLogScopeBytes() { + java.lang.Object ref = logScope_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + logScope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRACE_SCOPE_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object traceScope_ = ""; + + /** + * + * + *
+   * Required. The unqualified resource name of the
+   * `cloudtrace.googleapis.com/TraceScope`. For example:
+   *
+   * projects/myproject/locations/global/traceScopes/my-trace-scope
+   * 
+ * + * + * string trace_scope = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The traceScope. + */ + @java.lang.Override + public java.lang.String getTraceScope() { + java.lang.Object ref = traceScope_; + 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(); + traceScope_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The unqualified resource name of the
+   * `cloudtrace.googleapis.com/TraceScope`. For example:
+   *
+   * projects/myproject/locations/global/traceScopes/my-trace-scope
+   * 
+ * + * + * string trace_scope = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for traceScope. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTraceScopeBytes() { + java.lang.Object ref = traceScope_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + traceScope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(logScope_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, logScope_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(traceScope_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, traceScope_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(logScope_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, logScope_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(traceScope_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, traceScope_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.Scope)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.Scope other = (com.google.cloud.observability.v1.Scope) obj; + + if (!getName().equals(other.getName())) return false; + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getLogScope().equals(other.getLogScope())) return false; + if (!getTraceScope().equals(other.getTraceScope())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + LOG_SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getLogScope().hashCode(); + hash = (37 * hash) + TRACE_SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getTraceScope().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.Scope parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.Scope parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.Scope parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.Scope 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.cloud.observability.v1.Scope parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.Scope parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.Scope parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.Scope parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.Scope parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.Scope parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.Scope parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.Scope parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.observability.v1.Scope prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message describing Scope object
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.Scope} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.Scope) + com.google.cloud.observability.v1.ScopeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Scope_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Scope_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.Scope.class, + com.google.cloud.observability.v1.Scope.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.Scope.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + logScope_ = ""; + traceScope_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Scope_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.Scope getDefaultInstanceForType() { + return com.google.cloud.observability.v1.Scope.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.Scope build() { + com.google.cloud.observability.v1.Scope result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.Scope buildPartial() { + com.google.cloud.observability.v1.Scope result = + new com.google.cloud.observability.v1.Scope(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.Scope result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.logScope_ = logScope_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.traceScope_ = traceScope_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.Scope) { + return mergeFrom((com.google.cloud.observability.v1.Scope) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.Scope other) { + if (other == com.google.cloud.observability.v1.Scope.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getLogScope().isEmpty()) { + logScope_ = other.logScope_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getTraceScope().isEmpty()) { + traceScope_ = other.traceScope_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 42: + { + logScope_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 42 + case 50: + { + traceScope_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. Name of the resource. The format is:
+     *
+     * projects/{project}/locations/{location}/scopes/{scope}
+     *
+     * The `{location}` field must be set to `global`. The `{scope}` field must
+     * be set to `_Default`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. Name of the resource. The format is:
+     *
+     * projects/{project}/locations/{location}/scopes/{scope}
+     *
+     * The `{location}` field must be set to `global`. The `{scope}` field must
+     * be set to `_Default`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. Name of the resource. The format is:
+     *
+     * projects/{project}/locations/{location}/scopes/{scope}
+     *
+     * The `{location}` field must be set to `global`. The `{scope}` field must
+     * be set to `_Default`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Name of the resource. The format is:
+     *
+     * projects/{project}/locations/{location}/scopes/{scope}
+     *
+     * The `{location}` field must be set to `global`. The `{scope}` field must
+     * be set to `_Default`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Name of the resource. The format is:
+     *
+     * projects/{project}/locations/{location}/scopes/{scope}
+     *
+     * The `{location}` field must be set to `global`. The `{scope}` field must
+     * be set to `_Default`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. Update timestamp.
+     * Note: The Update timestamp for the default scope is initially unset.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. Update timestamp.
+     * Note: The Update timestamp for the default scope is initially unset.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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. Update timestamp.
+     * Note: The Update timestamp for the default scope is initially unset.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Update timestamp.
+     * Note: The Update timestamp for the default scope is initially unset.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Update timestamp.
+     * Note: The Update timestamp for the default scope is initially unset.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Update timestamp.
+     * Note: The Update timestamp for the default scope is initially unset.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Update timestamp.
+     * Note: The Update timestamp for the default scope is initially unset.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Update timestamp.
+     * Note: The Update timestamp for the default scope is initially unset.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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. Update timestamp.
+     * Note: The Update timestamp for the default scope is initially unset.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object logScope_ = ""; + + /** + * + * + *
+     * Required. The full resource name of the `logging.googleapis.com/LogScope`.
+     * For example:
+     *
+     * //logging.googleapis.com/projects/myproject/locations/global/logScopes/my-log-scope
+     * 
+ * + * + * string log_scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The logScope. + */ + public java.lang.String getLogScope() { + java.lang.Object ref = logScope_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logScope_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The full resource name of the `logging.googleapis.com/LogScope`.
+     * For example:
+     *
+     * //logging.googleapis.com/projects/myproject/locations/global/logScopes/my-log-scope
+     * 
+ * + * + * string log_scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for logScope. + */ + public com.google.protobuf.ByteString getLogScopeBytes() { + java.lang.Object ref = logScope_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + logScope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The full resource name of the `logging.googleapis.com/LogScope`.
+     * For example:
+     *
+     * //logging.googleapis.com/projects/myproject/locations/global/logScopes/my-log-scope
+     * 
+ * + * + * string log_scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The logScope to set. + * @return This builder for chaining. + */ + public Builder setLogScope(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + logScope_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The full resource name of the `logging.googleapis.com/LogScope`.
+     * For example:
+     *
+     * //logging.googleapis.com/projects/myproject/locations/global/logScopes/my-log-scope
+     * 
+ * + * + * string log_scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearLogScope() { + logScope_ = getDefaultInstance().getLogScope(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The full resource name of the `logging.googleapis.com/LogScope`.
+     * For example:
+     *
+     * //logging.googleapis.com/projects/myproject/locations/global/logScopes/my-log-scope
+     * 
+ * + * + * string log_scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for logScope to set. + * @return This builder for chaining. + */ + public Builder setLogScopeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + logScope_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object traceScope_ = ""; + + /** + * + * + *
+     * Required. The unqualified resource name of the
+     * `cloudtrace.googleapis.com/TraceScope`. For example:
+     *
+     * projects/myproject/locations/global/traceScopes/my-trace-scope
+     * 
+ * + * + * string trace_scope = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The traceScope. + */ + public java.lang.String getTraceScope() { + java.lang.Object ref = traceScope_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + traceScope_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The unqualified resource name of the
+     * `cloudtrace.googleapis.com/TraceScope`. For example:
+     *
+     * projects/myproject/locations/global/traceScopes/my-trace-scope
+     * 
+ * + * + * string trace_scope = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for traceScope. + */ + public com.google.protobuf.ByteString getTraceScopeBytes() { + java.lang.Object ref = traceScope_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + traceScope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The unqualified resource name of the
+     * `cloudtrace.googleapis.com/TraceScope`. For example:
+     *
+     * projects/myproject/locations/global/traceScopes/my-trace-scope
+     * 
+ * + * + * string trace_scope = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The traceScope to set. + * @return This builder for chaining. + */ + public Builder setTraceScope(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + traceScope_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The unqualified resource name of the
+     * `cloudtrace.googleapis.com/TraceScope`. For example:
+     *
+     * projects/myproject/locations/global/traceScopes/my-trace-scope
+     * 
+ * + * + * string trace_scope = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearTraceScope() { + traceScope_ = getDefaultInstance().getTraceScope(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The unqualified resource name of the
+     * `cloudtrace.googleapis.com/TraceScope`. For example:
+     *
+     * projects/myproject/locations/global/traceScopes/my-trace-scope
+     * 
+ * + * + * string trace_scope = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for traceScope to set. + * @return This builder for chaining. + */ + public Builder setTraceScopeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + traceScope_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.Scope) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.Scope) + private static final com.google.cloud.observability.v1.Scope DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.Scope(); + } + + public static com.google.cloud.observability.v1.Scope getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Scope parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.Scope getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ScopeName.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ScopeName.java new file mode 100644 index 000000000000..1749ea3d648e --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ScopeName.java @@ -0,0 +1,226 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.cloud.observability.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class ScopeName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_SCOPE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/scopes/{scope}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String scope; + + @Deprecated + protected ScopeName() { + project = null; + location = null; + scope = null; + } + + private ScopeName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + scope = Preconditions.checkNotNull(builder.getScope()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getScope() { + return scope; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ScopeName of(String project, String location, String scope) { + return newBuilder().setProject(project).setLocation(location).setScope(scope).build(); + } + + public static String format(String project, String location, String scope) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setScope(scope) + .build() + .toString(); + } + + public static @Nullable ScopeName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_SCOPE.validatedMatch( + formattedString, "ScopeName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("scope")); + } + + 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<@Nullable ScopeName> values) { + List list = new ArrayList<>(values.size()); + for (ScopeName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_SCOPE.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 (scope != null) { + fieldMapBuilder.put("scope", scope); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_SCOPE.instantiate( + "project", project, "location", location, "scope", scope); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ScopeName that = ((ScopeName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.scope, that.scope); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(scope); + return h; + } + + /** Builder for projects/{project}/locations/{location}/scopes/{scope}. */ + public static class Builder { + private String project; + private String location; + private String scope; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getScope() { + return scope; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setScope(String scope) { + this.scope = scope; + return this; + } + + private Builder(ScopeName scopeName) { + this.project = scopeName.project; + this.location = scopeName.location; + this.scope = scopeName.scope; + } + + public ScopeName build() { + return new ScopeName(this); + } + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ScopeOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ScopeOrBuilder.java new file mode 100644 index 000000000000..dd1b47769f3b --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ScopeOrBuilder.java @@ -0,0 +1,179 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface ScopeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.Scope) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. Name of the resource. The format is:
+   *
+   * projects/{project}/locations/{location}/scopes/{scope}
+   *
+   * The `{location}` field must be set to `global`. The `{scope}` field must
+   * be set to `_Default`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. Name of the resource. The format is:
+   *
+   * projects/{project}/locations/{location}/scopes/{scope}
+   *
+   * The `{location}` field must be set to `global`. The `{scope}` field must
+   * be set to `_Default`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Update timestamp.
+   * Note: The Update timestamp for the default scope is initially unset.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. Update timestamp.
+   * Note: The Update timestamp for the default scope is initially unset.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. Update timestamp.
+   * Note: The Update timestamp for the default scope is initially unset.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Required. The full resource name of the `logging.googleapis.com/LogScope`.
+   * For example:
+   *
+   * //logging.googleapis.com/projects/myproject/locations/global/logScopes/my-log-scope
+   * 
+ * + * + * string log_scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The logScope. + */ + java.lang.String getLogScope(); + + /** + * + * + *
+   * Required. The full resource name of the `logging.googleapis.com/LogScope`.
+   * For example:
+   *
+   * //logging.googleapis.com/projects/myproject/locations/global/logScopes/my-log-scope
+   * 
+ * + * + * string log_scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for logScope. + */ + com.google.protobuf.ByteString getLogScopeBytes(); + + /** + * + * + *
+   * Required. The unqualified resource name of the
+   * `cloudtrace.googleapis.com/TraceScope`. For example:
+   *
+   * projects/myproject/locations/global/traceScopes/my-trace-scope
+   * 
+ * + * + * string trace_scope = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The traceScope. + */ + java.lang.String getTraceScope(); + + /** + * + * + *
+   * Required. The unqualified resource name of the
+   * `cloudtrace.googleapis.com/TraceScope`. For example:
+   *
+   * projects/myproject/locations/global/traceScopes/my-trace-scope
+   * 
+ * + * + * string trace_scope = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for traceScope. + */ + com.google.protobuf.ByteString getTraceScopeBytes(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/Settings.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/Settings.java new file mode 100644 index 000000000000..194aa75a7480 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/Settings.java @@ -0,0 +1,1253 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Describes the settings associated with a project, organization, or folder.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.Settings} + */ +@com.google.protobuf.Generated +public final class Settings extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.Settings) + SettingsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Settings"); + } + + // Use Settings.newBuilder() to construct. + private Settings(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Settings() { + name_ = ""; + defaultStorageLocation_ = ""; + serviceAccountId_ = ""; + kmsKeyName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Settings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Settings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.Settings.class, + com.google.cloud.observability.v1.Settings.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The resource name of the settings.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The resource name of the settings.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_STORAGE_LOCATION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object defaultStorageLocation_ = ""; + + /** + * + * + *
+   * Optional. The location which should be used when any regional resources are
+   * provisioned by Google Cloud.
+   * 
+ * + * string default_storage_location = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The defaultStorageLocation. + */ + @java.lang.Override + public java.lang.String getDefaultStorageLocation() { + java.lang.Object ref = defaultStorageLocation_; + 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(); + defaultStorageLocation_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The location which should be used when any regional resources are
+   * provisioned by Google Cloud.
+   * 
+ * + * string default_storage_location = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for defaultStorageLocation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDefaultStorageLocationBytes() { + java.lang.Object ref = defaultStorageLocation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + defaultStorageLocation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ACCOUNT_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAccountId_ = ""; + + /** + * + * + *
+   * Output only. The service account for the given resource container, such as
+   * project or folder. This will be used by Cloud Observability to perform
+   * actions in the container's project like access KMS keys or create Links.
+   * Always the same service account per resource container regardless of
+   * region.
+   * 
+ * + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceAccountId. + */ + @java.lang.Override + public java.lang.String getServiceAccountId() { + java.lang.Object ref = serviceAccountId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccountId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The service account for the given resource container, such as
+   * project or folder. This will be used by Cloud Observability to perform
+   * actions in the container's project like access KMS keys or create Links.
+   * Always the same service account per resource container regardless of
+   * region.
+   * 
+ * + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceAccountId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountIdBytes() { + java.lang.Object ref = serviceAccountId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccountId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KMS_KEY_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object kmsKeyName_ = ""; + + /** + * + * + *
+   * Optional. The resource name for the configured Cloud KMS key.
+   *
+   * KMS key name format:
+   *
+   * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]"
+   *
+   * For example:
+   *
+   * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"`
+   * 
+ * + * string kms_key_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kmsKeyName. + */ + @java.lang.Override + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + 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(); + kmsKeyName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The resource name for the configured Cloud KMS key.
+   *
+   * KMS key name format:
+   *
+   * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]"
+   *
+   * For example:
+   *
+   * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"`
+   * 
+ * + * string kms_key_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kmsKeyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(defaultStorageLocation_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, defaultStorageLocation_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAccountId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, serviceAccountId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, kmsKeyName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(defaultStorageLocation_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, defaultStorageLocation_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAccountId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, serviceAccountId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, kmsKeyName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.Settings)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.Settings other = + (com.google.cloud.observability.v1.Settings) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDefaultStorageLocation().equals(other.getDefaultStorageLocation())) return false; + if (!getServiceAccountId().equals(other.getServiceAccountId())) return false; + if (!getKmsKeyName().equals(other.getKmsKeyName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DEFAULT_STORAGE_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getDefaultStorageLocation().hashCode(); + hash = (37 * hash) + SERVICE_ACCOUNT_ID_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccountId().hashCode(); + hash = (37 * hash) + KMS_KEY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getKmsKeyName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.Settings parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.Settings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.Settings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.Settings parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.Settings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.Settings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.Settings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.Settings parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.Settings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.Settings parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.Settings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.Settings parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.observability.v1.Settings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Describes the settings associated with a project, organization, or folder.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.Settings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.Settings) + com.google.cloud.observability.v1.SettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Settings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Settings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.Settings.class, + com.google.cloud.observability.v1.Settings.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.Settings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + defaultStorageLocation_ = ""; + serviceAccountId_ = ""; + kmsKeyName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_Settings_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.Settings getDefaultInstanceForType() { + return com.google.cloud.observability.v1.Settings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.Settings build() { + com.google.cloud.observability.v1.Settings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.Settings buildPartial() { + com.google.cloud.observability.v1.Settings result = + new com.google.cloud.observability.v1.Settings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.Settings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.defaultStorageLocation_ = defaultStorageLocation_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.serviceAccountId_ = serviceAccountId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.kmsKeyName_ = kmsKeyName_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.Settings) { + return mergeFrom((com.google.cloud.observability.v1.Settings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.Settings other) { + if (other == com.google.cloud.observability.v1.Settings.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDefaultStorageLocation().isEmpty()) { + defaultStorageLocation_ = other.defaultStorageLocation_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getServiceAccountId().isEmpty()) { + serviceAccountId_ = other.serviceAccountId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getKmsKeyName().isEmpty()) { + kmsKeyName_ = other.kmsKeyName_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + defaultStorageLocation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + serviceAccountId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + kmsKeyName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The resource name of the settings.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the settings.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the settings.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the settings.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the settings.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object defaultStorageLocation_ = ""; + + /** + * + * + *
+     * Optional. The location which should be used when any regional resources are
+     * provisioned by Google Cloud.
+     * 
+ * + * string default_storage_location = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The defaultStorageLocation. + */ + public java.lang.String getDefaultStorageLocation() { + java.lang.Object ref = defaultStorageLocation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultStorageLocation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The location which should be used when any regional resources are
+     * provisioned by Google Cloud.
+     * 
+ * + * string default_storage_location = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for defaultStorageLocation. + */ + public com.google.protobuf.ByteString getDefaultStorageLocationBytes() { + java.lang.Object ref = defaultStorageLocation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + defaultStorageLocation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The location which should be used when any regional resources are
+     * provisioned by Google Cloud.
+     * 
+ * + * string default_storage_location = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The defaultStorageLocation to set. + * @return This builder for chaining. + */ + public Builder setDefaultStorageLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + defaultStorageLocation_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The location which should be used when any regional resources are
+     * provisioned by Google Cloud.
+     * 
+ * + * string default_storage_location = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDefaultStorageLocation() { + defaultStorageLocation_ = getDefaultInstance().getDefaultStorageLocation(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The location which should be used when any regional resources are
+     * provisioned by Google Cloud.
+     * 
+ * + * string default_storage_location = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for defaultStorageLocation to set. + * @return This builder for chaining. + */ + public Builder setDefaultStorageLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + defaultStorageLocation_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object serviceAccountId_ = ""; + + /** + * + * + *
+     * Output only. The service account for the given resource container, such as
+     * project or folder. This will be used by Cloud Observability to perform
+     * actions in the container's project like access KMS keys or create Links.
+     * Always the same service account per resource container regardless of
+     * region.
+     * 
+ * + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceAccountId. + */ + public java.lang.String getServiceAccountId() { + java.lang.Object ref = serviceAccountId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccountId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The service account for the given resource container, such as
+     * project or folder. This will be used by Cloud Observability to perform
+     * actions in the container's project like access KMS keys or create Links.
+     * Always the same service account per resource container regardless of
+     * region.
+     * 
+ * + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceAccountId. + */ + public com.google.protobuf.ByteString getServiceAccountIdBytes() { + java.lang.Object ref = serviceAccountId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccountId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The service account for the given resource container, such as
+     * project or folder. This will be used by Cloud Observability to perform
+     * actions in the container's project like access KMS keys or create Links.
+     * Always the same service account per resource container regardless of
+     * region.
+     * 
+ * + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The serviceAccountId to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccountId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The service account for the given resource container, such as
+     * project or folder. This will be used by Cloud Observability to perform
+     * actions in the container's project like access KMS keys or create Links.
+     * Always the same service account per resource container regardless of
+     * region.
+     * 
+ * + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccountId() { + serviceAccountId_ = getDefaultInstance().getServiceAccountId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The service account for the given resource container, such as
+     * project or folder. This will be used by Cloud Observability to perform
+     * actions in the container's project like access KMS keys or create Links.
+     * Always the same service account per resource container regardless of
+     * region.
+     * 
+ * + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for serviceAccountId to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAccountId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object kmsKeyName_ = ""; + + /** + * + * + *
+     * Optional. The resource name for the configured Cloud KMS key.
+     *
+     * KMS key name format:
+     *
+     * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]"
+     *
+     * For example:
+     *
+     * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"`
+     * 
+ * + * string kms_key_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kmsKeyName. + */ + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The resource name for the configured Cloud KMS key.
+     *
+     * KMS key name format:
+     *
+     * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]"
+     *
+     * For example:
+     *
+     * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"`
+     * 
+ * + * string kms_key_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kmsKeyName. + */ + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The resource name for the configured Cloud KMS key.
+     *
+     * KMS key name format:
+     *
+     * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]"
+     *
+     * For example:
+     *
+     * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"`
+     * 
+ * + * string kms_key_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The kmsKeyName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kmsKeyName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The resource name for the configured Cloud KMS key.
+     *
+     * KMS key name format:
+     *
+     * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]"
+     *
+     * For example:
+     *
+     * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"`
+     * 
+ * + * string kms_key_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearKmsKeyName() { + kmsKeyName_ = getDefaultInstance().getKmsKeyName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The resource name for the configured Cloud KMS key.
+     *
+     * KMS key name format:
+     *
+     * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]"
+     *
+     * For example:
+     *
+     * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"`
+     * 
+ * + * string kms_key_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for kmsKeyName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kmsKeyName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.Settings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.Settings) + private static final com.google.cloud.observability.v1.Settings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.Settings(); + } + + public static com.google.cloud.observability.v1.Settings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Settings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.Settings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/SettingsName.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/SettingsName.java new file mode 100644 index 000000000000..08d6d287847c --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/SettingsName.java @@ -0,0 +1,364 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.cloud.observability.v1; + +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; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class SettingsName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}/settings"); + private static final PathTemplate ORGANIZATION_LOCATION = + PathTemplate.createWithoutUrlEncoding( + "organizations/{organization}/locations/{location}/settings"); + private static final PathTemplate FOLDER_LOCATION = + PathTemplate.createWithoutUrlEncoding("folders/{folder}/locations/{location}/settings"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String project; + private final String location; + private final String organization; + private final String folder; + + @Deprecated + protected SettingsName() { + project = null; + location = null; + organization = null; + folder = null; + } + + private SettingsName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + organization = null; + folder = null; + pathTemplate = PROJECT_LOCATION; + } + + private SettingsName(OrganizationLocationBuilder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + location = Preconditions.checkNotNull(builder.getLocation()); + project = null; + folder = null; + pathTemplate = ORGANIZATION_LOCATION; + } + + private SettingsName(FolderLocationBuilder builder) { + folder = Preconditions.checkNotNull(builder.getFolder()); + location = Preconditions.checkNotNull(builder.getLocation()); + project = null; + organization = null; + pathTemplate = FOLDER_LOCATION; + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getOrganization() { + return organization; + } + + public String getFolder() { + return folder; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public static Builder newProjectLocationBuilder() { + return new Builder(); + } + + public static OrganizationLocationBuilder newOrganizationLocationBuilder() { + return new OrganizationLocationBuilder(); + } + + public static FolderLocationBuilder newFolderLocationBuilder() { + return new FolderLocationBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static SettingsName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static SettingsName ofProjectLocationName(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static SettingsName ofOrganizationLocationName(String organization, String location) { + return newOrganizationLocationBuilder() + .setOrganization(organization) + .setLocation(location) + .build(); + } + + public static SettingsName ofFolderLocationName(String folder, String location) { + return newFolderLocationBuilder().setFolder(folder).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static String formatProjectLocationName(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static String formatOrganizationLocationName(String organization, String location) { + return newOrganizationLocationBuilder() + .setOrganization(organization) + .setLocation(location) + .build() + .toString(); + } + + public static String formatFolderLocationName(String folder, String location) { + return newFolderLocationBuilder().setFolder(folder).setLocation(location).build().toString(); + } + + public static @Nullable SettingsName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT_LOCATION.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION.match(formattedString); + return ofProjectLocationName(matchMap.get("project"), matchMap.get("location")); + } else if (ORGANIZATION_LOCATION.matches(formattedString)) { + Map matchMap = ORGANIZATION_LOCATION.match(formattedString); + return ofOrganizationLocationName(matchMap.get("organization"), matchMap.get("location")); + } else if (FOLDER_LOCATION.matches(formattedString)) { + Map matchMap = FOLDER_LOCATION.match(formattedString); + return ofFolderLocationName(matchMap.get("folder"), matchMap.get("location")); + } + throw new ValidationException("SettingsName.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<@Nullable SettingsName> values) { + List list = new ArrayList<>(values.size()); + for (SettingsName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString) + || ORGANIZATION_LOCATION.matches(formattedString) + || FOLDER_LOCATION.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 (organization != null) { + fieldMapBuilder.put("organization", organization); + } + if (folder != null) { + fieldMapBuilder.put("folder", folder); + } + 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()); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + SettingsName that = ((SettingsName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.organization, that.organization) + && Objects.equals(this.folder, that.folder); + } + 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(organization); + h *= 1000003; + h ^= Objects.hashCode(folder); + return h; + } + + /** Builder for projects/{project}/locations/{location}/settings. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(SettingsName settingsName) { + Preconditions.checkArgument( + Objects.equals(settingsName.pathTemplate, PROJECT_LOCATION), + "toBuilder is only supported when SettingsName has the pattern of" + + " projects/{project}/locations/{location}/settings"); + this.project = settingsName.project; + this.location = settingsName.location; + } + + public SettingsName build() { + return new SettingsName(this); + } + } + + /** Builder for organizations/{organization}/locations/{location}/settings. */ + public static class OrganizationLocationBuilder { + private String organization; + private String location; + + protected OrganizationLocationBuilder() {} + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public OrganizationLocationBuilder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public OrganizationLocationBuilder setLocation(String location) { + this.location = location; + return this; + } + + public SettingsName build() { + return new SettingsName(this); + } + } + + /** Builder for folders/{folder}/locations/{location}/settings. */ + public static class FolderLocationBuilder { + private String folder; + private String location; + + protected FolderLocationBuilder() {} + + public String getFolder() { + return folder; + } + + public String getLocation() { + return location; + } + + public FolderLocationBuilder setFolder(String folder) { + this.folder = folder; + return this; + } + + public FolderLocationBuilder setLocation(String location) { + this.location = location; + return this; + } + + public SettingsName build() { + return new SettingsName(this); + } + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/SettingsOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/SettingsOrBuilder.java new file mode 100644 index 000000000000..e18ed59ce9ff --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/SettingsOrBuilder.java @@ -0,0 +1,158 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface SettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.Settings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of the settings.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of the settings.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The location which should be used when any regional resources are
+   * provisioned by Google Cloud.
+   * 
+ * + * string default_storage_location = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The defaultStorageLocation. + */ + java.lang.String getDefaultStorageLocation(); + + /** + * + * + *
+   * Optional. The location which should be used when any regional resources are
+   * provisioned by Google Cloud.
+   * 
+ * + * string default_storage_location = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for defaultStorageLocation. + */ + com.google.protobuf.ByteString getDefaultStorageLocationBytes(); + + /** + * + * + *
+   * Output only. The service account for the given resource container, such as
+   * project or folder. This will be used by Cloud Observability to perform
+   * actions in the container's project like access KMS keys or create Links.
+   * Always the same service account per resource container regardless of
+   * region.
+   * 
+ * + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceAccountId. + */ + java.lang.String getServiceAccountId(); + + /** + * + * + *
+   * Output only. The service account for the given resource container, such as
+   * project or folder. This will be used by Cloud Observability to perform
+   * actions in the container's project like access KMS keys or create Links.
+   * Always the same service account per resource container regardless of
+   * region.
+   * 
+ * + * string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceAccountId. + */ + com.google.protobuf.ByteString getServiceAccountIdBytes(); + + /** + * + * + *
+   * Optional. The resource name for the configured Cloud KMS key.
+   *
+   * KMS key name format:
+   *
+   * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]"
+   *
+   * For example:
+   *
+   * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"`
+   * 
+ * + * string kms_key_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kmsKeyName. + */ + java.lang.String getKmsKeyName(); + + /** + * + * + *
+   * Optional. The resource name for the configured Cloud KMS key.
+   *
+   * KMS key name format:
+   *
+   * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]"
+   *
+   * For example:
+   *
+   * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"`
+   * 
+ * + * string kms_key_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kmsKeyName. + */ + com.google.protobuf.ByteString getKmsKeyNameBytes(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/TraceScope.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/TraceScope.java new file mode 100644 index 000000000000..c98a286b7d01 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/TraceScope.java @@ -0,0 +1,1801 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * A trace scope is a collection of resources whose traces are queried together.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.TraceScope} + */ +@com.google.protobuf.Generated +public final class TraceScope extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.TraceScope) + TraceScopeOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "TraceScope"); + } + + // Use TraceScope.newBuilder() to construct. + private TraceScope(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private TraceScope() { + name_ = ""; + resourceNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + description_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_TraceScope_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_TraceScope_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.TraceScope.class, + com.google.cloud.observability.v1.TraceScope.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The resource name of the trace scope.
+   *
+   * For example:
+   *
+   * projects/my-project/locations/global/traceScopes/my-trace-scope
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The resource name of the trace scope.
+   *
+   * For example:
+   *
+   * projects/my-project/locations/global/traceScopes/my-trace-scope
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_NAMES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList resourceNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Required. Names of the projects that are included in this trace scope.
+   *
+   * *  `projects/[PROJECT_ID]`
+   *
+   * A trace scope can include a maximum of 20 projects.
+   * 
+ * + * + * repeated string resource_names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the resourceNames. + */ + public com.google.protobuf.ProtocolStringList getResourceNamesList() { + return resourceNames_; + } + + /** + * + * + *
+   * Required. Names of the projects that are included in this trace scope.
+   *
+   * *  `projects/[PROJECT_ID]`
+   *
+   * A trace scope can include a maximum of 20 projects.
+   * 
+ * + * + * repeated string resource_names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of resourceNames. + */ + public int getResourceNamesCount() { + return resourceNames_.size(); + } + + /** + * + * + *
+   * Required. Names of the projects that are included in this trace scope.
+   *
+   * *  `projects/[PROJECT_ID]`
+   *
+   * A trace scope can include a maximum of 20 projects.
+   * 
+ * + * + * repeated string resource_names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The resourceNames at the given index. + */ + public java.lang.String getResourceNames(int index) { + return resourceNames_.get(index); + } + + /** + * + * + *
+   * Required. Names of the projects that are included in this trace scope.
+   *
+   * *  `projects/[PROJECT_ID]`
+   *
+   * A trace scope can include a maximum of 20 projects.
+   * 
+ * + * + * repeated string resource_names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the resourceNames at the given index. + */ + public com.google.protobuf.ByteString getResourceNamesBytes(int index) { + return resourceNames_.getByteString(index); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. Describes this trace scope.
+   *
+   * The maximum length of the description is 8000 characters.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Describes this trace scope.
+   *
+   * The maximum length of the description is 8000 characters.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + 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 trace scope.
+   * 
+ * + * .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 ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The creation timestamp of the trace scope.
+   * 
+ * + * .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 trace scope.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The last update timestamp of the trace scope.
+   * 
+ * + * .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 ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The last update timestamp of the trace scope.
+   * 
+ * + * .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 trace scope.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + for (int i = 0; i < resourceNames_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, resourceNames_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < resourceNames_.size(); i++) { + dataSize += computeStringSizeNoTag(resourceNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getResourceNamesList().size(); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.TraceScope)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.TraceScope other = + (com.google.cloud.observability.v1.TraceScope) obj; + + if (!getName().equals(other.getName())) return false; + if (!getResourceNamesList().equals(other.getResourceNamesList())) 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 (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getResourceNamesCount() > 0) { + hash = (37 * hash) + RESOURCE_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getResourceNamesList().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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.TraceScope parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.TraceScope parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.TraceScope parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.TraceScope 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.cloud.observability.v1.TraceScope parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.TraceScope parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.TraceScope parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.TraceScope parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.TraceScope parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.TraceScope parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.TraceScope parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.TraceScope parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.observability.v1.TraceScope prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A trace scope is a collection of resources whose traces are queried together.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.TraceScope} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.TraceScope) + com.google.cloud.observability.v1.TraceScopeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_TraceScope_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_TraceScope_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.TraceScope.class, + com.google.cloud.observability.v1.TraceScope.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.TraceScope.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + resourceNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + description_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_TraceScope_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.TraceScope getDefaultInstanceForType() { + return com.google.cloud.observability.v1.TraceScope.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.TraceScope build() { + com.google.cloud.observability.v1.TraceScope result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.TraceScope buildPartial() { + com.google.cloud.observability.v1.TraceScope result = + new com.google.cloud.observability.v1.TraceScope(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.TraceScope result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + resourceNames_.makeImmutable(); + result.resourceNames_ = resourceNames_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.TraceScope) { + return mergeFrom((com.google.cloud.observability.v1.TraceScope) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.TraceScope other) { + if (other == com.google.cloud.observability.v1.TraceScope.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.resourceNames_.isEmpty()) { + if (resourceNames_.isEmpty()) { + resourceNames_ = other.resourceNames_; + bitField0_ |= 0x00000002; + } else { + ensureResourceNamesIsMutable(); + resourceNames_.addAll(other.resourceNames_); + } + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureResourceNamesIsMutable(); + resourceNames_.add(s); + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The resource name of the trace scope.
+     *
+     * For example:
+     *
+     * projects/my-project/locations/global/traceScopes/my-trace-scope
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the trace scope.
+     *
+     * For example:
+     *
+     * projects/my-project/locations/global/traceScopes/my-trace-scope
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the trace scope.
+     *
+     * For example:
+     *
+     * projects/my-project/locations/global/traceScopes/my-trace-scope
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the trace scope.
+     *
+     * For example:
+     *
+     * projects/my-project/locations/global/traceScopes/my-trace-scope
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the trace scope.
+     *
+     * For example:
+     *
+     * projects/my-project/locations/global/traceScopes/my-trace-scope
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList resourceNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureResourceNamesIsMutable() { + if (!resourceNames_.isModifiable()) { + resourceNames_ = new com.google.protobuf.LazyStringArrayList(resourceNames_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+     * Required. Names of the projects that are included in this trace scope.
+     *
+     * *  `projects/[PROJECT_ID]`
+     *
+     * A trace scope can include a maximum of 20 projects.
+     * 
+ * + * + * repeated string resource_names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the resourceNames. + */ + public com.google.protobuf.ProtocolStringList getResourceNamesList() { + resourceNames_.makeImmutable(); + return resourceNames_; + } + + /** + * + * + *
+     * Required. Names of the projects that are included in this trace scope.
+     *
+     * *  `projects/[PROJECT_ID]`
+     *
+     * A trace scope can include a maximum of 20 projects.
+     * 
+ * + * + * repeated string resource_names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of resourceNames. + */ + public int getResourceNamesCount() { + return resourceNames_.size(); + } + + /** + * + * + *
+     * Required. Names of the projects that are included in this trace scope.
+     *
+     * *  `projects/[PROJECT_ID]`
+     *
+     * A trace scope can include a maximum of 20 projects.
+     * 
+ * + * + * repeated string resource_names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The resourceNames at the given index. + */ + public java.lang.String getResourceNames(int index) { + return resourceNames_.get(index); + } + + /** + * + * + *
+     * Required. Names of the projects that are included in this trace scope.
+     *
+     * *  `projects/[PROJECT_ID]`
+     *
+     * A trace scope can include a maximum of 20 projects.
+     * 
+ * + * + * repeated string resource_names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the resourceNames at the given index. + */ + public com.google.protobuf.ByteString getResourceNamesBytes(int index) { + return resourceNames_.getByteString(index); + } + + /** + * + * + *
+     * Required. Names of the projects that are included in this trace scope.
+     *
+     * *  `projects/[PROJECT_ID]`
+     *
+     * A trace scope can include a maximum of 20 projects.
+     * 
+ * + * + * repeated string resource_names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The resourceNames to set. + * @return This builder for chaining. + */ + public Builder setResourceNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceNamesIsMutable(); + resourceNames_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Names of the projects that are included in this trace scope.
+     *
+     * *  `projects/[PROJECT_ID]`
+     *
+     * A trace scope can include a maximum of 20 projects.
+     * 
+ * + * + * repeated string resource_names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The resourceNames to add. + * @return This builder for chaining. + */ + public Builder addResourceNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceNamesIsMutable(); + resourceNames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Names of the projects that are included in this trace scope.
+     *
+     * *  `projects/[PROJECT_ID]`
+     *
+     * A trace scope can include a maximum of 20 projects.
+     * 
+ * + * + * repeated string resource_names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param values The resourceNames to add. + * @return This builder for chaining. + */ + public Builder addAllResourceNames(java.lang.Iterable values) { + ensureResourceNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resourceNames_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Names of the projects that are included in this trace scope.
+     *
+     * *  `projects/[PROJECT_ID]`
+     *
+     * A trace scope can include a maximum of 20 projects.
+     * 
+ * + * + * repeated string resource_names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearResourceNames() { + resourceNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Names of the projects that are included in this trace scope.
+     *
+     * *  `projects/[PROJECT_ID]`
+     *
+     * A trace scope can include a maximum of 20 projects.
+     * 
+ * + * + * repeated string resource_names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the resourceNames to add. + * @return This builder for chaining. + */ + public Builder addResourceNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureResourceNamesIsMutable(); + resourceNames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. Describes this trace scope.
+     *
+     * The maximum length of the description is 8000 characters.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Describes this trace scope.
+     *
+     * The maximum length of the description is 8000 characters.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Describes this trace scope.
+     *
+     * The maximum length of the description is 8000 characters.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Describes this trace scope.
+     *
+     * The maximum length of the description is 8000 characters.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Describes this trace scope.
+     *
+     * The maximum length of the description is 8000 characters.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The creation timestamp of the trace scope.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. The creation timestamp of the trace scope.
+     * 
+ * + * + * .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 trace scope.
+     * 
+ * + * + * .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; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The creation timestamp of the trace scope.
+     * 
+ * + * + * .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(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The creation timestamp of the trace scope.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The creation timestamp of the trace scope.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The creation timestamp of the trace scope.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The creation timestamp of the trace scope.
+     * 
+ * + * + * .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 trace scope.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The last update timestamp of the trace scope.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. The last update timestamp of the trace scope.
+     * 
+ * + * + * .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 trace scope.
+     * 
+ * + * + * .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; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The last update timestamp of the trace scope.
+     * 
+ * + * + * .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(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The last update timestamp of the trace scope.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The last update timestamp of the trace scope.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The last update timestamp of the trace scope.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The last update timestamp of the trace scope.
+     * 
+ * + * + * .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 trace scope.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.TraceScope) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.TraceScope) + private static final com.google.cloud.observability.v1.TraceScope DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.TraceScope(); + } + + public static com.google.cloud.observability.v1.TraceScope getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TraceScope parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.TraceScope getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/TraceScopeName.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/TraceScopeName.java new file mode 100644 index 000000000000..967afc54b069 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/TraceScopeName.java @@ -0,0 +1,226 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.cloud.observability.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class TraceScopeName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_TRACE_SCOPE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/traceScopes/{trace_scope}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String traceScope; + + @Deprecated + protected TraceScopeName() { + project = null; + location = null; + traceScope = null; + } + + private TraceScopeName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + traceScope = Preconditions.checkNotNull(builder.getTraceScope()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getTraceScope() { + return traceScope; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static TraceScopeName of(String project, String location, String traceScope) { + return newBuilder().setProject(project).setLocation(location).setTraceScope(traceScope).build(); + } + + public static String format(String project, String location, String traceScope) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setTraceScope(traceScope) + .build() + .toString(); + } + + public static @Nullable TraceScopeName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_TRACE_SCOPE.validatedMatch( + formattedString, "TraceScopeName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("trace_scope")); + } + + 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<@Nullable TraceScopeName> values) { + List list = new ArrayList<>(values.size()); + for (TraceScopeName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_TRACE_SCOPE.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 (traceScope != null) { + fieldMapBuilder.put("trace_scope", traceScope); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_TRACE_SCOPE.instantiate( + "project", project, "location", location, "trace_scope", traceScope); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + TraceScopeName that = ((TraceScopeName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.traceScope, that.traceScope); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(traceScope); + return h; + } + + /** Builder for projects/{project}/locations/{location}/traceScopes/{trace_scope}. */ + public static class Builder { + private String project; + private String location; + private String traceScope; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getTraceScope() { + return traceScope; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setTraceScope(String traceScope) { + this.traceScope = traceScope; + return this; + } + + private Builder(TraceScopeName traceScopeName) { + this.project = traceScopeName.project; + this.location = traceScopeName.location; + this.traceScope = traceScopeName.traceScope; + } + + public TraceScopeName build() { + return new TraceScopeName(this); + } + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/TraceScopeOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/TraceScopeOrBuilder.java new file mode 100644 index 000000000000..8205c47213a9 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/TraceScopeOrBuilder.java @@ -0,0 +1,250 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface TraceScopeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.TraceScope) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of the trace scope.
+   *
+   * For example:
+   *
+   * projects/my-project/locations/global/traceScopes/my-trace-scope
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of the trace scope.
+   *
+   * For example:
+   *
+   * projects/my-project/locations/global/traceScopes/my-trace-scope
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Names of the projects that are included in this trace scope.
+   *
+   * *  `projects/[PROJECT_ID]`
+   *
+   * A trace scope can include a maximum of 20 projects.
+   * 
+ * + * + * repeated string resource_names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the resourceNames. + */ + java.util.List getResourceNamesList(); + + /** + * + * + *
+   * Required. Names of the projects that are included in this trace scope.
+   *
+   * *  `projects/[PROJECT_ID]`
+   *
+   * A trace scope can include a maximum of 20 projects.
+   * 
+ * + * + * repeated string resource_names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of resourceNames. + */ + int getResourceNamesCount(); + + /** + * + * + *
+   * Required. Names of the projects that are included in this trace scope.
+   *
+   * *  `projects/[PROJECT_ID]`
+   *
+   * A trace scope can include a maximum of 20 projects.
+   * 
+ * + * + * repeated string resource_names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The resourceNames at the given index. + */ + java.lang.String getResourceNames(int index); + + /** + * + * + *
+   * Required. Names of the projects that are included in this trace scope.
+   *
+   * *  `projects/[PROJECT_ID]`
+   *
+   * A trace scope can include a maximum of 20 projects.
+   * 
+ * + * + * repeated string resource_names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the resourceNames at the given index. + */ + com.google.protobuf.ByteString getResourceNamesBytes(int index); + + /** + * + * + *
+   * Optional. Describes this trace scope.
+   *
+   * The maximum length of the description is 8000 characters.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. Describes this trace scope.
+   *
+   * The maximum length of the description is 8000 characters.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The creation timestamp of the trace scope.
+   * 
+ * + * .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 trace scope.
+   * 
+ * + * .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 trace scope.
+   * 
+ * + * .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 trace scope.
+   * 
+ * + * .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 trace scope.
+   * 
+ * + * .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 trace scope.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateBucketRequest.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateBucketRequest.java new file mode 100644 index 000000000000..e1c036c1aca2 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateBucketRequest.java @@ -0,0 +1,1035 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Request for updating a bucket.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.UpdateBucketRequest} + */ +@com.google.protobuf.Generated +public final class UpdateBucketRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.UpdateBucketRequest) + UpdateBucketRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "UpdateBucketRequest"); + } + + // Use UpdateBucketRequest.newBuilder() to construct. + private UpdateBucketRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateBucketRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateBucketRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateBucketRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.UpdateBucketRequest.class, + com.google.cloud.observability.v1.UpdateBucketRequest.Builder.class); + } + + private int bitField0_; + public static final int BUCKET_FIELD_NUMBER = 1; + private com.google.cloud.observability.v1.Bucket bucket_; + + /** + * + * + *
+   * Required. The  bucket to update.
+   *
+   * The name field of bucket identifies the resource to update.
+   * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the bucket field is set. + */ + @java.lang.Override + public boolean hasBucket() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The  bucket to update.
+   *
+   * The name field of bucket identifies the resource to update.
+   * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bucket. + */ + @java.lang.Override + public com.google.cloud.observability.v1.Bucket getBucket() { + return bucket_ == null + ? com.google.cloud.observability.v1.Bucket.getDefaultInstance() + : bucket_; + } + + /** + * + * + *
+   * Required. The  bucket to update.
+   *
+   * The name field of bucket identifies the resource to update.
+   * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.observability.v1.BucketOrBuilder getBucketOrBuilder() { + return bucket_ == null + ? com.google.cloud.observability.v1.Bucket.getDefaultInstance() + : bucket_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. The list of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The list of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. The list of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getBucket()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBucket()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.UpdateBucketRequest)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.UpdateBucketRequest other = + (com.google.cloud.observability.v1.UpdateBucketRequest) obj; + + if (hasBucket() != other.hasBucket()) return false; + if (hasBucket()) { + if (!getBucket().equals(other.getBucket())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBucket()) { + hash = (37 * hash) + BUCKET_FIELD_NUMBER; + hash = (53 * hash) + getBucket().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.UpdateBucketRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.UpdateBucketRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.UpdateBucketRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.UpdateBucketRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.UpdateBucketRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.UpdateBucketRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.UpdateBucketRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.UpdateBucketRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.UpdateBucketRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.UpdateBucketRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.UpdateBucketRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.UpdateBucketRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.observability.v1.UpdateBucketRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for updating a bucket.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.UpdateBucketRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.UpdateBucketRequest) + com.google.cloud.observability.v1.UpdateBucketRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateBucketRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateBucketRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.UpdateBucketRequest.class, + com.google.cloud.observability.v1.UpdateBucketRequest.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.UpdateBucketRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBucketFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bucket_ = null; + if (bucketBuilder_ != null) { + bucketBuilder_.dispose(); + bucketBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateBucketRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.UpdateBucketRequest getDefaultInstanceForType() { + return com.google.cloud.observability.v1.UpdateBucketRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.UpdateBucketRequest build() { + com.google.cloud.observability.v1.UpdateBucketRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.UpdateBucketRequest buildPartial() { + com.google.cloud.observability.v1.UpdateBucketRequest result = + new com.google.cloud.observability.v1.UpdateBucketRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.UpdateBucketRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.bucket_ = bucketBuilder_ == null ? bucket_ : bucketBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.UpdateBucketRequest) { + return mergeFrom((com.google.cloud.observability.v1.UpdateBucketRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.UpdateBucketRequest other) { + if (other == com.google.cloud.observability.v1.UpdateBucketRequest.getDefaultInstance()) + return this; + if (other.hasBucket()) { + mergeBucket(other.getBucket()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetBucketFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.observability.v1.Bucket bucket_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.Bucket, + com.google.cloud.observability.v1.Bucket.Builder, + com.google.cloud.observability.v1.BucketOrBuilder> + bucketBuilder_; + + /** + * + * + *
+     * Required. The  bucket to update.
+     *
+     * The name field of bucket identifies the resource to update.
+     * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the bucket field is set. + */ + public boolean hasBucket() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The  bucket to update.
+     *
+     * The name field of bucket identifies the resource to update.
+     * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bucket. + */ + public com.google.cloud.observability.v1.Bucket getBucket() { + if (bucketBuilder_ == null) { + return bucket_ == null + ? com.google.cloud.observability.v1.Bucket.getDefaultInstance() + : bucket_; + } else { + return bucketBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The  bucket to update.
+     *
+     * The name field of bucket identifies the resource to update.
+     * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBucket(com.google.cloud.observability.v1.Bucket value) { + if (bucketBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bucket_ = value; + } else { + bucketBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The  bucket to update.
+     *
+     * The name field of bucket identifies the resource to update.
+     * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBucket(com.google.cloud.observability.v1.Bucket.Builder builderForValue) { + if (bucketBuilder_ == null) { + bucket_ = builderForValue.build(); + } else { + bucketBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The  bucket to update.
+     *
+     * The name field of bucket identifies the resource to update.
+     * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeBucket(com.google.cloud.observability.v1.Bucket value) { + if (bucketBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && bucket_ != null + && bucket_ != com.google.cloud.observability.v1.Bucket.getDefaultInstance()) { + getBucketBuilder().mergeFrom(value); + } else { + bucket_ = value; + } + } else { + bucketBuilder_.mergeFrom(value); + } + if (bucket_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The  bucket to update.
+     *
+     * The name field of bucket identifies the resource to update.
+     * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearBucket() { + bitField0_ = (bitField0_ & ~0x00000001); + bucket_ = null; + if (bucketBuilder_ != null) { + bucketBuilder_.dispose(); + bucketBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The  bucket to update.
+     *
+     * The name field of bucket identifies the resource to update.
+     * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.observability.v1.Bucket.Builder getBucketBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetBucketFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The  bucket to update.
+     *
+     * The name field of bucket identifies the resource to update.
+     * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.observability.v1.BucketOrBuilder getBucketOrBuilder() { + if (bucketBuilder_ != null) { + return bucketBuilder_.getMessageOrBuilder(); + } else { + return bucket_ == null + ? com.google.cloud.observability.v1.Bucket.getDefaultInstance() + : bucket_; + } + } + + /** + * + * + *
+     * Required. The  bucket to update.
+     *
+     * The name field of bucket identifies the resource to update.
+     * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.Bucket, + com.google.cloud.observability.v1.Bucket.Builder, + com.google.cloud.observability.v1.BucketOrBuilder> + internalGetBucketFieldBuilder() { + if (bucketBuilder_ == null) { + bucketBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.Bucket, + com.google.cloud.observability.v1.Bucket.Builder, + com.google.cloud.observability.v1.BucketOrBuilder>( + getBucket(), getParentForChildren(), isClean()); + bucket_ = null; + } + return bucketBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.UpdateBucketRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.UpdateBucketRequest) + private static final com.google.cloud.observability.v1.UpdateBucketRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.UpdateBucketRequest(); + } + + public static com.google.cloud.observability.v1.UpdateBucketRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateBucketRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.UpdateBucketRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateBucketRequestOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateBucketRequestOrBuilder.java new file mode 100644 index 000000000000..6a5e26f266c6 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateBucketRequestOrBuilder.java @@ -0,0 +1,117 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface UpdateBucketRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.UpdateBucketRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The  bucket to update.
+   *
+   * The name field of bucket identifies the resource to update.
+   * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the bucket field is set. + */ + boolean hasBucket(); + + /** + * + * + *
+   * Required. The  bucket to update.
+   *
+   * The name field of bucket identifies the resource to update.
+   * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bucket. + */ + com.google.cloud.observability.v1.Bucket getBucket(); + + /** + * + * + *
+   * Required. The  bucket to update.
+   *
+   * The name field of bucket identifies the resource to update.
+   * 
+ * + * + * .google.cloud.observability.v1.Bucket bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.observability.v1.BucketOrBuilder getBucketOrBuilder(); + + /** + * + * + *
+   * Optional. The list of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. The list of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. The list of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateLinkRequest.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateLinkRequest.java new file mode 100644 index 000000000000..658b6d5eaa6d --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateLinkRequest.java @@ -0,0 +1,1014 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Request for updating a link.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.UpdateLinkRequest} + */ +@com.google.protobuf.Generated +public final class UpdateLinkRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.UpdateLinkRequest) + UpdateLinkRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "UpdateLinkRequest"); + } + + // Use UpdateLinkRequest.newBuilder() to construct. + private UpdateLinkRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateLinkRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.UpdateLinkRequest.class, + com.google.cloud.observability.v1.UpdateLinkRequest.Builder.class); + } + + private int bitField0_; + public static final int LINK_FIELD_NUMBER = 1; + private com.google.cloud.observability.v1.Link link_; + + /** + * + * + *
+   * Required. Link to update.
+   *
+   * The name field of link identifies the resource to update.
+   * 
+ * + * .google.cloud.observability.v1.Link link = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the link field is set. + */ + @java.lang.Override + public boolean hasLink() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Link to update.
+   *
+   * The name field of link identifies the resource to update.
+   * 
+ * + * .google.cloud.observability.v1.Link link = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The link. + */ + @java.lang.Override + public com.google.cloud.observability.v1.Link getLink() { + return link_ == null ? com.google.cloud.observability.v1.Link.getDefaultInstance() : link_; + } + + /** + * + * + *
+   * Required. Link to update.
+   *
+   * The name field of link identifies the resource to update.
+   * 
+ * + * .google.cloud.observability.v1.Link link = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.observability.v1.LinkOrBuilder getLinkOrBuilder() { + return link_ == null ? com.google.cloud.observability.v1.Link.getDefaultInstance() : link_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. The list of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The list of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. The list of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getLink()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLink()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.UpdateLinkRequest)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.UpdateLinkRequest other = + (com.google.cloud.observability.v1.UpdateLinkRequest) obj; + + if (hasLink() != other.hasLink()) return false; + if (hasLink()) { + if (!getLink().equals(other.getLink())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLink()) { + hash = (37 * hash) + LINK_FIELD_NUMBER; + hash = (53 * hash) + getLink().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.UpdateLinkRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.UpdateLinkRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.UpdateLinkRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.UpdateLinkRequest 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.cloud.observability.v1.UpdateLinkRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.UpdateLinkRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.UpdateLinkRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.UpdateLinkRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.UpdateLinkRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.UpdateLinkRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.UpdateLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.UpdateLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.observability.v1.UpdateLinkRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for updating a link.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.UpdateLinkRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.UpdateLinkRequest) + com.google.cloud.observability.v1.UpdateLinkRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.UpdateLinkRequest.class, + com.google.cloud.observability.v1.UpdateLinkRequest.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.UpdateLinkRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetLinkFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + link_ = null; + if (linkBuilder_ != null) { + linkBuilder_.dispose(); + linkBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateLinkRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.UpdateLinkRequest getDefaultInstanceForType() { + return com.google.cloud.observability.v1.UpdateLinkRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.UpdateLinkRequest build() { + com.google.cloud.observability.v1.UpdateLinkRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.UpdateLinkRequest buildPartial() { + com.google.cloud.observability.v1.UpdateLinkRequest result = + new com.google.cloud.observability.v1.UpdateLinkRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.UpdateLinkRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.link_ = linkBuilder_ == null ? link_ : linkBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.UpdateLinkRequest) { + return mergeFrom((com.google.cloud.observability.v1.UpdateLinkRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.UpdateLinkRequest other) { + if (other == com.google.cloud.observability.v1.UpdateLinkRequest.getDefaultInstance()) + return this; + if (other.hasLink()) { + mergeLink(other.getLink()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetLinkFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.observability.v1.Link link_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.Link, + com.google.cloud.observability.v1.Link.Builder, + com.google.cloud.observability.v1.LinkOrBuilder> + linkBuilder_; + + /** + * + * + *
+     * Required. Link to update.
+     *
+     * The name field of link identifies the resource to update.
+     * 
+ * + * .google.cloud.observability.v1.Link link = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the link field is set. + */ + public boolean hasLink() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Link to update.
+     *
+     * The name field of link identifies the resource to update.
+     * 
+ * + * .google.cloud.observability.v1.Link link = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The link. + */ + public com.google.cloud.observability.v1.Link getLink() { + if (linkBuilder_ == null) { + return link_ == null ? com.google.cloud.observability.v1.Link.getDefaultInstance() : link_; + } else { + return linkBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Link to update.
+     *
+     * The name field of link identifies the resource to update.
+     * 
+ * + * .google.cloud.observability.v1.Link link = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setLink(com.google.cloud.observability.v1.Link value) { + if (linkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + link_ = value; + } else { + linkBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Link to update.
+     *
+     * The name field of link identifies the resource to update.
+     * 
+ * + * .google.cloud.observability.v1.Link link = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setLink(com.google.cloud.observability.v1.Link.Builder builderForValue) { + if (linkBuilder_ == null) { + link_ = builderForValue.build(); + } else { + linkBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Link to update.
+     *
+     * The name field of link identifies the resource to update.
+     * 
+ * + * .google.cloud.observability.v1.Link link = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeLink(com.google.cloud.observability.v1.Link value) { + if (linkBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && link_ != null + && link_ != com.google.cloud.observability.v1.Link.getDefaultInstance()) { + getLinkBuilder().mergeFrom(value); + } else { + link_ = value; + } + } else { + linkBuilder_.mergeFrom(value); + } + if (link_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Link to update.
+     *
+     * The name field of link identifies the resource to update.
+     * 
+ * + * .google.cloud.observability.v1.Link link = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearLink() { + bitField0_ = (bitField0_ & ~0x00000001); + link_ = null; + if (linkBuilder_ != null) { + linkBuilder_.dispose(); + linkBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Link to update.
+     *
+     * The name field of link identifies the resource to update.
+     * 
+ * + * .google.cloud.observability.v1.Link link = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.observability.v1.Link.Builder getLinkBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetLinkFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Link to update.
+     *
+     * The name field of link identifies the resource to update.
+     * 
+ * + * .google.cloud.observability.v1.Link link = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.observability.v1.LinkOrBuilder getLinkOrBuilder() { + if (linkBuilder_ != null) { + return linkBuilder_.getMessageOrBuilder(); + } else { + return link_ == null ? com.google.cloud.observability.v1.Link.getDefaultInstance() : link_; + } + } + + /** + * + * + *
+     * Required. Link to update.
+     *
+     * The name field of link identifies the resource to update.
+     * 
+ * + * .google.cloud.observability.v1.Link link = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.Link, + com.google.cloud.observability.v1.Link.Builder, + com.google.cloud.observability.v1.LinkOrBuilder> + internalGetLinkFieldBuilder() { + if (linkBuilder_ == null) { + linkBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.Link, + com.google.cloud.observability.v1.Link.Builder, + com.google.cloud.observability.v1.LinkOrBuilder>( + getLink(), getParentForChildren(), isClean()); + link_ = null; + } + return linkBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.UpdateLinkRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.UpdateLinkRequest) + private static final com.google.cloud.observability.v1.UpdateLinkRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.UpdateLinkRequest(); + } + + public static com.google.cloud.observability.v1.UpdateLinkRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateLinkRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.UpdateLinkRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateLinkRequestOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateLinkRequestOrBuilder.java new file mode 100644 index 000000000000..381cd250cd9f --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateLinkRequestOrBuilder.java @@ -0,0 +1,114 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface UpdateLinkRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.UpdateLinkRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Link to update.
+   *
+   * The name field of link identifies the resource to update.
+   * 
+ * + * .google.cloud.observability.v1.Link link = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the link field is set. + */ + boolean hasLink(); + + /** + * + * + *
+   * Required. Link to update.
+   *
+   * The name field of link identifies the resource to update.
+   * 
+ * + * .google.cloud.observability.v1.Link link = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The link. + */ + com.google.cloud.observability.v1.Link getLink(); + + /** + * + * + *
+   * Required. Link to update.
+   *
+   * The name field of link identifies the resource to update.
+   * 
+ * + * .google.cloud.observability.v1.Link link = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.observability.v1.LinkOrBuilder getLinkOrBuilder(); + + /** + * + * + *
+   * Optional. The list of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. The list of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. The list of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateScopeRequest.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateScopeRequest.java new file mode 100644 index 000000000000..c044c9c4aadb --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateScopeRequest.java @@ -0,0 +1,1063 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Message for updating a Scope.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.UpdateScopeRequest} + */ +@com.google.protobuf.Generated +public final class UpdateScopeRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.UpdateScopeRequest) + UpdateScopeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "UpdateScopeRequest"); + } + + // Use UpdateScopeRequest.newBuilder() to construct. + private UpdateScopeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateScopeRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateScopeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateScopeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.UpdateScopeRequest.class, + com.google.cloud.observability.v1.UpdateScopeRequest.Builder.class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Scope resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field is overwritten when it is in the mask. If the
+   * user does not provide a mask, then all fields present in the request are
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Scope resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field is overwritten when it is in the mask. If the
+   * user does not provide a mask, then all fields present in the request are
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.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 is used to specify the fields to be overwritten in the
+   * Scope resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field is overwritten when it is in the mask. If the
+   * user does not provide a mask, then all fields present in the request are
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int SCOPE_FIELD_NUMBER = 2; + private com.google.cloud.observability.v1.Scope scope_; + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * .google.cloud.observability.v1.Scope scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the scope field is set. + */ + @java.lang.Override + public boolean hasScope() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * .google.cloud.observability.v1.Scope scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The scope. + */ + @java.lang.Override + public com.google.cloud.observability.v1.Scope getScope() { + return scope_ == null ? com.google.cloud.observability.v1.Scope.getDefaultInstance() : scope_; + } + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * .google.cloud.observability.v1.Scope scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.observability.v1.ScopeOrBuilder getScopeOrBuilder() { + return scope_ == null ? com.google.cloud.observability.v1.Scope.getDefaultInstance() : scope_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getScope()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getScope()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.UpdateScopeRequest)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.UpdateScopeRequest other = + (com.google.cloud.observability.v1.UpdateScopeRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasScope() != other.hasScope()) return false; + if (hasScope()) { + if (!getScope().equals(other.getScope())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasScope()) { + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getScope().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.UpdateScopeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.UpdateScopeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.UpdateScopeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.UpdateScopeRequest 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.cloud.observability.v1.UpdateScopeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.UpdateScopeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.UpdateScopeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.UpdateScopeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.UpdateScopeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.UpdateScopeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.UpdateScopeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.UpdateScopeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.observability.v1.UpdateScopeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for updating a Scope.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.UpdateScopeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.UpdateScopeRequest) + com.google.cloud.observability.v1.UpdateScopeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateScopeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateScopeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.UpdateScopeRequest.class, + com.google.cloud.observability.v1.UpdateScopeRequest.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.UpdateScopeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUpdateMaskFieldBuilder(); + internalGetScopeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + scope_ = null; + if (scopeBuilder_ != null) { + scopeBuilder_.dispose(); + scopeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateScopeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.UpdateScopeRequest getDefaultInstanceForType() { + return com.google.cloud.observability.v1.UpdateScopeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.UpdateScopeRequest build() { + com.google.cloud.observability.v1.UpdateScopeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.UpdateScopeRequest buildPartial() { + com.google.cloud.observability.v1.UpdateScopeRequest result = + new com.google.cloud.observability.v1.UpdateScopeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.UpdateScopeRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.scope_ = scopeBuilder_ == null ? scope_ : scopeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.UpdateScopeRequest) { + return mergeFrom((com.google.cloud.observability.v1.UpdateScopeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.UpdateScopeRequest other) { + if (other == com.google.cloud.observability.v1.UpdateScopeRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasScope()) { + mergeScope(other.getScope()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetScopeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Scope resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field is overwritten when it is in the mask. If the
+     * user does not provide a mask, then all fields present in the request are
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Scope resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field is overwritten when it is in the mask. If the
+     * user does not provide a mask, then all fields present in the request are
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.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 is used to specify the fields to be overwritten in the
+     * Scope resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field is overwritten when it is in the mask. If the
+     * user does not provide a mask, then all fields present in the request are
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Scope resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field is overwritten when it is in the mask. If the
+     * user does not provide a mask, then all fields present in the request are
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Scope resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field is overwritten when it is in the mask. If the
+     * user does not provide a mask, then all fields present in the request are
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Scope resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field is overwritten when it is in the mask. If the
+     * user does not provide a mask, then all fields present in the request are
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Scope resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field is overwritten when it is in the mask. If the
+     * user does not provide a mask, then all fields present in the request are
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Scope resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field is overwritten when it is in the mask. If the
+     * user does not provide a mask, then all fields present in the request are
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.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 is used to specify the fields to be overwritten in the
+     * Scope resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field is overwritten when it is in the mask. If the
+     * user does not provide a mask, then all fields present in the request are
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.observability.v1.Scope scope_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.Scope, + com.google.cloud.observability.v1.Scope.Builder, + com.google.cloud.observability.v1.ScopeOrBuilder> + scopeBuilder_; + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.observability.v1.Scope scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the scope field is set. + */ + public boolean hasScope() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.observability.v1.Scope scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The scope. + */ + public com.google.cloud.observability.v1.Scope getScope() { + if (scopeBuilder_ == null) { + return scope_ == null + ? com.google.cloud.observability.v1.Scope.getDefaultInstance() + : scope_; + } else { + return scopeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.observability.v1.Scope scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setScope(com.google.cloud.observability.v1.Scope value) { + if (scopeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scope_ = value; + } else { + scopeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.observability.v1.Scope scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setScope(com.google.cloud.observability.v1.Scope.Builder builderForValue) { + if (scopeBuilder_ == null) { + scope_ = builderForValue.build(); + } else { + scopeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.observability.v1.Scope scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeScope(com.google.cloud.observability.v1.Scope value) { + if (scopeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && scope_ != null + && scope_ != com.google.cloud.observability.v1.Scope.getDefaultInstance()) { + getScopeBuilder().mergeFrom(value); + } else { + scope_ = value; + } + } else { + scopeBuilder_.mergeFrom(value); + } + if (scope_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.observability.v1.Scope scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearScope() { + bitField0_ = (bitField0_ & ~0x00000002); + scope_ = null; + if (scopeBuilder_ != null) { + scopeBuilder_.dispose(); + scopeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.observability.v1.Scope scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.observability.v1.Scope.Builder getScopeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetScopeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.observability.v1.Scope scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.observability.v1.ScopeOrBuilder getScopeOrBuilder() { + if (scopeBuilder_ != null) { + return scopeBuilder_.getMessageOrBuilder(); + } else { + return scope_ == null + ? com.google.cloud.observability.v1.Scope.getDefaultInstance() + : scope_; + } + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.observability.v1.Scope scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.Scope, + com.google.cloud.observability.v1.Scope.Builder, + com.google.cloud.observability.v1.ScopeOrBuilder> + internalGetScopeFieldBuilder() { + if (scopeBuilder_ == null) { + scopeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.Scope, + com.google.cloud.observability.v1.Scope.Builder, + com.google.cloud.observability.v1.ScopeOrBuilder>( + getScope(), getParentForChildren(), isClean()); + scope_ = null; + } + return scopeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.UpdateScopeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.UpdateScopeRequest) + private static final com.google.cloud.observability.v1.UpdateScopeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.UpdateScopeRequest(); + } + + public static com.google.cloud.observability.v1.UpdateScopeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateScopeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.UpdateScopeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateScopeRequestOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateScopeRequestOrBuilder.java new file mode 100644 index 000000000000..ff882e97689e --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateScopeRequestOrBuilder.java @@ -0,0 +1,123 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface UpdateScopeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.UpdateScopeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Scope resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field is overwritten when it is in the mask. If the
+   * user does not provide a mask, then all fields present in the request are
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Scope resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field is overwritten when it is in the mask. If the
+   * user does not provide a mask, then all fields present in the request are
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Scope resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field is overwritten when it is in the mask. If the
+   * user does not provide a mask, then all fields present in the request are
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * .google.cloud.observability.v1.Scope scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the scope field is set. + */ + boolean hasScope(); + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * .google.cloud.observability.v1.Scope scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The scope. + */ + com.google.cloud.observability.v1.Scope getScope(); + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * .google.cloud.observability.v1.Scope scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.observability.v1.ScopeOrBuilder getScopeOrBuilder(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateSettingsRequest.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateSettingsRequest.java new file mode 100644 index 000000000000..4800f70cb0b6 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateSettingsRequest.java @@ -0,0 +1,1048 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Request for updating Settings.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.UpdateSettingsRequest} + */ +@com.google.protobuf.Generated +public final class UpdateSettingsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.UpdateSettingsRequest) + UpdateSettingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "UpdateSettingsRequest"); + } + + // Use UpdateSettingsRequest.newBuilder() to construct. + private UpdateSettingsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateSettingsRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.UpdateSettingsRequest.class, + com.google.cloud.observability.v1.UpdateSettingsRequest.Builder.class); + } + + private int bitField0_; + public static final int SETTINGS_FIELD_NUMBER = 1; + private com.google.cloud.observability.v1.Settings settings_; + + /** + * + * + *
+   * Required. The settings to update.
+   *
+   * The name field of settings is used to identify the resource to be updated.
+   * 
+ * + * + * .google.cloud.observability.v1.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the settings field is set. + */ + @java.lang.Override + public boolean hasSettings() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The settings to update.
+   *
+   * The name field of settings is used to identify the resource to be updated.
+   * 
+ * + * + * .google.cloud.observability.v1.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The settings. + */ + @java.lang.Override + public com.google.cloud.observability.v1.Settings getSettings() { + return settings_ == null + ? com.google.cloud.observability.v1.Settings.getDefaultInstance() + : settings_; + } + + /** + * + * + *
+   * Required. The settings to update.
+   *
+   * The name field of settings is used to identify the resource to be updated.
+   * 
+ * + * + * .google.cloud.observability.v1.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.observability.v1.SettingsOrBuilder getSettingsOrBuilder() { + return settings_ == null + ? com.google.cloud.observability.v1.Settings.getDefaultInstance() + : settings_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. The field mask specifying which fields of the settings are to be
+   * updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The field mask specifying which fields of the settings are to be
+   * updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. The field mask specifying which fields of the settings are to be
+   * updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getSettings()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSettings()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.UpdateSettingsRequest)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.UpdateSettingsRequest other = + (com.google.cloud.observability.v1.UpdateSettingsRequest) obj; + + if (hasSettings() != other.hasSettings()) return false; + if (hasSettings()) { + if (!getSettings().equals(other.getSettings())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSettings()) { + hash = (37 * hash) + SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getSettings().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.UpdateSettingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.UpdateSettingsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.UpdateSettingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.UpdateSettingsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.UpdateSettingsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.UpdateSettingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.UpdateSettingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.UpdateSettingsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.UpdateSettingsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.UpdateSettingsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.UpdateSettingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.UpdateSettingsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.observability.v1.UpdateSettingsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for updating Settings.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.UpdateSettingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.UpdateSettingsRequest) + com.google.cloud.observability.v1.UpdateSettingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.UpdateSettingsRequest.class, + com.google.cloud.observability.v1.UpdateSettingsRequest.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.UpdateSettingsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSettingsFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + settings_ = null; + if (settingsBuilder_ != null) { + settingsBuilder_.dispose(); + settingsBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateSettingsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.UpdateSettingsRequest getDefaultInstanceForType() { + return com.google.cloud.observability.v1.UpdateSettingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.UpdateSettingsRequest build() { + com.google.cloud.observability.v1.UpdateSettingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.UpdateSettingsRequest buildPartial() { + com.google.cloud.observability.v1.UpdateSettingsRequest result = + new com.google.cloud.observability.v1.UpdateSettingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.UpdateSettingsRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.settings_ = settingsBuilder_ == null ? settings_ : settingsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.UpdateSettingsRequest) { + return mergeFrom((com.google.cloud.observability.v1.UpdateSettingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.UpdateSettingsRequest other) { + if (other == com.google.cloud.observability.v1.UpdateSettingsRequest.getDefaultInstance()) + return this; + if (other.hasSettings()) { + mergeSettings(other.getSettings()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.observability.v1.Settings settings_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.Settings, + com.google.cloud.observability.v1.Settings.Builder, + com.google.cloud.observability.v1.SettingsOrBuilder> + settingsBuilder_; + + /** + * + * + *
+     * Required. The settings to update.
+     *
+     * The name field of settings is used to identify the resource to be updated.
+     * 
+ * + * + * .google.cloud.observability.v1.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the settings field is set. + */ + public boolean hasSettings() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The settings to update.
+     *
+     * The name field of settings is used to identify the resource to be updated.
+     * 
+ * + * + * .google.cloud.observability.v1.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The settings. + */ + public com.google.cloud.observability.v1.Settings getSettings() { + if (settingsBuilder_ == null) { + return settings_ == null + ? com.google.cloud.observability.v1.Settings.getDefaultInstance() + : settings_; + } else { + return settingsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The settings to update.
+     *
+     * The name field of settings is used to identify the resource to be updated.
+     * 
+ * + * + * .google.cloud.observability.v1.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSettings(com.google.cloud.observability.v1.Settings value) { + if (settingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + settings_ = value; + } else { + settingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The settings to update.
+     *
+     * The name field of settings is used to identify the resource to be updated.
+     * 
+ * + * + * .google.cloud.observability.v1.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSettings(com.google.cloud.observability.v1.Settings.Builder builderForValue) { + if (settingsBuilder_ == null) { + settings_ = builderForValue.build(); + } else { + settingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The settings to update.
+     *
+     * The name field of settings is used to identify the resource to be updated.
+     * 
+ * + * + * .google.cloud.observability.v1.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSettings(com.google.cloud.observability.v1.Settings value) { + if (settingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && settings_ != null + && settings_ != com.google.cloud.observability.v1.Settings.getDefaultInstance()) { + getSettingsBuilder().mergeFrom(value); + } else { + settings_ = value; + } + } else { + settingsBuilder_.mergeFrom(value); + } + if (settings_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The settings to update.
+     *
+     * The name field of settings is used to identify the resource to be updated.
+     * 
+ * + * + * .google.cloud.observability.v1.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSettings() { + bitField0_ = (bitField0_ & ~0x00000001); + settings_ = null; + if (settingsBuilder_ != null) { + settingsBuilder_.dispose(); + settingsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The settings to update.
+     *
+     * The name field of settings is used to identify the resource to be updated.
+     * 
+ * + * + * .google.cloud.observability.v1.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.observability.v1.Settings.Builder getSettingsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetSettingsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The settings to update.
+     *
+     * The name field of settings is used to identify the resource to be updated.
+     * 
+ * + * + * .google.cloud.observability.v1.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.observability.v1.SettingsOrBuilder getSettingsOrBuilder() { + if (settingsBuilder_ != null) { + return settingsBuilder_.getMessageOrBuilder(); + } else { + return settings_ == null + ? com.google.cloud.observability.v1.Settings.getDefaultInstance() + : settings_; + } + } + + /** + * + * + *
+     * Required. The settings to update.
+     *
+     * The name field of settings is used to identify the resource to be updated.
+     * 
+ * + * + * .google.cloud.observability.v1.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.Settings, + com.google.cloud.observability.v1.Settings.Builder, + com.google.cloud.observability.v1.SettingsOrBuilder> + internalGetSettingsFieldBuilder() { + if (settingsBuilder_ == null) { + settingsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.Settings, + com.google.cloud.observability.v1.Settings.Builder, + com.google.cloud.observability.v1.SettingsOrBuilder>( + getSettings(), getParentForChildren(), isClean()); + settings_ = null; + } + return settingsBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. The field mask specifying which fields of the settings are to be
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. The field mask specifying which fields of the settings are to be
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The field mask specifying which fields of the settings are to be
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The field mask specifying which fields of the settings are to be
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The field mask specifying which fields of the settings are to be
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The field mask specifying which fields of the settings are to be
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The field mask specifying which fields of the settings are to be
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The field mask specifying which fields of the settings are to be
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. The field mask specifying which fields of the settings are to be
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.UpdateSettingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.UpdateSettingsRequest) + private static final com.google.cloud.observability.v1.UpdateSettingsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.UpdateSettingsRequest(); + } + + public static com.google.cloud.observability.v1.UpdateSettingsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateSettingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.UpdateSettingsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateSettingsRequestOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateSettingsRequestOrBuilder.java new file mode 100644 index 000000000000..c048d5a4ad0d --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateSettingsRequestOrBuilder.java @@ -0,0 +1,120 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface UpdateSettingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.UpdateSettingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The settings to update.
+   *
+   * The name field of settings is used to identify the resource to be updated.
+   * 
+ * + * + * .google.cloud.observability.v1.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the settings field is set. + */ + boolean hasSettings(); + + /** + * + * + *
+   * Required. The settings to update.
+   *
+   * The name field of settings is used to identify the resource to be updated.
+   * 
+ * + * + * .google.cloud.observability.v1.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The settings. + */ + com.google.cloud.observability.v1.Settings getSettings(); + + /** + * + * + *
+   * Required. The settings to update.
+   *
+   * The name field of settings is used to identify the resource to be updated.
+   * 
+ * + * + * .google.cloud.observability.v1.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.observability.v1.SettingsOrBuilder getSettingsOrBuilder(); + + /** + * + * + *
+   * Optional. The field mask specifying which fields of the settings are to be
+   * updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. The field mask specifying which fields of the settings are to be
+   * updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. The field mask specifying which fields of the settings are to be
+   * updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateTraceScopeRequest.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateTraceScopeRequest.java new file mode 100644 index 000000000000..bc7fcbada297 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateTraceScopeRequest.java @@ -0,0 +1,1013 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * Request for updating a TraceScope.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.UpdateTraceScopeRequest} + */ +@com.google.protobuf.Generated +public final class UpdateTraceScopeRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.UpdateTraceScopeRequest) + UpdateTraceScopeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "UpdateTraceScopeRequest"); + } + + // Use UpdateTraceScopeRequest.newBuilder() to construct. + private UpdateTraceScopeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateTraceScopeRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateTraceScopeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateTraceScopeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.UpdateTraceScopeRequest.class, + com.google.cloud.observability.v1.UpdateTraceScopeRequest.Builder.class); + } + + private int bitField0_; + public static final int TRACE_SCOPE_FIELD_NUMBER = 1; + private com.google.cloud.observability.v1.TraceScope traceScope_; + + /** + * + * + *
+   * Required. The updated trace scope.
+   * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the traceScope field is set. + */ + @java.lang.Override + public boolean hasTraceScope() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The updated trace scope.
+   * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The traceScope. + */ + @java.lang.Override + public com.google.cloud.observability.v1.TraceScope getTraceScope() { + return traceScope_ == null + ? com.google.cloud.observability.v1.TraceScope.getDefaultInstance() + : traceScope_; + } + + /** + * + * + *
+   * Required. The updated trace scope.
+   * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.observability.v1.TraceScopeOrBuilder getTraceScopeOrBuilder() { + return traceScope_ == null + ? com.google.cloud.observability.v1.TraceScope.getDefaultInstance() + : traceScope_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. The list of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The list of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. The list of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getTraceScope()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTraceScope()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.UpdateTraceScopeRequest)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.UpdateTraceScopeRequest other = + (com.google.cloud.observability.v1.UpdateTraceScopeRequest) obj; + + if (hasTraceScope() != other.hasTraceScope()) return false; + if (hasTraceScope()) { + if (!getTraceScope().equals(other.getTraceScope())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTraceScope()) { + hash = (37 * hash) + TRACE_SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getTraceScope().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.UpdateTraceScopeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.UpdateTraceScopeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.UpdateTraceScopeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.UpdateTraceScopeRequest 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.cloud.observability.v1.UpdateTraceScopeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.UpdateTraceScopeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.UpdateTraceScopeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.UpdateTraceScopeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.UpdateTraceScopeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.UpdateTraceScopeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.UpdateTraceScopeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.UpdateTraceScopeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.observability.v1.UpdateTraceScopeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for updating a TraceScope.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.UpdateTraceScopeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.UpdateTraceScopeRequest) + com.google.cloud.observability.v1.UpdateTraceScopeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateTraceScopeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateTraceScopeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.UpdateTraceScopeRequest.class, + com.google.cloud.observability.v1.UpdateTraceScopeRequest.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.UpdateTraceScopeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTraceScopeFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + traceScope_ = null; + if (traceScopeBuilder_ != null) { + traceScopeBuilder_.dispose(); + traceScopeBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_UpdateTraceScopeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.UpdateTraceScopeRequest getDefaultInstanceForType() { + return com.google.cloud.observability.v1.UpdateTraceScopeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.UpdateTraceScopeRequest build() { + com.google.cloud.observability.v1.UpdateTraceScopeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.UpdateTraceScopeRequest buildPartial() { + com.google.cloud.observability.v1.UpdateTraceScopeRequest result = + new com.google.cloud.observability.v1.UpdateTraceScopeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.UpdateTraceScopeRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.traceScope_ = traceScopeBuilder_ == null ? traceScope_ : traceScopeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.UpdateTraceScopeRequest) { + return mergeFrom((com.google.cloud.observability.v1.UpdateTraceScopeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.UpdateTraceScopeRequest other) { + if (other == com.google.cloud.observability.v1.UpdateTraceScopeRequest.getDefaultInstance()) + return this; + if (other.hasTraceScope()) { + mergeTraceScope(other.getTraceScope()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetTraceScopeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.observability.v1.TraceScope traceScope_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.TraceScope, + com.google.cloud.observability.v1.TraceScope.Builder, + com.google.cloud.observability.v1.TraceScopeOrBuilder> + traceScopeBuilder_; + + /** + * + * + *
+     * Required. The updated trace scope.
+     * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the traceScope field is set. + */ + public boolean hasTraceScope() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The updated trace scope.
+     * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The traceScope. + */ + public com.google.cloud.observability.v1.TraceScope getTraceScope() { + if (traceScopeBuilder_ == null) { + return traceScope_ == null + ? com.google.cloud.observability.v1.TraceScope.getDefaultInstance() + : traceScope_; + } else { + return traceScopeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The updated trace scope.
+     * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTraceScope(com.google.cloud.observability.v1.TraceScope value) { + if (traceScopeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + traceScope_ = value; + } else { + traceScopeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The updated trace scope.
+     * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTraceScope( + com.google.cloud.observability.v1.TraceScope.Builder builderForValue) { + if (traceScopeBuilder_ == null) { + traceScope_ = builderForValue.build(); + } else { + traceScopeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The updated trace scope.
+     * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTraceScope(com.google.cloud.observability.v1.TraceScope value) { + if (traceScopeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && traceScope_ != null + && traceScope_ != com.google.cloud.observability.v1.TraceScope.getDefaultInstance()) { + getTraceScopeBuilder().mergeFrom(value); + } else { + traceScope_ = value; + } + } else { + traceScopeBuilder_.mergeFrom(value); + } + if (traceScope_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The updated trace scope.
+     * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTraceScope() { + bitField0_ = (bitField0_ & ~0x00000001); + traceScope_ = null; + if (traceScopeBuilder_ != null) { + traceScopeBuilder_.dispose(); + traceScopeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The updated trace scope.
+     * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.observability.v1.TraceScope.Builder getTraceScopeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetTraceScopeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The updated trace scope.
+     * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.observability.v1.TraceScopeOrBuilder getTraceScopeOrBuilder() { + if (traceScopeBuilder_ != null) { + return traceScopeBuilder_.getMessageOrBuilder(); + } else { + return traceScope_ == null + ? com.google.cloud.observability.v1.TraceScope.getDefaultInstance() + : traceScope_; + } + } + + /** + * + * + *
+     * Required. The updated trace scope.
+     * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.TraceScope, + com.google.cloud.observability.v1.TraceScope.Builder, + com.google.cloud.observability.v1.TraceScopeOrBuilder> + internalGetTraceScopeFieldBuilder() { + if (traceScopeBuilder_ == null) { + traceScopeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.observability.v1.TraceScope, + com.google.cloud.observability.v1.TraceScope.Builder, + com.google.cloud.observability.v1.TraceScopeOrBuilder>( + getTraceScope(), getParentForChildren(), isClean()); + traceScope_ = null; + } + return traceScopeBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.UpdateTraceScopeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.UpdateTraceScopeRequest) + private static final com.google.cloud.observability.v1.UpdateTraceScopeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.UpdateTraceScopeRequest(); + } + + public static com.google.cloud.observability.v1.UpdateTraceScopeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateTraceScopeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.UpdateTraceScopeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateTraceScopeRequestOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateTraceScopeRequestOrBuilder.java new file mode 100644 index 000000000000..563d3af02efd --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/UpdateTraceScopeRequestOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface UpdateTraceScopeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.UpdateTraceScopeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The updated trace scope.
+   * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the traceScope field is set. + */ + boolean hasTraceScope(); + + /** + * + * + *
+   * Required. The updated trace scope.
+   * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The traceScope. + */ + com.google.cloud.observability.v1.TraceScope getTraceScope(); + + /** + * + * + *
+   * Required. The updated trace scope.
+   * 
+ * + * + * .google.cloud.observability.v1.TraceScope trace_scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.observability.v1.TraceScopeOrBuilder getTraceScopeOrBuilder(); + + /** + * + * + *
+   * Optional. The list of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. The list of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. The list of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/View.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/View.java new file mode 100644 index 000000000000..8272b6c99a8c --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/View.java @@ -0,0 +1,1595 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +/** + * + * + *
+ * A view corresponds to a read-only representation of a subset of the data in
+ * a dataset.
+ * 
+ * + * Protobuf type {@code google.cloud.observability.v1.View} + */ +@com.google.protobuf.Generated +public final class View extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.observability.v1.View) + ViewOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "View"); + } + + // Use View.newBuilder() to construct. + private View(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private View() { + name_ = ""; + displayName_ = ""; + description_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_View_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_View_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.View.class, + com.google.cloud.observability.v1.View.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. Name of the view. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[VIEW_ID]
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. Name of the view. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[VIEW_ID]
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Optional. User friendly display name.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. User friendly display name.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. Description of the view.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Description of the view.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + 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. Create timestamp.
+   * 
+ * + * .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 ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Create timestamp.
+   * 
+ * + * .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. Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. Update timestamp.
+   * 
+ * + * .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 ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. Update timestamp.
+   * 
+ * + * .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. Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, description_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, displayName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, description_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.observability.v1.View)) { + return super.equals(obj); + } + com.google.cloud.observability.v1.View other = (com.google.cloud.observability.v1.View) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) 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 (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.observability.v1.View parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.View parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.View parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.View 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.cloud.observability.v1.View parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.observability.v1.View parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.observability.v1.View parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.View parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.View parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.View parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.observability.v1.View parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.observability.v1.View parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.observability.v1.View prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A view corresponds to a read-only representation of a subset of the data in
+   * a dataset.
+   * 
+ * + * Protobuf type {@code google.cloud.observability.v1.View} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.observability.v1.View) + com.google.cloud.observability.v1.ViewOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_View_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_View_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.observability.v1.View.class, + com.google.cloud.observability.v1.View.Builder.class); + } + + // Construct using com.google.cloud.observability.v1.View.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + description_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.observability.v1.ObservabilityProto + .internal_static_google_cloud_observability_v1_View_descriptor; + } + + @java.lang.Override + public com.google.cloud.observability.v1.View getDefaultInstanceForType() { + return com.google.cloud.observability.v1.View.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.observability.v1.View build() { + com.google.cloud.observability.v1.View result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.observability.v1.View buildPartial() { + com.google.cloud.observability.v1.View result = + new com.google.cloud.observability.v1.View(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.observability.v1.View result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.observability.v1.View) { + return mergeFrom((com.google.cloud.observability.v1.View) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.observability.v1.View other) { + if (other == com.google.cloud.observability.v1.View.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 34: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. Name of the view. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[VIEW_ID]
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. Name of the view. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[VIEW_ID]
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. Name of the view. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[VIEW_ID]
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Name of the view. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[VIEW_ID]
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Name of the view. The format is:
+     *
+     * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[VIEW_ID]
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Optional. User friendly display name.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. User friendly display name.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. User friendly display name.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. User friendly display name.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. User friendly display name.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. Description of the view.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Description of the view.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Description of the view.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Description of the view.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Description of the view.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .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. Create timestamp.
+     * 
+ * + * + * .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; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .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(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .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. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .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. Update timestamp.
+     * 
+ * + * + * .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; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .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(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .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. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.observability.v1.View) + } + + // @@protoc_insertion_point(class_scope:google.cloud.observability.v1.View) + private static final com.google.cloud.observability.v1.View DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.observability.v1.View(); + } + + public static com.google.cloud.observability.v1.View getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public View parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.observability.v1.View getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ViewName.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ViewName.java new file mode 100644 index 000000000000..bf21ccf400ac --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ViewName.java @@ -0,0 +1,301 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.cloud.observability.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class ViewName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_BUCKET_DATASET_VIEW = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/buckets/{bucket}/datasets/{dataset}/views/{view}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String bucket; + private final String dataset; + private final String view; + + @Deprecated + protected ViewName() { + project = null; + location = null; + bucket = null; + dataset = null; + view = null; + } + + private ViewName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + bucket = Preconditions.checkNotNull(builder.getBucket()); + dataset = Preconditions.checkNotNull(builder.getDataset()); + view = Preconditions.checkNotNull(builder.getView()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBucket() { + return bucket; + } + + public String getDataset() { + return dataset; + } + + public String getView() { + return view; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ViewName of( + String project, String location, String bucket, String dataset, String view) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBucket(bucket) + .setDataset(dataset) + .setView(view) + .build(); + } + + public static String format( + String project, String location, String bucket, String dataset, String view) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBucket(bucket) + .setDataset(dataset) + .setView(view) + .build() + .toString(); + } + + public static @Nullable ViewName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_BUCKET_DATASET_VIEW.validatedMatch( + formattedString, "ViewName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("bucket"), + matchMap.get("dataset"), + matchMap.get("view")); + } + + 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<@Nullable ViewName> values) { + List list = new ArrayList<>(values.size()); + for (ViewName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_BUCKET_DATASET_VIEW.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 (dataset != null) { + fieldMapBuilder.put("dataset", dataset); + } + if (view != null) { + fieldMapBuilder.put("view", view); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_BUCKET_DATASET_VIEW.instantiate( + "project", + project, + "location", + location, + "bucket", + bucket, + "dataset", + dataset, + "view", + view); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ViewName that = ((ViewName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.bucket, that.bucket) + && Objects.equals(this.dataset, that.dataset) + && Objects.equals(this.view, that.view); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(bucket); + h *= 1000003; + h ^= Objects.hashCode(dataset); + h *= 1000003; + h ^= Objects.hashCode(view); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/buckets/{bucket}/datasets/{dataset}/views/{view}. + */ + public static class Builder { + private String project; + private String location; + private String bucket; + private String dataset; + private String view; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBucket() { + return bucket; + } + + public String getDataset() { + return dataset; + } + + 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 setDataset(String dataset) { + this.dataset = dataset; + return this; + } + + public Builder setView(String view) { + this.view = view; + return this; + } + + private Builder(ViewName viewName) { + this.project = viewName.project; + this.location = viewName.location; + this.bucket = viewName.bucket; + this.dataset = viewName.dataset; + this.view = viewName.view; + } + + public ViewName build() { + return new ViewName(this); + } + } +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ViewOrBuilder.java b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ViewOrBuilder.java new file mode 100644 index 000000000000..3c1eb5ede14c --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/java/com/google/cloud/observability/v1/ViewOrBuilder.java @@ -0,0 +1,190 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/observability/v1/observability.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.observability.v1; + +@com.google.protobuf.Generated +public interface ViewOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.observability.v1.View) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. Name of the view. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[VIEW_ID]
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. Name of the view. The format is:
+   *
+   * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[VIEW_ID]
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. User friendly display name.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Optional. User friendly display name.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. Description of the view.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. Description of the view.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-observability/proto-google-cloud-observability-v1/src/main/proto/google/cloud/observability/v1/observability.proto b/java-observability/proto-google-cloud-observability-v1/src/main/proto/google/cloud/observability/v1/observability.proto new file mode 100644 index 000000000000..f44f959887d6 --- /dev/null +++ b/java-observability/proto-google-cloud-observability-v1/src/main/proto/google/cloud/observability/v1/observability.proto @@ -0,0 +1,1004 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.observability.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Observability.V1"; +option go_package = "cloud.google.com/go/observability/apiv1/observabilitypb;observabilitypb"; +option java_multiple_files = true; +option java_outer_classname = "ObservabilityProto"; +option java_package = "com.google.cloud.observability.v1"; +option php_namespace = "Google\\Cloud\\Observability\\V1"; +option ruby_package = "Google::Cloud::Observability::V1"; + +// Service describing handlers for resources +service Observability { + option (google.api.default_host) = "observability.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Gets details of a single Scope. + rpc GetScope(GetScopeRequest) returns (Scope) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/scopes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the parameters of a single Scope. + rpc UpdateScope(UpdateScopeRequest) returns (Scope) { + option (google.api.http) = { + patch: "/v1/{scope.name=projects/*/locations/*/scopes/*}" + body: "scope" + }; + option (google.api.method_signature) = "scope,update_mask"; + } + + // Get bucket resource. + rpc GetBucket(GetBucketRequest) returns (Bucket) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/buckets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List buckets of a project in a particular location. + rpc ListBuckets(ListBucketsRequest) returns (ListBucketsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/buckets" + }; + option (google.api.method_signature) = "parent"; + } + + // Create a new bucket. + rpc CreateBucket(CreateBucketRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/buckets" + body: "bucket" + }; + option (google.api.method_signature) = "parent,bucket,bucket_id"; + option (google.longrunning.operation_info) = { + response_type: "Bucket" + metadata_type: "OperationMetadata" + }; + } + + // Update a bucket. + rpc UpdateBucket(UpdateBucketRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{bucket.name=projects/*/locations/*/buckets/*}" + body: "bucket" + }; + option (google.api.method_signature) = "bucket,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Bucket" + metadata_type: "OperationMetadata" + }; + } + + // Get a dataset. + rpc GetDataset(GetDatasetRequest) returns (Dataset) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/buckets/*/datasets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List datasets of a bucket. + rpc ListDatasets(ListDatasetsRequest) returns (ListDatasetsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/buckets/*}/datasets" + }; + option (google.api.method_signature) = "parent"; + } + + // Get a view. + rpc GetView(GetViewRequest) returns (View) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/buckets/*/datasets/*/views/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List views of a dataset. + rpc ListViews(ListViewsRequest) returns (ListViewsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/buckets/*/datasets/*}/views" + }; + option (google.api.method_signature) = "parent"; + } + + // Get a link. + rpc GetLink(GetLinkRequest) returns (Link) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/buckets/*/datasets/*/links/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List links of a dataset. + rpc ListLinks(ListLinksRequest) returns (ListLinksResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/buckets/*/datasets/*}/links" + }; + option (google.api.method_signature) = "parent"; + } + + // Create a new link. + rpc CreateLink(CreateLinkRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/buckets/*/datasets/*}/links" + body: "link" + }; + option (google.api.method_signature) = "parent,link,link_id"; + option (google.longrunning.operation_info) = { + response_type: "Link" + metadata_type: "OperationMetadata" + }; + } + + // Update a link. + rpc UpdateLink(UpdateLinkRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{link.name=projects/*/locations/*/buckets/*/datasets/*/links/*}" + body: "link" + }; + option (google.api.method_signature) = "link,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Link" + metadata_type: "OperationMetadata" + }; + } + + // Delete a link. + rpc DeleteLink(DeleteLinkRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/buckets/*/datasets/*/links/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Get TraceScope resource. + rpc GetTraceScope(GetTraceScopeRequest) returns (TraceScope) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/traceScopes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List TraceScopes of a project in a particular location. + rpc ListTraceScopes(ListTraceScopesRequest) + returns (ListTraceScopesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/traceScopes" + }; + option (google.api.method_signature) = "parent"; + } + + // Create a new TraceScope. + rpc CreateTraceScope(CreateTraceScopeRequest) returns (TraceScope) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/traceScopes" + body: "trace_scope" + }; + option (google.api.method_signature) = "parent,trace_scope,trace_scope_id"; + } + + // Update a TraceScope. + rpc UpdateTraceScope(UpdateTraceScopeRequest) returns (TraceScope) { + option (google.api.http) = { + patch: "/v1/{trace_scope.name=projects/*/locations/*/traceScopes/*}" + body: "trace_scope" + }; + option (google.api.method_signature) = "trace_scope,update_mask"; + } + + // Delete a TraceScope. + rpc DeleteTraceScope(DeleteTraceScopeRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/traceScopes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Get Settings + rpc GetSettings(GetSettingsRequest) returns (Settings) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/settings}" + additional_bindings { get: "/v1/{name=folders/*/locations/*/settings}" } + additional_bindings { + get: "/v1/{name=organizations/*/locations/*/settings}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Update Settings + rpc UpdateSettings(UpdateSettingsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{settings.name=projects/*/locations/*/settings}" + body: "settings" + additional_bindings { + patch: "/v1/{settings.name=folders/*/locations/*/settings}" + body: "settings" + } + additional_bindings { + patch: "/v1/{settings.name=organizations/*/locations/*/settings}" + body: "settings" + } + }; + option (google.api.method_signature) = "settings,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Settings" + metadata_type: "OperationMetadata" + }; + } +} + +// Settings for configuring CMEK for a bucket. +message CmekSettings { + // Optional. The resource name for the configured Cloud KMS key. The format + // is: + // + // projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY] + // + // For example: + // + // projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key + string kms_key = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The CryptoKeyVersion resource name for the configured Cloud + // KMS key. The format is: + // + // projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION] + // + // For example: + // + // projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1 + // + // This read-only field is used to convey the specific configured + // CryptoKeyVersion of the `kms_key` that has been configured. It is + // populated when the CMEK settings are bound to a single key version. + string kms_key_version = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The service account used to access the key. + string service_account_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Describes the settings associated with a project, organization, or folder. +message Settings { + option (google.api.resource) = { + type: "observability.googleapis.com/Settings" + pattern: "projects/{project}/locations/{location}/settings" + pattern: "organizations/{organization}/locations/{location}/settings" + pattern: "folders/{folder}/locations/{location}/settings" + plural: "settings" + singular: "settings" + }; + + // Identifier. The resource name of the settings. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. The location which should be used when any regional resources are + // provisioned by Google Cloud. + string default_storage_location = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The service account for the given resource container, such as + // project or folder. This will be used by Cloud Observability to perform + // actions in the container's project like access KMS keys or create Links. + // Always the same service account per resource container regardless of + // region. + string service_account_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The resource name for the configured Cloud KMS key. + // + // KMS key name format: + // + // "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" + // + // For example: + // + // `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` + string kms_key_name = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Bucket configuration for storing observability data. +message Bucket { + option (google.api.resource) = { + type: "observability.googleapis.com/Bucket" + pattern: "projects/{project}/locations/{location}/buckets/{bucket}" + plural: "buckets" + singular: "bucket" + }; + + // Identifier. Name of the bucket. The format is: + // + // projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID] + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. User friendly display name. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the bucket. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Create timestamp. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Update timestamp. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Delete timestamp. + google.protobuf.Timestamp delete_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when the bucket in soft-deleted state is purged. + google.protobuf.Timestamp purge_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Settings for configuring CMEK on a bucket. + CmekSettings cmek_settings = 9 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for creating a bucket. +message CreateBucketRequest { + // Required. Name of the project and location for the bucket. The format is: + // + // projects/[PROJECT_ID]/locations/[LOCATION] + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "observability.googleapis.com/Bucket" + } + ]; + + // Required. Id of the bucket to create. + string bucket_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Bucket to create. + Bucket bucket = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for updating a bucket. +message UpdateBucketRequest { + // Required. The bucket to update. + // + // The name field of bucket identifies the resource to update. + Bucket bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for getting a bucket. +message GetBucketRequest { + // Required. Name of the bucket to retrieve. The format is: + // + // projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID] + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "observability.googleapis.com/Bucket" + } + ]; +} + +// Request for listing buckets. +message ListBucketsRequest { + // Required. The parent, which owns this collection of buckets. The format is: + // + // projects/[PROJECT_ID]/locations/[LOCATION] + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "observability.googleapis.com/Bucket" + } + ]; + + // Optional. The maximum number of buckets to return. If unspecified, then at + // most 100 buckets are returned. The maximum value is 1000; values above 1000 + // are coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListBuckets` call. + // Provide this to retrieve the subsequent page. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, then the response will include deleted buckets. + bool show_deleted = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for listing buckets. +message ListBucketsResponse { + // Optional. The list of buckets. + repeated Bucket buckets = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token that can be sent as `page_token` to retrieve the next + // page. When this field is omitted, there are no subsequent pages. + string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A dataset is a collection of data that has a specific configuration. A +// dataset can be backed by multiple tables. One bucket can have multiple +// datasets. +message Dataset { + option (google.api.resource) = { + type: "observability.googleapis.com/Dataset" + pattern: "projects/{project}/locations/{location}/buckets/{bucket}/datasets/{dataset}" + plural: "datasets" + singular: "dataset" + }; + + // Identifier. Name of the dataset. The format is: + // + // projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID] + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. User friendly display name. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the dataset. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Create timestamp. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Delete timestamp. + google.protobuf.Timestamp delete_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when the dataset in soft-deleted state is purged. + google.protobuf.Timestamp purge_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request for getting a dataset. +message GetDatasetRequest { + // Required. Name of the dataset to retrieve. The format is: + // + // projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID] + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "observability.googleapis.com/Dataset" + } + ]; +} + +// Request for listing datasets. +message ListDatasetsRequest { + // Required. The parent bucket that owns this collection of datasets. The + // format is: + // + // projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID] + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "observability.googleapis.com/Dataset" + } + ]; + + // Optional. The maximum number of datasets to return. If unspecified, then at + // most 100 datasets are returned. The maximum value is 1000; values above + // 1000 are coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListDatasets` call. + // Provide this to retrieve the subsequent page. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, then the response will include deleted datasets. + bool show_deleted = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for listing datasets. +message ListDatasetsResponse { + // The list of datasets. + repeated Dataset datasets = 1; + + // A token that can be sent as `page_token` to retrieve the next page. When + // this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// A view corresponds to a read-only representation of a subset of the data in +// a dataset. +message View { + option (google.api.resource) = { + type: "observability.googleapis.com/View" + pattern: "projects/{project}/locations/{location}/buckets/{bucket}/datasets/{dataset}/views/{view}" + plural: "views" + singular: "view" + }; + + // Identifier. Name of the view. The format is: + // + // projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[VIEW_ID] + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. User friendly display name. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the view. + string description = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Create timestamp. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Update timestamp. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request for getting a view. +message GetViewRequest { + // Required. Name of the view to retrieve. The format is: + // + // projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[VIEW_ID] + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "observability.googleapis.com/View" + } + ]; +} + +// Request for listing views. +message ListViewsRequest { + // Required. Dataset whose views are to be listed. The format is: + // + // projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID] + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "observability.googleapis.com/View" + } + ]; + + // Optional. The maximum number of views to return. If unspecified, then at + // most 100 views are returned. The maximum value is 1000; values above 1000 + // are coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListViews` call. Provide + // this to retrieve the subsequent page. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for listing views. +message ListViewsResponse { + // The list of views. + repeated View views = 1; + + // Optional. A token that can be sent as `page_token` to retrieve the next + // page. When this field is omitted, there are no subsequent pages. + string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A link lets a dataset be accessible to BigQuery via usage of linked datasets. +message Link { + option (google.api.resource) = { + type: "observability.googleapis.com/Link" + pattern: "projects/{project}/locations/{location}/buckets/{bucket}/datasets/{dataset}/links/{link}" + plural: "links" + singular: "link" + }; + + // Identifier. Name of the link. The format is: + // + // projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID] + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. A user friendly display name. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the link. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Create timestamp. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request for creating a link. +message CreateLinkRequest { + // Required. Name of the containing dataset for this link. The format is: + // + // projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID] + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "observability.googleapis.com/Link" + } + ]; + + // Required. Id of the link to create. + string link_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Link to create. + Link link = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for updating a link. +message UpdateLinkRequest { + // Required. Link to update. + // + // The name field of link identifies the resource to update. + Link link = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for getting a link. +message GetLinkRequest { + // Required. Name of the link to retrieve. The format is: + // + // projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID] + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "observability.googleapis.com/Link" + } + ]; +} + +// Request for listing links. +message ListLinksRequest { + // Required. The parent dataset that owns this collection of links. The format + // is: + // + // projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID] + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "observability.googleapis.com/Link" + } + ]; + + // Optional. The maximum number of links to return. If unspecified, then at + // most 100 links are returned. The maximum value is 1000; values above 1000 + // are coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListLinks` call. Provide + // this to retrieve the subsequent page. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for listing links. +message ListLinksResponse { + // The list of links. + repeated Link links = 1; + + // Optional. A token that can be sent as `page_token` to retrieve the next + // page. When this field is omitted, there are no subsequent pages. + string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for deleting a link. +message DeleteLinkRequest { + // Required. Name of the link to delete. The format is: + // + // projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID] + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "observability.googleapis.com/Link" + } + ]; +} + +// Message describing Scope object +message Scope { + option (google.api.resource) = { + type: "observability.googleapis.com/Scope" + pattern: "projects/{project}/locations/{location}/scopes/{scope}" + plural: "scopes" + singular: "scope" + }; + + // Identifier. Name of the resource. The format is: + // + // projects/{project}/locations/{location}/scopes/{scope} + // + // The `{location}` field must be set to `global`. The `{scope}` field must + // be set to `_Default`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Update timestamp. + // Note: The Update timestamp for the default scope is initially unset. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The full resource name of the `logging.googleapis.com/LogScope`. + // For example: + // + // //logging.googleapis.com/projects/myproject/locations/global/logScopes/my-log-scope + string log_scope = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "*" } + ]; + + // Required. The unqualified resource name of the + // `cloudtrace.googleapis.com/TraceScope`. For example: + // + // projects/myproject/locations/global/traceScopes/my-trace-scope + string trace_scope = 6 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "*" } + ]; +} + +// Message for getting a Scope. +message GetScopeRequest { + // Required. Name of the resource. The format is: + // + // projects/{project}/locations/{location}/scopes/{scope} + // + // The `{location}` field must be set to `global`. The `{scope}` field must + // be set to `_Default`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "observability.googleapis.com/Scope" + } + ]; +} + +// Message for updating a Scope. +message UpdateScopeRequest { + // Optional. Field mask is used to specify the fields to be overwritten in the + // Scope resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field is overwritten when it is in the mask. If the + // user does not provide a mask, then all fields present in the request are + // overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The resource being updated. + Scope scope = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have been cancelled successfully + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A trace scope is a collection of resources whose traces are queried together. +message TraceScope { + option (google.api.resource) = { + type: "observability.googleapis.com/TraceScope" + pattern: "projects/{project}/locations/{location}/traceScopes/{trace_scope}" + plural: "traceScopes" + singular: "traceScope" + }; + + // Identifier. The resource name of the trace scope. + // + // For example: + // + // projects/my-project/locations/global/traceScopes/my-trace-scope + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. Names of the projects that are included in this trace scope. + // + // * `projects/[PROJECT_ID]` + // + // A trace scope can include a maximum of 20 projects. + repeated string resource_names = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "*" } + ]; + + // Optional. Describes this trace scope. + // + // The maximum length of the description is 8000 characters. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The creation timestamp of the trace scope. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update timestamp of the trace scope. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request for creating a TraceScope. +message CreateTraceScopeRequest { + // Required. The full resource name of the location where the trace scope + // should be created + // + // projects/[PROJECT_ID]/locations/[LOCATION_ID] + // + // For example: + // + // projects/my-project/locations/global + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "observability.googleapis.com/TraceScope" + } + ]; + + // Required. A client-assigned identifier for the trace scope. + string trace_scope_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The new trace scope. + TraceScope trace_scope = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for getting a TraceScope. +message GetTraceScopeRequest { + // Required. The resource name of the trace scope: + // + // projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID] + // + // For example: + // + // projects/my-project/locations/global/traceScopes/my-trace-scope + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "observability.googleapis.com/TraceScope" + } + ]; +} + +// Request for listing TraceScopes. +message ListTraceScopesRequest { + // Required. The full resource name of the location to look for trace scopes: + // + // projects/[PROJECT_ID]/locations/[LOCATION_ID] + // + // For example: + // + // projects/my-project/locations/global + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "observability.googleapis.com/TraceScope" + } + ]; + + // Optional. The maximum number of results to return from this request. + // + // Non-positive values are ignored. The presence of `next_page_token` in the + // response indicates that more results might be available. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If present, then retrieve the next batch of results from the + // preceding call to this method. `page_token` must be the value of + // `next_page_token` from the previous response. The values of other method + // parameters should be identical to those in the previous call. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for listing TraceScopes. +message ListTraceScopesResponse { + // Optional. A list of trace scopes. + repeated TraceScope trace_scopes = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If there might be more results than appear in this response, then + // `next_page_token` is included. To get the next set of results, call the + // same method again using the value of `next_page_token` as `page_token`. + string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for updating a TraceScope. +message UpdateTraceScopeRequest { + // Required. The updated trace scope. + TraceScope trace_scope = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for deleting a TraceScope. +message DeleteTraceScopeRequest { + // Required. The full resource name of the trace scope to delete: + // + // projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID] + // + // For example: + // + // projects/my-project/locations/global/traceScopes/my-trace-scope + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "observability.googleapis.com/TraceScope" + } + ]; +} + +// Request for getting Settings. +message GetSettingsRequest { + // Required. Name of the settings to retrieve. + // + // Name format: + // + // "projects/[PROJECT_ID]/locations/[LOCATION]/settings" + // "folders/[FOLDER_ID]/locations/[LOCATION]/settings" + // "organizations/[ORGANIZATION_ID]/locations/[LOCATION]/settings" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "observability.googleapis.com/Settings" + } + ]; +} + +// Request for updating Settings. +message UpdateSettingsRequest { + // Required. The settings to update. + // + // The name field of settings is used to identify the resource to be updated. + Settings settings = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The field mask specifying which fields of the settings are to be + // updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/create/SyncCreateSetCredentialsProvider.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..2be55d2f9575 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.ObservabilitySettings; +import com.google.cloud.observability.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ObservabilitySettings observabilitySettings = + ObservabilitySettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ObservabilityClient observabilityClient = ObservabilityClient.create(observabilitySettings); + } +} +// [END observability_v1_generated_Observability_Create_SetCredentialsProvider_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/create/SyncCreateSetEndpoint.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..7bb79e011850 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_Create_SetEndpoint_sync] +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.ObservabilitySettings; +import com.google.cloud.observability.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ObservabilitySettings observabilitySettings = + ObservabilitySettings.newBuilder().setEndpoint(myEndpoint).build(); + ObservabilityClient observabilityClient = ObservabilityClient.create(observabilitySettings); + } +} +// [END observability_v1_generated_Observability_Create_SetEndpoint_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/create/SyncCreateUseHttpJsonTransport.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..db6098987bf7 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,40 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_Create_UseHttpJsonTransport_sync] +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.ObservabilitySettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ObservabilitySettings observabilitySettings = + ObservabilitySettings.newHttpJsonBuilder().build(); + ObservabilityClient observabilityClient = ObservabilityClient.create(observabilitySettings); + } +} +// [END observability_v1_generated_Observability_Create_UseHttpJsonTransport_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createbucket/AsyncCreateBucket.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createbucket/AsyncCreateBucket.java new file mode 100644 index 000000000000..e46f65110813 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createbucket/AsyncCreateBucket.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_CreateBucket_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.observability.v1.Bucket; +import com.google.cloud.observability.v1.CreateBucketRequest; +import com.google.cloud.observability.v1.LocationName; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.longrunning.Operation; + +public class AsyncCreateBucket { + + public static void main(String[] args) throws Exception { + asyncCreateBucket(); + } + + public static void asyncCreateBucket() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + CreateBucketRequest request = + CreateBucketRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setBucketId("bucketId-1603305307") + .setBucket(Bucket.newBuilder().build()) + .build(); + ApiFuture future = observabilityClient.createBucketCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END observability_v1_generated_Observability_CreateBucket_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createbucket/AsyncCreateBucketLRO.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createbucket/AsyncCreateBucketLRO.java new file mode 100644 index 000000000000..471c6dc76725 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createbucket/AsyncCreateBucketLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_CreateBucket_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.observability.v1.Bucket; +import com.google.cloud.observability.v1.CreateBucketRequest; +import com.google.cloud.observability.v1.LocationName; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.OperationMetadata; + +public class AsyncCreateBucketLRO { + + public static void main(String[] args) throws Exception { + asyncCreateBucketLRO(); + } + + public static void asyncCreateBucketLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + CreateBucketRequest request = + CreateBucketRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setBucketId("bucketId-1603305307") + .setBucket(Bucket.newBuilder().build()) + .build(); + OperationFuture future = + observabilityClient.createBucketOperationCallable().futureCall(request); + // Do something. + Bucket response = future.get(); + } + } +} +// [END observability_v1_generated_Observability_CreateBucket_LRO_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createbucket/SyncCreateBucket.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createbucket/SyncCreateBucket.java new file mode 100644 index 000000000000..2c73c4d6ded9 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createbucket/SyncCreateBucket.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_CreateBucket_sync] +import com.google.cloud.observability.v1.Bucket; +import com.google.cloud.observability.v1.CreateBucketRequest; +import com.google.cloud.observability.v1.LocationName; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncCreateBucket { + + public static void main(String[] args) throws Exception { + syncCreateBucket(); + } + + public static void syncCreateBucket() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + CreateBucketRequest request = + CreateBucketRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setBucketId("bucketId-1603305307") + .setBucket(Bucket.newBuilder().build()) + .build(); + Bucket response = observabilityClient.createBucketAsync(request).get(); + } + } +} +// [END observability_v1_generated_Observability_CreateBucket_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createbucket/SyncCreateBucketLocationnameBucketString.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createbucket/SyncCreateBucketLocationnameBucketString.java new file mode 100644 index 000000000000..af4a390c7bd7 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createbucket/SyncCreateBucketLocationnameBucketString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_CreateBucket_LocationnameBucketString_sync] +import com.google.cloud.observability.v1.Bucket; +import com.google.cloud.observability.v1.LocationName; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncCreateBucketLocationnameBucketString { + + public static void main(String[] args) throws Exception { + syncCreateBucketLocationnameBucketString(); + } + + public static void syncCreateBucketLocationnameBucketString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Bucket bucket = Bucket.newBuilder().build(); + String bucketId = "bucketId-1603305307"; + Bucket response = observabilityClient.createBucketAsync(parent, bucket, bucketId).get(); + } + } +} +// [END observability_v1_generated_Observability_CreateBucket_LocationnameBucketString_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createbucket/SyncCreateBucketStringBucketString.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createbucket/SyncCreateBucketStringBucketString.java new file mode 100644 index 000000000000..3cb7b3520023 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createbucket/SyncCreateBucketStringBucketString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_CreateBucket_StringBucketString_sync] +import com.google.cloud.observability.v1.Bucket; +import com.google.cloud.observability.v1.LocationName; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncCreateBucketStringBucketString { + + public static void main(String[] args) throws Exception { + syncCreateBucketStringBucketString(); + } + + public static void syncCreateBucketStringBucketString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Bucket bucket = Bucket.newBuilder().build(); + String bucketId = "bucketId-1603305307"; + Bucket response = observabilityClient.createBucketAsync(parent, bucket, bucketId).get(); + } + } +} +// [END observability_v1_generated_Observability_CreateBucket_StringBucketString_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createlink/AsyncCreateLink.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createlink/AsyncCreateLink.java new file mode 100644 index 000000000000..56842b2eee1f --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createlink/AsyncCreateLink.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_CreateLink_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.observability.v1.CreateLinkRequest; +import com.google.cloud.observability.v1.DatasetName; +import com.google.cloud.observability.v1.Link; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.longrunning.Operation; + +public class AsyncCreateLink { + + public static void main(String[] args) throws Exception { + asyncCreateLink(); + } + + public static void asyncCreateLink() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + CreateLinkRequest request = + CreateLinkRequest.newBuilder() + .setParent( + DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString()) + .setLinkId("linkId-1102667083") + .setLink(Link.newBuilder().build()) + .build(); + ApiFuture future = observabilityClient.createLinkCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END observability_v1_generated_Observability_CreateLink_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createlink/AsyncCreateLinkLRO.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createlink/AsyncCreateLinkLRO.java new file mode 100644 index 000000000000..36ea6d16ac98 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createlink/AsyncCreateLinkLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_CreateLink_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.observability.v1.CreateLinkRequest; +import com.google.cloud.observability.v1.DatasetName; +import com.google.cloud.observability.v1.Link; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.OperationMetadata; + +public class AsyncCreateLinkLRO { + + public static void main(String[] args) throws Exception { + asyncCreateLinkLRO(); + } + + public static void asyncCreateLinkLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + CreateLinkRequest request = + CreateLinkRequest.newBuilder() + .setParent( + DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString()) + .setLinkId("linkId-1102667083") + .setLink(Link.newBuilder().build()) + .build(); + OperationFuture future = + observabilityClient.createLinkOperationCallable().futureCall(request); + // Do something. + Link response = future.get(); + } + } +} +// [END observability_v1_generated_Observability_CreateLink_LRO_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createlink/SyncCreateLink.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createlink/SyncCreateLink.java new file mode 100644 index 000000000000..1c7a41c0bf5c --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createlink/SyncCreateLink.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_CreateLink_sync] +import com.google.cloud.observability.v1.CreateLinkRequest; +import com.google.cloud.observability.v1.DatasetName; +import com.google.cloud.observability.v1.Link; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncCreateLink { + + public static void main(String[] args) throws Exception { + syncCreateLink(); + } + + public static void syncCreateLink() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + CreateLinkRequest request = + CreateLinkRequest.newBuilder() + .setParent( + DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString()) + .setLinkId("linkId-1102667083") + .setLink(Link.newBuilder().build()) + .build(); + Link response = observabilityClient.createLinkAsync(request).get(); + } + } +} +// [END observability_v1_generated_Observability_CreateLink_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createlink/SyncCreateLinkDatasetnameLinkString.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createlink/SyncCreateLinkDatasetnameLinkString.java new file mode 100644 index 000000000000..8531ee843c40 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createlink/SyncCreateLinkDatasetnameLinkString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_CreateLink_DatasetnameLinkString_sync] +import com.google.cloud.observability.v1.DatasetName; +import com.google.cloud.observability.v1.Link; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncCreateLinkDatasetnameLinkString { + + public static void main(String[] args) throws Exception { + syncCreateLinkDatasetnameLinkString(); + } + + public static void syncCreateLinkDatasetnameLinkString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]"); + Link link = Link.newBuilder().build(); + String linkId = "linkId-1102667083"; + Link response = observabilityClient.createLinkAsync(parent, link, linkId).get(); + } + } +} +// [END observability_v1_generated_Observability_CreateLink_DatasetnameLinkString_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createlink/SyncCreateLinkStringLinkString.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createlink/SyncCreateLinkStringLinkString.java new file mode 100644 index 000000000000..b5117595d256 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createlink/SyncCreateLinkStringLinkString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_CreateLink_StringLinkString_sync] +import com.google.cloud.observability.v1.DatasetName; +import com.google.cloud.observability.v1.Link; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncCreateLinkStringLinkString { + + public static void main(String[] args) throws Exception { + syncCreateLinkStringLinkString(); + } + + public static void syncCreateLinkStringLinkString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + String parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString(); + Link link = Link.newBuilder().build(); + String linkId = "linkId-1102667083"; + Link response = observabilityClient.createLinkAsync(parent, link, linkId).get(); + } + } +} +// [END observability_v1_generated_Observability_CreateLink_StringLinkString_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createtracescope/AsyncCreateTraceScope.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createtracescope/AsyncCreateTraceScope.java new file mode 100644 index 000000000000..f76da24442e3 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createtracescope/AsyncCreateTraceScope.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_CreateTraceScope_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.observability.v1.CreateTraceScopeRequest; +import com.google.cloud.observability.v1.LocationName; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.TraceScope; + +public class AsyncCreateTraceScope { + + public static void main(String[] args) throws Exception { + asyncCreateTraceScope(); + } + + public static void asyncCreateTraceScope() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + CreateTraceScopeRequest request = + CreateTraceScopeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setTraceScopeId("traceScopeId-2107793014") + .setTraceScope(TraceScope.newBuilder().build()) + .build(); + ApiFuture future = + observabilityClient.createTraceScopeCallable().futureCall(request); + // Do something. + TraceScope response = future.get(); + } + } +} +// [END observability_v1_generated_Observability_CreateTraceScope_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createtracescope/SyncCreateTraceScope.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createtracescope/SyncCreateTraceScope.java new file mode 100644 index 000000000000..917ea54e427a --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createtracescope/SyncCreateTraceScope.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_CreateTraceScope_sync] +import com.google.cloud.observability.v1.CreateTraceScopeRequest; +import com.google.cloud.observability.v1.LocationName; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.TraceScope; + +public class SyncCreateTraceScope { + + public static void main(String[] args) throws Exception { + syncCreateTraceScope(); + } + + public static void syncCreateTraceScope() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + CreateTraceScopeRequest request = + CreateTraceScopeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setTraceScopeId("traceScopeId-2107793014") + .setTraceScope(TraceScope.newBuilder().build()) + .build(); + TraceScope response = observabilityClient.createTraceScope(request); + } + } +} +// [END observability_v1_generated_Observability_CreateTraceScope_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createtracescope/SyncCreateTraceScopeLocationnameTracescopeString.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createtracescope/SyncCreateTraceScopeLocationnameTracescopeString.java new file mode 100644 index 000000000000..23fc9e078246 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createtracescope/SyncCreateTraceScopeLocationnameTracescopeString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_CreateTraceScope_LocationnameTracescopeString_sync] +import com.google.cloud.observability.v1.LocationName; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.TraceScope; + +public class SyncCreateTraceScopeLocationnameTracescopeString { + + public static void main(String[] args) throws Exception { + syncCreateTraceScopeLocationnameTracescopeString(); + } + + public static void syncCreateTraceScopeLocationnameTracescopeString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + TraceScope traceScope = TraceScope.newBuilder().build(); + String traceScopeId = "traceScopeId-2107793014"; + TraceScope response = observabilityClient.createTraceScope(parent, traceScope, traceScopeId); + } + } +} +// [END observability_v1_generated_Observability_CreateTraceScope_LocationnameTracescopeString_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createtracescope/SyncCreateTraceScopeStringTracescopeString.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createtracescope/SyncCreateTraceScopeStringTracescopeString.java new file mode 100644 index 000000000000..2a366e085b3c --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/createtracescope/SyncCreateTraceScopeStringTracescopeString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_CreateTraceScope_StringTracescopeString_sync] +import com.google.cloud.observability.v1.LocationName; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.TraceScope; + +public class SyncCreateTraceScopeStringTracescopeString { + + public static void main(String[] args) throws Exception { + syncCreateTraceScopeStringTracescopeString(); + } + + public static void syncCreateTraceScopeStringTracescopeString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + TraceScope traceScope = TraceScope.newBuilder().build(); + String traceScopeId = "traceScopeId-2107793014"; + TraceScope response = observabilityClient.createTraceScope(parent, traceScope, traceScopeId); + } + } +} +// [END observability_v1_generated_Observability_CreateTraceScope_StringTracescopeString_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletelink/AsyncDeleteLink.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletelink/AsyncDeleteLink.java new file mode 100644 index 000000000000..32a56ef07431 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletelink/AsyncDeleteLink.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_DeleteLink_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.observability.v1.DeleteLinkRequest; +import com.google.cloud.observability.v1.LinkName; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteLink { + + public static void main(String[] args) throws Exception { + asyncDeleteLink(); + } + + public static void asyncDeleteLink() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + DeleteLinkRequest request = + DeleteLinkRequest.newBuilder() + .setName( + LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]") + .toString()) + .build(); + ApiFuture future = observabilityClient.deleteLinkCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END observability_v1_generated_Observability_DeleteLink_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletelink/AsyncDeleteLinkLRO.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletelink/AsyncDeleteLinkLRO.java new file mode 100644 index 000000000000..39a548a54a56 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletelink/AsyncDeleteLinkLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_DeleteLink_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.observability.v1.DeleteLinkRequest; +import com.google.cloud.observability.v1.LinkName; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteLinkLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLinkLRO(); + } + + public static void asyncDeleteLinkLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + DeleteLinkRequest request = + DeleteLinkRequest.newBuilder() + .setName( + LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]") + .toString()) + .build(); + OperationFuture future = + observabilityClient.deleteLinkOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END observability_v1_generated_Observability_DeleteLink_LRO_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletelink/SyncDeleteLink.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletelink/SyncDeleteLink.java new file mode 100644 index 000000000000..fea5ce2a94be --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletelink/SyncDeleteLink.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_DeleteLink_sync] +import com.google.cloud.observability.v1.DeleteLinkRequest; +import com.google.cloud.observability.v1.LinkName; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.protobuf.Empty; + +public class SyncDeleteLink { + + public static void main(String[] args) throws Exception { + syncDeleteLink(); + } + + public static void syncDeleteLink() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + DeleteLinkRequest request = + DeleteLinkRequest.newBuilder() + .setName( + LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]") + .toString()) + .build(); + observabilityClient.deleteLinkAsync(request).get(); + } + } +} +// [END observability_v1_generated_Observability_DeleteLink_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletelink/SyncDeleteLinkLinkname.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletelink/SyncDeleteLinkLinkname.java new file mode 100644 index 000000000000..225abd23cdf7 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletelink/SyncDeleteLinkLinkname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_DeleteLink_Linkname_sync] +import com.google.cloud.observability.v1.LinkName; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.protobuf.Empty; + +public class SyncDeleteLinkLinkname { + + public static void main(String[] args) throws Exception { + syncDeleteLinkLinkname(); + } + + public static void syncDeleteLinkLinkname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + LinkName name = LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]"); + observabilityClient.deleteLinkAsync(name).get(); + } + } +} +// [END observability_v1_generated_Observability_DeleteLink_Linkname_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletelink/SyncDeleteLinkString.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletelink/SyncDeleteLinkString.java new file mode 100644 index 000000000000..30a398bda158 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletelink/SyncDeleteLinkString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_DeleteLink_String_sync] +import com.google.cloud.observability.v1.LinkName; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.protobuf.Empty; + +public class SyncDeleteLinkString { + + public static void main(String[] args) throws Exception { + syncDeleteLinkString(); + } + + public static void syncDeleteLinkString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + String name = + LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]").toString(); + observabilityClient.deleteLinkAsync(name).get(); + } + } +} +// [END observability_v1_generated_Observability_DeleteLink_String_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletetracescope/AsyncDeleteTraceScope.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletetracescope/AsyncDeleteTraceScope.java new file mode 100644 index 000000000000..2e1ae9550ce3 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletetracescope/AsyncDeleteTraceScope.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_DeleteTraceScope_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.observability.v1.DeleteTraceScopeRequest; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.TraceScopeName; +import com.google.protobuf.Empty; + +public class AsyncDeleteTraceScope { + + public static void main(String[] args) throws Exception { + asyncDeleteTraceScope(); + } + + public static void asyncDeleteTraceScope() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + DeleteTraceScopeRequest request = + DeleteTraceScopeRequest.newBuilder() + .setName(TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString()) + .build(); + ApiFuture future = observabilityClient.deleteTraceScopeCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END observability_v1_generated_Observability_DeleteTraceScope_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletetracescope/SyncDeleteTraceScope.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletetracescope/SyncDeleteTraceScope.java new file mode 100644 index 000000000000..c936a8b8a356 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletetracescope/SyncDeleteTraceScope.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_DeleteTraceScope_sync] +import com.google.cloud.observability.v1.DeleteTraceScopeRequest; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.TraceScopeName; +import com.google.protobuf.Empty; + +public class SyncDeleteTraceScope { + + public static void main(String[] args) throws Exception { + syncDeleteTraceScope(); + } + + public static void syncDeleteTraceScope() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + DeleteTraceScopeRequest request = + DeleteTraceScopeRequest.newBuilder() + .setName(TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString()) + .build(); + observabilityClient.deleteTraceScope(request); + } + } +} +// [END observability_v1_generated_Observability_DeleteTraceScope_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletetracescope/SyncDeleteTraceScopeString.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletetracescope/SyncDeleteTraceScopeString.java new file mode 100644 index 000000000000..6bd8265a729f --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletetracescope/SyncDeleteTraceScopeString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_DeleteTraceScope_String_sync] +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.TraceScopeName; +import com.google.protobuf.Empty; + +public class SyncDeleteTraceScopeString { + + public static void main(String[] args) throws Exception { + syncDeleteTraceScopeString(); + } + + public static void syncDeleteTraceScopeString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + String name = TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString(); + observabilityClient.deleteTraceScope(name); + } + } +} +// [END observability_v1_generated_Observability_DeleteTraceScope_String_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletetracescope/SyncDeleteTraceScopeTracescopename.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletetracescope/SyncDeleteTraceScopeTracescopename.java new file mode 100644 index 000000000000..44de134ed2c0 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/deletetracescope/SyncDeleteTraceScopeTracescopename.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_DeleteTraceScope_Tracescopename_sync] +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.TraceScopeName; +import com.google.protobuf.Empty; + +public class SyncDeleteTraceScopeTracescopename { + + public static void main(String[] args) throws Exception { + syncDeleteTraceScopeTracescopename(); + } + + public static void syncDeleteTraceScopeTracescopename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + TraceScopeName name = TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]"); + observabilityClient.deleteTraceScope(name); + } + } +} +// [END observability_v1_generated_Observability_DeleteTraceScope_Tracescopename_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getbucket/AsyncGetBucket.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getbucket/AsyncGetBucket.java new file mode 100644 index 000000000000..fa78cac56aa1 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getbucket/AsyncGetBucket.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetBucket_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.observability.v1.Bucket; +import com.google.cloud.observability.v1.BucketName; +import com.google.cloud.observability.v1.GetBucketRequest; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class AsyncGetBucket { + + public static void main(String[] args) throws Exception { + asyncGetBucket(); + } + + public static void asyncGetBucket() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + GetBucketRequest request = + GetBucketRequest.newBuilder() + .setName(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString()) + .build(); + ApiFuture future = observabilityClient.getBucketCallable().futureCall(request); + // Do something. + Bucket response = future.get(); + } + } +} +// [END observability_v1_generated_Observability_GetBucket_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getbucket/SyncGetBucket.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getbucket/SyncGetBucket.java new file mode 100644 index 000000000000..689e1005f964 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getbucket/SyncGetBucket.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetBucket_sync] +import com.google.cloud.observability.v1.Bucket; +import com.google.cloud.observability.v1.BucketName; +import com.google.cloud.observability.v1.GetBucketRequest; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncGetBucket { + + public static void main(String[] args) throws Exception { + syncGetBucket(); + } + + public static void syncGetBucket() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + GetBucketRequest request = + GetBucketRequest.newBuilder() + .setName(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString()) + .build(); + Bucket response = observabilityClient.getBucket(request); + } + } +} +// [END observability_v1_generated_Observability_GetBucket_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getbucket/SyncGetBucketBucketname.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getbucket/SyncGetBucketBucketname.java new file mode 100644 index 000000000000..055c62e4a1a1 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getbucket/SyncGetBucketBucketname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetBucket_Bucketname_sync] +import com.google.cloud.observability.v1.Bucket; +import com.google.cloud.observability.v1.BucketName; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncGetBucketBucketname { + + public static void main(String[] args) throws Exception { + syncGetBucketBucketname(); + } + + public static void syncGetBucketBucketname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + BucketName name = BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]"); + Bucket response = observabilityClient.getBucket(name); + } + } +} +// [END observability_v1_generated_Observability_GetBucket_Bucketname_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getbucket/SyncGetBucketString.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getbucket/SyncGetBucketString.java new file mode 100644 index 000000000000..fc688c2e5712 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getbucket/SyncGetBucketString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetBucket_String_sync] +import com.google.cloud.observability.v1.Bucket; +import com.google.cloud.observability.v1.BucketName; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncGetBucketString { + + public static void main(String[] args) throws Exception { + syncGetBucketString(); + } + + public static void syncGetBucketString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + String name = BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString(); + Bucket response = observabilityClient.getBucket(name); + } + } +} +// [END observability_v1_generated_Observability_GetBucket_String_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getdataset/AsyncGetDataset.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getdataset/AsyncGetDataset.java new file mode 100644 index 000000000000..258f1eddc853 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getdataset/AsyncGetDataset.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetDataset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.observability.v1.Dataset; +import com.google.cloud.observability.v1.DatasetName; +import com.google.cloud.observability.v1.GetDatasetRequest; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class AsyncGetDataset { + + public static void main(String[] args) throws Exception { + asyncGetDataset(); + } + + public static void asyncGetDataset() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + GetDatasetRequest request = + GetDatasetRequest.newBuilder() + .setName( + DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString()) + .build(); + ApiFuture future = observabilityClient.getDatasetCallable().futureCall(request); + // Do something. + Dataset response = future.get(); + } + } +} +// [END observability_v1_generated_Observability_GetDataset_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getdataset/SyncGetDataset.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getdataset/SyncGetDataset.java new file mode 100644 index 000000000000..03724fda2195 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getdataset/SyncGetDataset.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetDataset_sync] +import com.google.cloud.observability.v1.Dataset; +import com.google.cloud.observability.v1.DatasetName; +import com.google.cloud.observability.v1.GetDatasetRequest; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncGetDataset { + + public static void main(String[] args) throws Exception { + syncGetDataset(); + } + + public static void syncGetDataset() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + GetDatasetRequest request = + GetDatasetRequest.newBuilder() + .setName( + DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString()) + .build(); + Dataset response = observabilityClient.getDataset(request); + } + } +} +// [END observability_v1_generated_Observability_GetDataset_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getdataset/SyncGetDatasetDatasetname.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getdataset/SyncGetDatasetDatasetname.java new file mode 100644 index 000000000000..b432b35f6fed --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getdataset/SyncGetDatasetDatasetname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetDataset_Datasetname_sync] +import com.google.cloud.observability.v1.Dataset; +import com.google.cloud.observability.v1.DatasetName; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncGetDatasetDatasetname { + + public static void main(String[] args) throws Exception { + syncGetDatasetDatasetname(); + } + + public static void syncGetDatasetDatasetname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]"); + Dataset response = observabilityClient.getDataset(name); + } + } +} +// [END observability_v1_generated_Observability_GetDataset_Datasetname_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getdataset/SyncGetDatasetString.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getdataset/SyncGetDatasetString.java new file mode 100644 index 000000000000..a686e0c23a9d --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getdataset/SyncGetDatasetString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetDataset_String_sync] +import com.google.cloud.observability.v1.Dataset; +import com.google.cloud.observability.v1.DatasetName; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncGetDatasetString { + + public static void main(String[] args) throws Exception { + syncGetDatasetString(); + } + + public static void syncGetDatasetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + String name = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString(); + Dataset response = observabilityClient.getDataset(name); + } + } +} +// [END observability_v1_generated_Observability_GetDataset_String_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getlink/AsyncGetLink.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getlink/AsyncGetLink.java new file mode 100644 index 000000000000..bab8166009f7 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getlink/AsyncGetLink.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetLink_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.observability.v1.GetLinkRequest; +import com.google.cloud.observability.v1.Link; +import com.google.cloud.observability.v1.LinkName; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class AsyncGetLink { + + public static void main(String[] args) throws Exception { + asyncGetLink(); + } + + public static void asyncGetLink() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + GetLinkRequest request = + GetLinkRequest.newBuilder() + .setName( + LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]") + .toString()) + .build(); + ApiFuture future = observabilityClient.getLinkCallable().futureCall(request); + // Do something. + Link response = future.get(); + } + } +} +// [END observability_v1_generated_Observability_GetLink_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getlink/SyncGetLink.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getlink/SyncGetLink.java new file mode 100644 index 000000000000..83cdc20e0ba2 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getlink/SyncGetLink.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetLink_sync] +import com.google.cloud.observability.v1.GetLinkRequest; +import com.google.cloud.observability.v1.Link; +import com.google.cloud.observability.v1.LinkName; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncGetLink { + + public static void main(String[] args) throws Exception { + syncGetLink(); + } + + public static void syncGetLink() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + GetLinkRequest request = + GetLinkRequest.newBuilder() + .setName( + LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]") + .toString()) + .build(); + Link response = observabilityClient.getLink(request); + } + } +} +// [END observability_v1_generated_Observability_GetLink_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getlink/SyncGetLinkLinkname.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getlink/SyncGetLinkLinkname.java new file mode 100644 index 000000000000..08a065b04bd5 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getlink/SyncGetLinkLinkname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetLink_Linkname_sync] +import com.google.cloud.observability.v1.Link; +import com.google.cloud.observability.v1.LinkName; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncGetLinkLinkname { + + public static void main(String[] args) throws Exception { + syncGetLinkLinkname(); + } + + public static void syncGetLinkLinkname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + LinkName name = LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]"); + Link response = observabilityClient.getLink(name); + } + } +} +// [END observability_v1_generated_Observability_GetLink_Linkname_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getlink/SyncGetLinkString.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getlink/SyncGetLinkString.java new file mode 100644 index 000000000000..d3104cf00cc3 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getlink/SyncGetLinkString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetLink_String_sync] +import com.google.cloud.observability.v1.Link; +import com.google.cloud.observability.v1.LinkName; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncGetLinkString { + + public static void main(String[] args) throws Exception { + syncGetLinkString(); + } + + public static void syncGetLinkString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + String name = + LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]").toString(); + Link response = observabilityClient.getLink(name); + } + } +} +// [END observability_v1_generated_Observability_GetLink_String_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getlocation/AsyncGetLocation.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..7fec6969adf9 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = observabilityClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END observability_v1_generated_Observability_GetLocation_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getlocation/SyncGetLocation.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..0ad626ec97ca --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetLocation_sync] +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = observabilityClient.getLocation(request); + } + } +} +// [END observability_v1_generated_Observability_GetLocation_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getscope/AsyncGetScope.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getscope/AsyncGetScope.java new file mode 100644 index 000000000000..d43188f02b2f --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getscope/AsyncGetScope.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetScope_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.observability.v1.GetScopeRequest; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.Scope; +import com.google.cloud.observability.v1.ScopeName; + +public class AsyncGetScope { + + public static void main(String[] args) throws Exception { + asyncGetScope(); + } + + public static void asyncGetScope() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + GetScopeRequest request = + GetScopeRequest.newBuilder() + .setName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString()) + .build(); + ApiFuture future = observabilityClient.getScopeCallable().futureCall(request); + // Do something. + Scope response = future.get(); + } + } +} +// [END observability_v1_generated_Observability_GetScope_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getscope/SyncGetScope.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getscope/SyncGetScope.java new file mode 100644 index 000000000000..dbdd41978da0 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getscope/SyncGetScope.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetScope_sync] +import com.google.cloud.observability.v1.GetScopeRequest; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.Scope; +import com.google.cloud.observability.v1.ScopeName; + +public class SyncGetScope { + + public static void main(String[] args) throws Exception { + syncGetScope(); + } + + public static void syncGetScope() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + GetScopeRequest request = + GetScopeRequest.newBuilder() + .setName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString()) + .build(); + Scope response = observabilityClient.getScope(request); + } + } +} +// [END observability_v1_generated_Observability_GetScope_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getscope/SyncGetScopeScopename.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getscope/SyncGetScopeScopename.java new file mode 100644 index 000000000000..0fcc7a133bdb --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getscope/SyncGetScopeScopename.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetScope_Scopename_sync] +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.Scope; +import com.google.cloud.observability.v1.ScopeName; + +public class SyncGetScopeScopename { + + public static void main(String[] args) throws Exception { + syncGetScopeScopename(); + } + + public static void syncGetScopeScopename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + ScopeName name = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]"); + Scope response = observabilityClient.getScope(name); + } + } +} +// [END observability_v1_generated_Observability_GetScope_Scopename_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getscope/SyncGetScopeString.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getscope/SyncGetScopeString.java new file mode 100644 index 000000000000..27e59dd198cc --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getscope/SyncGetScopeString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetScope_String_sync] +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.Scope; +import com.google.cloud.observability.v1.ScopeName; + +public class SyncGetScopeString { + + public static void main(String[] args) throws Exception { + syncGetScopeString(); + } + + public static void syncGetScopeString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + String name = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString(); + Scope response = observabilityClient.getScope(name); + } + } +} +// [END observability_v1_generated_Observability_GetScope_String_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getsettings/AsyncGetSettings.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getsettings/AsyncGetSettings.java new file mode 100644 index 000000000000..253661c9bfdb --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getsettings/AsyncGetSettings.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetSettings_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.observability.v1.GetSettingsRequest; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.Settings; +import com.google.cloud.observability.v1.SettingsName; + +public class AsyncGetSettings { + + public static void main(String[] args) throws Exception { + asyncGetSettings(); + } + + public static void asyncGetSettings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + GetSettingsRequest request = + GetSettingsRequest.newBuilder() + .setName(SettingsName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString()) + .build(); + ApiFuture future = observabilityClient.getSettingsCallable().futureCall(request); + // Do something. + Settings response = future.get(); + } + } +} +// [END observability_v1_generated_Observability_GetSettings_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getsettings/SyncGetSettings.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getsettings/SyncGetSettings.java new file mode 100644 index 000000000000..e790d22ee034 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getsettings/SyncGetSettings.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetSettings_sync] +import com.google.cloud.observability.v1.GetSettingsRequest; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.Settings; +import com.google.cloud.observability.v1.SettingsName; + +public class SyncGetSettings { + + public static void main(String[] args) throws Exception { + syncGetSettings(); + } + + public static void syncGetSettings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + GetSettingsRequest request = + GetSettingsRequest.newBuilder() + .setName(SettingsName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString()) + .build(); + Settings response = observabilityClient.getSettings(request); + } + } +} +// [END observability_v1_generated_Observability_GetSettings_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getsettings/SyncGetSettingsSettingsname.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getsettings/SyncGetSettingsSettingsname.java new file mode 100644 index 000000000000..afb683c8f2f6 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getsettings/SyncGetSettingsSettingsname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetSettings_Settingsname_sync] +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.Settings; +import com.google.cloud.observability.v1.SettingsName; + +public class SyncGetSettingsSettingsname { + + public static void main(String[] args) throws Exception { + syncGetSettingsSettingsname(); + } + + public static void syncGetSettingsSettingsname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + SettingsName name = SettingsName.ofProjectLocationName("[PROJECT]", "[LOCATION]"); + Settings response = observabilityClient.getSettings(name); + } + } +} +// [END observability_v1_generated_Observability_GetSettings_Settingsname_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getsettings/SyncGetSettingsString.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getsettings/SyncGetSettingsString.java new file mode 100644 index 000000000000..94d3d140dbed --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getsettings/SyncGetSettingsString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetSettings_String_sync] +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.Settings; +import com.google.cloud.observability.v1.SettingsName; + +public class SyncGetSettingsString { + + public static void main(String[] args) throws Exception { + syncGetSettingsString(); + } + + public static void syncGetSettingsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + String name = SettingsName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString(); + Settings response = observabilityClient.getSettings(name); + } + } +} +// [END observability_v1_generated_Observability_GetSettings_String_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/gettracescope/AsyncGetTraceScope.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/gettracescope/AsyncGetTraceScope.java new file mode 100644 index 000000000000..bfedbe592b8b --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/gettracescope/AsyncGetTraceScope.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetTraceScope_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.observability.v1.GetTraceScopeRequest; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.TraceScope; +import com.google.cloud.observability.v1.TraceScopeName; + +public class AsyncGetTraceScope { + + public static void main(String[] args) throws Exception { + asyncGetTraceScope(); + } + + public static void asyncGetTraceScope() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + GetTraceScopeRequest request = + GetTraceScopeRequest.newBuilder() + .setName(TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString()) + .build(); + ApiFuture future = + observabilityClient.getTraceScopeCallable().futureCall(request); + // Do something. + TraceScope response = future.get(); + } + } +} +// [END observability_v1_generated_Observability_GetTraceScope_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/gettracescope/SyncGetTraceScope.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/gettracescope/SyncGetTraceScope.java new file mode 100644 index 000000000000..01ba265b4f50 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/gettracescope/SyncGetTraceScope.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetTraceScope_sync] +import com.google.cloud.observability.v1.GetTraceScopeRequest; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.TraceScope; +import com.google.cloud.observability.v1.TraceScopeName; + +public class SyncGetTraceScope { + + public static void main(String[] args) throws Exception { + syncGetTraceScope(); + } + + public static void syncGetTraceScope() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + GetTraceScopeRequest request = + GetTraceScopeRequest.newBuilder() + .setName(TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString()) + .build(); + TraceScope response = observabilityClient.getTraceScope(request); + } + } +} +// [END observability_v1_generated_Observability_GetTraceScope_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/gettracescope/SyncGetTraceScopeString.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/gettracescope/SyncGetTraceScopeString.java new file mode 100644 index 000000000000..8d931efe9949 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/gettracescope/SyncGetTraceScopeString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetTraceScope_String_sync] +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.TraceScope; +import com.google.cloud.observability.v1.TraceScopeName; + +public class SyncGetTraceScopeString { + + public static void main(String[] args) throws Exception { + syncGetTraceScopeString(); + } + + public static void syncGetTraceScopeString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + String name = TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString(); + TraceScope response = observabilityClient.getTraceScope(name); + } + } +} +// [END observability_v1_generated_Observability_GetTraceScope_String_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/gettracescope/SyncGetTraceScopeTracescopename.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/gettracescope/SyncGetTraceScopeTracescopename.java new file mode 100644 index 000000000000..f36a2079f469 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/gettracescope/SyncGetTraceScopeTracescopename.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetTraceScope_Tracescopename_sync] +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.TraceScope; +import com.google.cloud.observability.v1.TraceScopeName; + +public class SyncGetTraceScopeTracescopename { + + public static void main(String[] args) throws Exception { + syncGetTraceScopeTracescopename(); + } + + public static void syncGetTraceScopeTracescopename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + TraceScopeName name = TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]"); + TraceScope response = observabilityClient.getTraceScope(name); + } + } +} +// [END observability_v1_generated_Observability_GetTraceScope_Tracescopename_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getview/AsyncGetView.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getview/AsyncGetView.java new file mode 100644 index 000000000000..8d7893f69cb2 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getview/AsyncGetView.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetView_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.observability.v1.GetViewRequest; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.View; +import com.google.cloud.observability.v1.ViewName; + +public class AsyncGetView { + + public static void main(String[] args) throws Exception { + asyncGetView(); + } + + public static void asyncGetView() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + GetViewRequest request = + GetViewRequest.newBuilder() + .setName( + ViewName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[VIEW]") + .toString()) + .build(); + ApiFuture future = observabilityClient.getViewCallable().futureCall(request); + // Do something. + View response = future.get(); + } + } +} +// [END observability_v1_generated_Observability_GetView_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getview/SyncGetView.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getview/SyncGetView.java new file mode 100644 index 000000000000..26926b5d69e9 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getview/SyncGetView.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetView_sync] +import com.google.cloud.observability.v1.GetViewRequest; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.View; +import com.google.cloud.observability.v1.ViewName; + +public class SyncGetView { + + public static void main(String[] args) throws Exception { + syncGetView(); + } + + public static void syncGetView() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + GetViewRequest request = + GetViewRequest.newBuilder() + .setName( + ViewName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[VIEW]") + .toString()) + .build(); + View response = observabilityClient.getView(request); + } + } +} +// [END observability_v1_generated_Observability_GetView_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getview/SyncGetViewString.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getview/SyncGetViewString.java new file mode 100644 index 000000000000..940d19e8b919 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getview/SyncGetViewString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetView_String_sync] +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.View; +import com.google.cloud.observability.v1.ViewName; + +public class SyncGetViewString { + + public static void main(String[] args) throws Exception { + syncGetViewString(); + } + + public static void syncGetViewString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + String name = + ViewName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[VIEW]").toString(); + View response = observabilityClient.getView(name); + } + } +} +// [END observability_v1_generated_Observability_GetView_String_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getview/SyncGetViewViewname.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getview/SyncGetViewViewname.java new file mode 100644 index 000000000000..e29844a35990 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/getview/SyncGetViewViewname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_GetView_Viewname_sync] +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.View; +import com.google.cloud.observability.v1.ViewName; + +public class SyncGetViewViewname { + + public static void main(String[] args) throws Exception { + syncGetViewViewname(); + } + + public static void syncGetViewViewname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + ViewName name = ViewName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[VIEW]"); + View response = observabilityClient.getView(name); + } + } +} +// [END observability_v1_generated_Observability_GetView_Viewname_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listbuckets/AsyncListBuckets.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listbuckets/AsyncListBuckets.java new file mode 100644 index 000000000000..043b250b25fc --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listbuckets/AsyncListBuckets.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListBuckets_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.observability.v1.Bucket; +import com.google.cloud.observability.v1.ListBucketsRequest; +import com.google.cloud.observability.v1.LocationName; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class AsyncListBuckets { + + public static void main(String[] args) throws Exception { + asyncListBuckets(); + } + + public static void asyncListBuckets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + ListBucketsRequest request = + ListBucketsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setShowDeleted(true) + .build(); + ApiFuture future = observabilityClient.listBucketsPagedCallable().futureCall(request); + // Do something. + for (Bucket element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END observability_v1_generated_Observability_ListBuckets_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listbuckets/AsyncListBucketsPaged.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listbuckets/AsyncListBucketsPaged.java new file mode 100644 index 000000000000..3c3b4966b4b2 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listbuckets/AsyncListBucketsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListBuckets_Paged_async] +import com.google.cloud.observability.v1.Bucket; +import com.google.cloud.observability.v1.ListBucketsRequest; +import com.google.cloud.observability.v1.ListBucketsResponse; +import com.google.cloud.observability.v1.LocationName; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.common.base.Strings; + +public class AsyncListBucketsPaged { + + public static void main(String[] args) throws Exception { + asyncListBucketsPaged(); + } + + public static void asyncListBucketsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + ListBucketsRequest request = + ListBucketsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setShowDeleted(true) + .build(); + while (true) { + ListBucketsResponse response = observabilityClient.listBucketsCallable().call(request); + for (Bucket element : response.getBucketsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END observability_v1_generated_Observability_ListBuckets_Paged_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listbuckets/SyncListBuckets.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listbuckets/SyncListBuckets.java new file mode 100644 index 000000000000..76d17f9ee52c --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listbuckets/SyncListBuckets.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListBuckets_sync] +import com.google.cloud.observability.v1.Bucket; +import com.google.cloud.observability.v1.ListBucketsRequest; +import com.google.cloud.observability.v1.LocationName; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncListBuckets { + + public static void main(String[] args) throws Exception { + syncListBuckets(); + } + + public static void syncListBuckets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + ListBucketsRequest request = + ListBucketsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setShowDeleted(true) + .build(); + for (Bucket element : observabilityClient.listBuckets(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END observability_v1_generated_Observability_ListBuckets_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listbuckets/SyncListBucketsLocationname.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listbuckets/SyncListBucketsLocationname.java new file mode 100644 index 000000000000..64cdd0dc9ac0 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listbuckets/SyncListBucketsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListBuckets_Locationname_sync] +import com.google.cloud.observability.v1.Bucket; +import com.google.cloud.observability.v1.LocationName; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncListBucketsLocationname { + + public static void main(String[] args) throws Exception { + syncListBucketsLocationname(); + } + + public static void syncListBucketsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Bucket element : observabilityClient.listBuckets(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END observability_v1_generated_Observability_ListBuckets_Locationname_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listbuckets/SyncListBucketsString.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listbuckets/SyncListBucketsString.java new file mode 100644 index 000000000000..336e36416b7b --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listbuckets/SyncListBucketsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListBuckets_String_sync] +import com.google.cloud.observability.v1.Bucket; +import com.google.cloud.observability.v1.LocationName; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncListBucketsString { + + public static void main(String[] args) throws Exception { + syncListBucketsString(); + } + + public static void syncListBucketsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Bucket element : observabilityClient.listBuckets(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END observability_v1_generated_Observability_ListBuckets_String_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listdatasets/AsyncListDatasets.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listdatasets/AsyncListDatasets.java new file mode 100644 index 000000000000..b0e8d945aab1 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listdatasets/AsyncListDatasets.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListDatasets_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.observability.v1.BucketName; +import com.google.cloud.observability.v1.Dataset; +import com.google.cloud.observability.v1.ListDatasetsRequest; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class AsyncListDatasets { + + public static void main(String[] args) throws Exception { + asyncListDatasets(); + } + + public static void asyncListDatasets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + ListDatasetsRequest request = + ListDatasetsRequest.newBuilder() + .setParent(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setShowDeleted(true) + .build(); + ApiFuture future = + observabilityClient.listDatasetsPagedCallable().futureCall(request); + // Do something. + for (Dataset element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END observability_v1_generated_Observability_ListDatasets_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listdatasets/AsyncListDatasetsPaged.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listdatasets/AsyncListDatasetsPaged.java new file mode 100644 index 000000000000..1770626e3c97 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listdatasets/AsyncListDatasetsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListDatasets_Paged_async] +import com.google.cloud.observability.v1.BucketName; +import com.google.cloud.observability.v1.Dataset; +import com.google.cloud.observability.v1.ListDatasetsRequest; +import com.google.cloud.observability.v1.ListDatasetsResponse; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.common.base.Strings; + +public class AsyncListDatasetsPaged { + + public static void main(String[] args) throws Exception { + asyncListDatasetsPaged(); + } + + public static void asyncListDatasetsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + ListDatasetsRequest request = + ListDatasetsRequest.newBuilder() + .setParent(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setShowDeleted(true) + .build(); + while (true) { + ListDatasetsResponse response = observabilityClient.listDatasetsCallable().call(request); + for (Dataset element : response.getDatasetsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END observability_v1_generated_Observability_ListDatasets_Paged_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listdatasets/SyncListDatasets.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listdatasets/SyncListDatasets.java new file mode 100644 index 000000000000..fac7e0436760 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listdatasets/SyncListDatasets.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListDatasets_sync] +import com.google.cloud.observability.v1.BucketName; +import com.google.cloud.observability.v1.Dataset; +import com.google.cloud.observability.v1.ListDatasetsRequest; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncListDatasets { + + public static void main(String[] args) throws Exception { + syncListDatasets(); + } + + public static void syncListDatasets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + ListDatasetsRequest request = + ListDatasetsRequest.newBuilder() + .setParent(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setShowDeleted(true) + .build(); + for (Dataset element : observabilityClient.listDatasets(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END observability_v1_generated_Observability_ListDatasets_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listdatasets/SyncListDatasetsBucketname.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listdatasets/SyncListDatasetsBucketname.java new file mode 100644 index 000000000000..d86fd1f899bd --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listdatasets/SyncListDatasetsBucketname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListDatasets_Bucketname_sync] +import com.google.cloud.observability.v1.BucketName; +import com.google.cloud.observability.v1.Dataset; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncListDatasetsBucketname { + + public static void main(String[] args) throws Exception { + syncListDatasetsBucketname(); + } + + public static void syncListDatasetsBucketname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + BucketName parent = BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]"); + for (Dataset element : observabilityClient.listDatasets(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END observability_v1_generated_Observability_ListDatasets_Bucketname_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listdatasets/SyncListDatasetsString.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listdatasets/SyncListDatasetsString.java new file mode 100644 index 000000000000..b793d89f3872 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listdatasets/SyncListDatasetsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListDatasets_String_sync] +import com.google.cloud.observability.v1.BucketName; +import com.google.cloud.observability.v1.Dataset; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncListDatasetsString { + + public static void main(String[] args) throws Exception { + syncListDatasetsString(); + } + + public static void syncListDatasetsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + String parent = BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString(); + for (Dataset element : observabilityClient.listDatasets(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END observability_v1_generated_Observability_ListDatasets_String_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlinks/AsyncListLinks.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlinks/AsyncListLinks.java new file mode 100644 index 000000000000..5efac5ad2c67 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlinks/AsyncListLinks.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListLinks_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.observability.v1.DatasetName; +import com.google.cloud.observability.v1.Link; +import com.google.cloud.observability.v1.ListLinksRequest; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class AsyncListLinks { + + public static void main(String[] args) throws Exception { + asyncListLinks(); + } + + public static void asyncListLinks() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + ListLinksRequest request = + ListLinksRequest.newBuilder() + .setParent( + DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = observabilityClient.listLinksPagedCallable().futureCall(request); + // Do something. + for (Link element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END observability_v1_generated_Observability_ListLinks_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlinks/AsyncListLinksPaged.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlinks/AsyncListLinksPaged.java new file mode 100644 index 000000000000..698966c297d8 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlinks/AsyncListLinksPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListLinks_Paged_async] +import com.google.cloud.observability.v1.DatasetName; +import com.google.cloud.observability.v1.Link; +import com.google.cloud.observability.v1.ListLinksRequest; +import com.google.cloud.observability.v1.ListLinksResponse; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.common.base.Strings; + +public class AsyncListLinksPaged { + + public static void main(String[] args) throws Exception { + asyncListLinksPaged(); + } + + public static void asyncListLinksPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + ListLinksRequest request = + ListLinksRequest.newBuilder() + .setParent( + DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLinksResponse response = observabilityClient.listLinksCallable().call(request); + for (Link element : response.getLinksList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END observability_v1_generated_Observability_ListLinks_Paged_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlinks/SyncListLinks.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlinks/SyncListLinks.java new file mode 100644 index 000000000000..9e151a0c3e53 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlinks/SyncListLinks.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListLinks_sync] +import com.google.cloud.observability.v1.DatasetName; +import com.google.cloud.observability.v1.Link; +import com.google.cloud.observability.v1.ListLinksRequest; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncListLinks { + + public static void main(String[] args) throws Exception { + syncListLinks(); + } + + public static void syncListLinks() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + ListLinksRequest request = + ListLinksRequest.newBuilder() + .setParent( + DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Link element : observabilityClient.listLinks(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END observability_v1_generated_Observability_ListLinks_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlinks/SyncListLinksDatasetname.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlinks/SyncListLinksDatasetname.java new file mode 100644 index 000000000000..9e86a6ce25a1 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlinks/SyncListLinksDatasetname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListLinks_Datasetname_sync] +import com.google.cloud.observability.v1.DatasetName; +import com.google.cloud.observability.v1.Link; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncListLinksDatasetname { + + public static void main(String[] args) throws Exception { + syncListLinksDatasetname(); + } + + public static void syncListLinksDatasetname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]"); + for (Link element : observabilityClient.listLinks(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END observability_v1_generated_Observability_ListLinks_Datasetname_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlinks/SyncListLinksString.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlinks/SyncListLinksString.java new file mode 100644 index 000000000000..28c7cc59e57b --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlinks/SyncListLinksString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListLinks_String_sync] +import com.google.cloud.observability.v1.DatasetName; +import com.google.cloud.observability.v1.Link; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncListLinksString { + + public static void main(String[] args) throws Exception { + syncListLinksString(); + } + + public static void syncListLinksString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + String parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString(); + for (Link element : observabilityClient.listLinks(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END observability_v1_generated_Observability_ListLinks_String_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlocations/AsyncListLocations.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..8e53828f8d3b --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + observabilityClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END observability_v1_generated_Observability_ListLocations_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlocations/AsyncListLocationsPaged.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..fd60489074cc --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListLocations_Paged_async] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = observabilityClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END observability_v1_generated_Observability_ListLocations_Paged_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlocations/SyncListLocations.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..6ebbe4d30652 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListLocations_sync] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.observability.v1.ObservabilityClient; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : observabilityClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END observability_v1_generated_Observability_ListLocations_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listtracescopes/AsyncListTraceScopes.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listtracescopes/AsyncListTraceScopes.java new file mode 100644 index 000000000000..29d311d08044 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listtracescopes/AsyncListTraceScopes.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListTraceScopes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.observability.v1.ListTraceScopesRequest; +import com.google.cloud.observability.v1.LocationName; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.TraceScope; + +public class AsyncListTraceScopes { + + public static void main(String[] args) throws Exception { + asyncListTraceScopes(); + } + + public static void asyncListTraceScopes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + ListTraceScopesRequest request = + ListTraceScopesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + observabilityClient.listTraceScopesPagedCallable().futureCall(request); + // Do something. + for (TraceScope element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END observability_v1_generated_Observability_ListTraceScopes_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listtracescopes/AsyncListTraceScopesPaged.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listtracescopes/AsyncListTraceScopesPaged.java new file mode 100644 index 000000000000..6dae08439bc8 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listtracescopes/AsyncListTraceScopesPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListTraceScopes_Paged_async] +import com.google.cloud.observability.v1.ListTraceScopesRequest; +import com.google.cloud.observability.v1.ListTraceScopesResponse; +import com.google.cloud.observability.v1.LocationName; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.TraceScope; +import com.google.common.base.Strings; + +public class AsyncListTraceScopesPaged { + + public static void main(String[] args) throws Exception { + asyncListTraceScopesPaged(); + } + + public static void asyncListTraceScopesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + ListTraceScopesRequest request = + ListTraceScopesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListTraceScopesResponse response = + observabilityClient.listTraceScopesCallable().call(request); + for (TraceScope element : response.getTraceScopesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END observability_v1_generated_Observability_ListTraceScopes_Paged_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listtracescopes/SyncListTraceScopes.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listtracescopes/SyncListTraceScopes.java new file mode 100644 index 000000000000..caf7621de027 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listtracescopes/SyncListTraceScopes.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListTraceScopes_sync] +import com.google.cloud.observability.v1.ListTraceScopesRequest; +import com.google.cloud.observability.v1.LocationName; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.TraceScope; + +public class SyncListTraceScopes { + + public static void main(String[] args) throws Exception { + syncListTraceScopes(); + } + + public static void syncListTraceScopes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + ListTraceScopesRequest request = + ListTraceScopesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (TraceScope element : observabilityClient.listTraceScopes(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END observability_v1_generated_Observability_ListTraceScopes_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listtracescopes/SyncListTraceScopesLocationname.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listtracescopes/SyncListTraceScopesLocationname.java new file mode 100644 index 000000000000..24366bd8d2d9 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listtracescopes/SyncListTraceScopesLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListTraceScopes_Locationname_sync] +import com.google.cloud.observability.v1.LocationName; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.TraceScope; + +public class SyncListTraceScopesLocationname { + + public static void main(String[] args) throws Exception { + syncListTraceScopesLocationname(); + } + + public static void syncListTraceScopesLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (TraceScope element : observabilityClient.listTraceScopes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END observability_v1_generated_Observability_ListTraceScopes_Locationname_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listtracescopes/SyncListTraceScopesString.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listtracescopes/SyncListTraceScopesString.java new file mode 100644 index 000000000000..c8bf09ecfe40 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listtracescopes/SyncListTraceScopesString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListTraceScopes_String_sync] +import com.google.cloud.observability.v1.LocationName; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.TraceScope; + +public class SyncListTraceScopesString { + + public static void main(String[] args) throws Exception { + syncListTraceScopesString(); + } + + public static void syncListTraceScopesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (TraceScope element : observabilityClient.listTraceScopes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END observability_v1_generated_Observability_ListTraceScopes_String_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listviews/AsyncListViews.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listviews/AsyncListViews.java new file mode 100644 index 000000000000..c6fd2fece309 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listviews/AsyncListViews.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListViews_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.observability.v1.DatasetName; +import com.google.cloud.observability.v1.ListViewsRequest; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.View; + +public class AsyncListViews { + + public static void main(String[] args) throws Exception { + asyncListViews(); + } + + public static void asyncListViews() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + ListViewsRequest request = + ListViewsRequest.newBuilder() + .setParent( + DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = observabilityClient.listViewsPagedCallable().futureCall(request); + // Do something. + for (View element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END observability_v1_generated_Observability_ListViews_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listviews/AsyncListViewsPaged.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listviews/AsyncListViewsPaged.java new file mode 100644 index 000000000000..46bd5fc0118c --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listviews/AsyncListViewsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListViews_Paged_async] +import com.google.cloud.observability.v1.DatasetName; +import com.google.cloud.observability.v1.ListViewsRequest; +import com.google.cloud.observability.v1.ListViewsResponse; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.View; +import com.google.common.base.Strings; + +public class AsyncListViewsPaged { + + public static void main(String[] args) throws Exception { + asyncListViewsPaged(); + } + + public static void asyncListViewsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + ListViewsRequest request = + ListViewsRequest.newBuilder() + .setParent( + DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListViewsResponse response = observabilityClient.listViewsCallable().call(request); + for (View element : response.getViewsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END observability_v1_generated_Observability_ListViews_Paged_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listviews/SyncListViews.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listviews/SyncListViews.java new file mode 100644 index 000000000000..5607bfe5d866 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listviews/SyncListViews.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListViews_sync] +import com.google.cloud.observability.v1.DatasetName; +import com.google.cloud.observability.v1.ListViewsRequest; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.View; + +public class SyncListViews { + + public static void main(String[] args) throws Exception { + syncListViews(); + } + + public static void syncListViews() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + ListViewsRequest request = + ListViewsRequest.newBuilder() + .setParent( + DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (View element : observabilityClient.listViews(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END observability_v1_generated_Observability_ListViews_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listviews/SyncListViewsDatasetname.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listviews/SyncListViewsDatasetname.java new file mode 100644 index 000000000000..0b04b62dd2c5 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listviews/SyncListViewsDatasetname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListViews_Datasetname_sync] +import com.google.cloud.observability.v1.DatasetName; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.View; + +public class SyncListViewsDatasetname { + + public static void main(String[] args) throws Exception { + syncListViewsDatasetname(); + } + + public static void syncListViewsDatasetname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]"); + for (View element : observabilityClient.listViews(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END observability_v1_generated_Observability_ListViews_Datasetname_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listviews/SyncListViewsString.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listviews/SyncListViewsString.java new file mode 100644 index 000000000000..94a1ac27dcc9 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/listviews/SyncListViewsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_ListViews_String_sync] +import com.google.cloud.observability.v1.DatasetName; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.View; + +public class SyncListViewsString { + + public static void main(String[] args) throws Exception { + syncListViewsString(); + } + + public static void syncListViewsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + String parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString(); + for (View element : observabilityClient.listViews(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END observability_v1_generated_Observability_ListViews_String_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatebucket/AsyncUpdateBucket.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatebucket/AsyncUpdateBucket.java new file mode 100644 index 000000000000..b9f85db13ae3 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatebucket/AsyncUpdateBucket.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_UpdateBucket_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.observability.v1.Bucket; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.UpdateBucketRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateBucket { + + public static void main(String[] args) throws Exception { + asyncUpdateBucket(); + } + + public static void asyncUpdateBucket() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + UpdateBucketRequest request = + UpdateBucketRequest.newBuilder() + .setBucket(Bucket.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = observabilityClient.updateBucketCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END observability_v1_generated_Observability_UpdateBucket_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatebucket/AsyncUpdateBucketLRO.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatebucket/AsyncUpdateBucketLRO.java new file mode 100644 index 000000000000..358985b047b1 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatebucket/AsyncUpdateBucketLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_UpdateBucket_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.observability.v1.Bucket; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.OperationMetadata; +import com.google.cloud.observability.v1.UpdateBucketRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateBucketLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateBucketLRO(); + } + + public static void asyncUpdateBucketLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + UpdateBucketRequest request = + UpdateBucketRequest.newBuilder() + .setBucket(Bucket.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + OperationFuture future = + observabilityClient.updateBucketOperationCallable().futureCall(request); + // Do something. + Bucket response = future.get(); + } + } +} +// [END observability_v1_generated_Observability_UpdateBucket_LRO_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatebucket/SyncUpdateBucket.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatebucket/SyncUpdateBucket.java new file mode 100644 index 000000000000..dc4b05493a3d --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatebucket/SyncUpdateBucket.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_UpdateBucket_sync] +import com.google.cloud.observability.v1.Bucket; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.UpdateBucketRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateBucket { + + public static void main(String[] args) throws Exception { + syncUpdateBucket(); + } + + public static void syncUpdateBucket() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + UpdateBucketRequest request = + UpdateBucketRequest.newBuilder() + .setBucket(Bucket.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Bucket response = observabilityClient.updateBucketAsync(request).get(); + } + } +} +// [END observability_v1_generated_Observability_UpdateBucket_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatebucket/SyncUpdateBucketBucketFieldmask.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatebucket/SyncUpdateBucketBucketFieldmask.java new file mode 100644 index 000000000000..979ab1bca000 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatebucket/SyncUpdateBucketBucketFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_UpdateBucket_BucketFieldmask_sync] +import com.google.cloud.observability.v1.Bucket; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateBucketBucketFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateBucketBucketFieldmask(); + } + + public static void syncUpdateBucketBucketFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + Bucket bucket = Bucket.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Bucket response = observabilityClient.updateBucketAsync(bucket, updateMask).get(); + } + } +} +// [END observability_v1_generated_Observability_UpdateBucket_BucketFieldmask_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatelink/AsyncUpdateLink.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatelink/AsyncUpdateLink.java new file mode 100644 index 000000000000..3f72ad4ea7d7 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatelink/AsyncUpdateLink.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_UpdateLink_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.observability.v1.Link; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.UpdateLinkRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateLink { + + public static void main(String[] args) throws Exception { + asyncUpdateLink(); + } + + public static void asyncUpdateLink() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + UpdateLinkRequest request = + UpdateLinkRequest.newBuilder() + .setLink(Link.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = observabilityClient.updateLinkCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END observability_v1_generated_Observability_UpdateLink_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatelink/AsyncUpdateLinkLRO.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatelink/AsyncUpdateLinkLRO.java new file mode 100644 index 000000000000..06dd7aaaaf83 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatelink/AsyncUpdateLinkLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_UpdateLink_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.observability.v1.Link; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.OperationMetadata; +import com.google.cloud.observability.v1.UpdateLinkRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateLinkLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateLinkLRO(); + } + + public static void asyncUpdateLinkLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + UpdateLinkRequest request = + UpdateLinkRequest.newBuilder() + .setLink(Link.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + OperationFuture future = + observabilityClient.updateLinkOperationCallable().futureCall(request); + // Do something. + Link response = future.get(); + } + } +} +// [END observability_v1_generated_Observability_UpdateLink_LRO_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatelink/SyncUpdateLink.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatelink/SyncUpdateLink.java new file mode 100644 index 000000000000..5277e766f737 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatelink/SyncUpdateLink.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_UpdateLink_sync] +import com.google.cloud.observability.v1.Link; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.UpdateLinkRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateLink { + + public static void main(String[] args) throws Exception { + syncUpdateLink(); + } + + public static void syncUpdateLink() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + UpdateLinkRequest request = + UpdateLinkRequest.newBuilder() + .setLink(Link.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Link response = observabilityClient.updateLinkAsync(request).get(); + } + } +} +// [END observability_v1_generated_Observability_UpdateLink_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatelink/SyncUpdateLinkLinkFieldmask.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatelink/SyncUpdateLinkLinkFieldmask.java new file mode 100644 index 000000000000..ae804799d1d9 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatelink/SyncUpdateLinkLinkFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_UpdateLink_LinkFieldmask_sync] +import com.google.cloud.observability.v1.Link; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateLinkLinkFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateLinkLinkFieldmask(); + } + + public static void syncUpdateLinkLinkFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + Link link = Link.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Link response = observabilityClient.updateLinkAsync(link, updateMask).get(); + } + } +} +// [END observability_v1_generated_Observability_UpdateLink_LinkFieldmask_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatescope/AsyncUpdateScope.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatescope/AsyncUpdateScope.java new file mode 100644 index 000000000000..1f7161994cc9 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatescope/AsyncUpdateScope.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_UpdateScope_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.Scope; +import com.google.cloud.observability.v1.UpdateScopeRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateScope { + + public static void main(String[] args) throws Exception { + asyncUpdateScope(); + } + + public static void asyncUpdateScope() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + UpdateScopeRequest request = + UpdateScopeRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setScope(Scope.newBuilder().build()) + .build(); + ApiFuture future = observabilityClient.updateScopeCallable().futureCall(request); + // Do something. + Scope response = future.get(); + } + } +} +// [END observability_v1_generated_Observability_UpdateScope_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatescope/SyncUpdateScope.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatescope/SyncUpdateScope.java new file mode 100644 index 000000000000..ab85f5cf3a2a --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatescope/SyncUpdateScope.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_UpdateScope_sync] +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.Scope; +import com.google.cloud.observability.v1.UpdateScopeRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateScope { + + public static void main(String[] args) throws Exception { + syncUpdateScope(); + } + + public static void syncUpdateScope() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + UpdateScopeRequest request = + UpdateScopeRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setScope(Scope.newBuilder().build()) + .build(); + Scope response = observabilityClient.updateScope(request); + } + } +} +// [END observability_v1_generated_Observability_UpdateScope_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatescope/SyncUpdateScopeScopeFieldmask.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatescope/SyncUpdateScopeScopeFieldmask.java new file mode 100644 index 000000000000..dda33c2b56d9 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatescope/SyncUpdateScopeScopeFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_UpdateScope_ScopeFieldmask_sync] +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.Scope; +import com.google.protobuf.FieldMask; + +public class SyncUpdateScopeScopeFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateScopeScopeFieldmask(); + } + + public static void syncUpdateScopeScopeFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + Scope scope = Scope.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Scope response = observabilityClient.updateScope(scope, updateMask); + } + } +} +// [END observability_v1_generated_Observability_UpdateScope_ScopeFieldmask_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatesettings/AsyncUpdateSettings.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatesettings/AsyncUpdateSettings.java new file mode 100644 index 000000000000..36145c3d6c0c --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatesettings/AsyncUpdateSettings.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_UpdateSettings_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.Settings; +import com.google.cloud.observability.v1.UpdateSettingsRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateSettings { + + public static void main(String[] args) throws Exception { + asyncUpdateSettings(); + } + + public static void asyncUpdateSettings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + UpdateSettingsRequest request = + UpdateSettingsRequest.newBuilder() + .setSettings(Settings.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + observabilityClient.updateSettingsCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END observability_v1_generated_Observability_UpdateSettings_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatesettings/AsyncUpdateSettingsLRO.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatesettings/AsyncUpdateSettingsLRO.java new file mode 100644 index 000000000000..d269806a4a22 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatesettings/AsyncUpdateSettingsLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_UpdateSettings_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.OperationMetadata; +import com.google.cloud.observability.v1.Settings; +import com.google.cloud.observability.v1.UpdateSettingsRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateSettingsLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateSettingsLRO(); + } + + public static void asyncUpdateSettingsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + UpdateSettingsRequest request = + UpdateSettingsRequest.newBuilder() + .setSettings(Settings.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + OperationFuture future = + observabilityClient.updateSettingsOperationCallable().futureCall(request); + // Do something. + Settings response = future.get(); + } + } +} +// [END observability_v1_generated_Observability_UpdateSettings_LRO_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatesettings/SyncUpdateSettings.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatesettings/SyncUpdateSettings.java new file mode 100644 index 000000000000..7e0a6c7bef33 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatesettings/SyncUpdateSettings.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_UpdateSettings_sync] +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.Settings; +import com.google.cloud.observability.v1.UpdateSettingsRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateSettings { + + public static void main(String[] args) throws Exception { + syncUpdateSettings(); + } + + public static void syncUpdateSettings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + UpdateSettingsRequest request = + UpdateSettingsRequest.newBuilder() + .setSettings(Settings.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Settings response = observabilityClient.updateSettingsAsync(request).get(); + } + } +} +// [END observability_v1_generated_Observability_UpdateSettings_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatesettings/SyncUpdateSettingsSettingsFieldmask.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatesettings/SyncUpdateSettingsSettingsFieldmask.java new file mode 100644 index 000000000000..bdbd48e1d52c --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatesettings/SyncUpdateSettingsSettingsFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_UpdateSettings_SettingsFieldmask_sync] +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.Settings; +import com.google.protobuf.FieldMask; + +public class SyncUpdateSettingsSettingsFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateSettingsSettingsFieldmask(); + } + + public static void syncUpdateSettingsSettingsFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + Settings settings = Settings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Settings response = observabilityClient.updateSettingsAsync(settings, updateMask).get(); + } + } +} +// [END observability_v1_generated_Observability_UpdateSettings_SettingsFieldmask_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatetracescope/AsyncUpdateTraceScope.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatetracescope/AsyncUpdateTraceScope.java new file mode 100644 index 000000000000..88b5a58d7d65 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatetracescope/AsyncUpdateTraceScope.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_UpdateTraceScope_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.TraceScope; +import com.google.cloud.observability.v1.UpdateTraceScopeRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateTraceScope { + + public static void main(String[] args) throws Exception { + asyncUpdateTraceScope(); + } + + public static void asyncUpdateTraceScope() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + UpdateTraceScopeRequest request = + UpdateTraceScopeRequest.newBuilder() + .setTraceScope(TraceScope.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + observabilityClient.updateTraceScopeCallable().futureCall(request); + // Do something. + TraceScope response = future.get(); + } + } +} +// [END observability_v1_generated_Observability_UpdateTraceScope_async] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatetracescope/SyncUpdateTraceScope.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatetracescope/SyncUpdateTraceScope.java new file mode 100644 index 000000000000..22f15f540510 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatetracescope/SyncUpdateTraceScope.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_UpdateTraceScope_sync] +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.TraceScope; +import com.google.cloud.observability.v1.UpdateTraceScopeRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateTraceScope { + + public static void main(String[] args) throws Exception { + syncUpdateTraceScope(); + } + + public static void syncUpdateTraceScope() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + UpdateTraceScopeRequest request = + UpdateTraceScopeRequest.newBuilder() + .setTraceScope(TraceScope.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + TraceScope response = observabilityClient.updateTraceScope(request); + } + } +} +// [END observability_v1_generated_Observability_UpdateTraceScope_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatetracescope/SyncUpdateTraceScopeTracescopeFieldmask.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatetracescope/SyncUpdateTraceScopeTracescopeFieldmask.java new file mode 100644 index 000000000000..b4286dd5a477 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observability/updatetracescope/SyncUpdateTraceScopeTracescopeFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_Observability_UpdateTraceScope_TracescopeFieldmask_sync] +import com.google.cloud.observability.v1.ObservabilityClient; +import com.google.cloud.observability.v1.TraceScope; +import com.google.protobuf.FieldMask; + +public class SyncUpdateTraceScopeTracescopeFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateTraceScopeTracescopeFieldmask(); + } + + public static void syncUpdateTraceScopeTracescopeFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ObservabilityClient observabilityClient = ObservabilityClient.create()) { + TraceScope traceScope = TraceScope.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + TraceScope response = observabilityClient.updateTraceScope(traceScope, updateMask); + } + } +} +// [END observability_v1_generated_Observability_UpdateTraceScope_TracescopeFieldmask_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observabilitysettings/createbucket/SyncCreateBucket.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observabilitysettings/createbucket/SyncCreateBucket.java new file mode 100644 index 000000000000..3d41600b55a5 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observabilitysettings/createbucket/SyncCreateBucket.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_ObservabilitySettings_CreateBucket_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.observability.v1.ObservabilitySettings; +import java.time.Duration; + +public class SyncCreateBucket { + + public static void main(String[] args) throws Exception { + syncCreateBucket(); + } + + public static void syncCreateBucket() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ObservabilitySettings.Builder observabilitySettingsBuilder = ObservabilitySettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + observabilitySettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END observability_v1_generated_ObservabilitySettings_CreateBucket_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observabilitysettings/getscope/SyncGetScope.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observabilitysettings/getscope/SyncGetScope.java new file mode 100644 index 000000000000..043110e19ad3 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/observabilitysettings/getscope/SyncGetScope.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.samples; + +// [START observability_v1_generated_ObservabilitySettings_GetScope_sync] +import com.google.cloud.observability.v1.ObservabilitySettings; +import java.time.Duration; + +public class SyncGetScope { + + public static void main(String[] args) throws Exception { + syncGetScope(); + } + + public static void syncGetScope() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ObservabilitySettings.Builder observabilitySettingsBuilder = ObservabilitySettings.newBuilder(); + observabilitySettingsBuilder + .getScopeSettings() + .setRetrySettings( + observabilitySettingsBuilder + .getScopeSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + ObservabilitySettings observabilitySettings = observabilitySettingsBuilder.build(); + } +} +// [END observability_v1_generated_ObservabilitySettings_GetScope_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/stub/observabilitystubsettings/createbucket/SyncCreateBucket.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/stub/observabilitystubsettings/createbucket/SyncCreateBucket.java new file mode 100644 index 000000000000..beef01f1bbf6 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/stub/observabilitystubsettings/createbucket/SyncCreateBucket.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.stub.samples; + +// [START observability_v1_generated_ObservabilityStubSettings_CreateBucket_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.observability.v1.stub.ObservabilityStubSettings; +import java.time.Duration; + +public class SyncCreateBucket { + + public static void main(String[] args) throws Exception { + syncCreateBucket(); + } + + public static void syncCreateBucket() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ObservabilityStubSettings.Builder observabilitySettingsBuilder = + ObservabilityStubSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + observabilitySettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END observability_v1_generated_ObservabilityStubSettings_CreateBucket_sync] diff --git a/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/stub/observabilitystubsettings/getscope/SyncGetScope.java b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/stub/observabilitystubsettings/getscope/SyncGetScope.java new file mode 100644 index 000000000000..401a83478613 --- /dev/null +++ b/java-observability/samples/snippets/generated/com/google/cloud/observability/v1/stub/observabilitystubsettings/getscope/SyncGetScope.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.observability.v1.stub.samples; + +// [START observability_v1_generated_ObservabilityStubSettings_GetScope_sync] +import com.google.cloud.observability.v1.stub.ObservabilityStubSettings; +import java.time.Duration; + +public class SyncGetScope { + + public static void main(String[] args) throws Exception { + syncGetScope(); + } + + public static void syncGetScope() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ObservabilityStubSettings.Builder observabilitySettingsBuilder = + ObservabilityStubSettings.newBuilder(); + observabilitySettingsBuilder + .getScopeSettings() + .setRetrySettings( + observabilitySettingsBuilder + .getScopeSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + ObservabilityStubSettings observabilitySettings = observabilitySettingsBuilder.build(); + } +} +// [END observability_v1_generated_ObservabilityStubSettings_GetScope_sync] diff --git a/librarian.yaml b/librarian.yaml index e28da4e4ce6f..8c792e08d5d8 100644 --- a/librarian.yaml +++ b/librarian.yaml @@ -3421,6 +3421,13 @@ libraries: api_description_override: is a managed service that offers an integrated and secure JupyterLab environment for data scientists and machine learning developers to experiment, develop, and deploy models into production. Users can create instances running JupyterLab that come pre-installed with the latest data science and machine learning frameworks in a single click. name_pretty_override: AI Platform Notebooks product_documentation_override: https://cloud.google.com/ai-platform-notebooks + - name: observability + version: 0.1.0-SNAPSHOT + apis: + - path: google/cloud/observability/v1 + java: + additional_protos: + - path: google/cloud/location/locations.proto - name: optimization version: 1.98.0-SNAPSHOT apis: diff --git a/pom.xml b/pom.xml index d8252c033f0a..886ca210f0f6 100644 --- a/pom.xml +++ b/pom.xml @@ -185,6 +185,7 @@ java-networkservices java-notebooks java-notification + java-observability java-optimization java-oracledatabase java-orchestration-airflow diff --git a/versions.txt b/versions.txt index fa966701951c..f386bd5ea6cd 100644 --- a/versions.txt +++ b/versions.txt @@ -1120,3 +1120,8 @@ proto-google-cloud-backupdr-v1beta:0.58.0:0.59.0-SNAPSHOT proto-google-cloud-networkservices-v1beta1:0.55.0:0.56.0-SNAPSHOT grpc-google-cloud-health-v4beta:0.8.0:0.9.0-SNAPSHOT proto-google-cloud-health-v4beta:0.8.0:0.9.0-SNAPSHOT +google-cloud-observability-parent:0.0.0:0.1.0-SNAPSHOT +google-cloud-observability-bom:0.0.0:0.1.0-SNAPSHOT +proto-google-cloud-observability-v1:0.0.0:0.1.0-SNAPSHOT +grpc-google-cloud-observability-v1:0.0.0:0.1.0-SNAPSHOT +google-cloud-observability:0.0.0:0.1.0-SNAPSHOT